aboutsummaryrefslogtreecommitdiffstats
path: root/testing/dante/sockd.initd
diff options
context:
space:
mode:
Diffstat (limited to 'testing/dante/sockd.initd')
-rw-r--r--testing/dante/sockd.initd43
1 files changed, 43 insertions, 0 deletions
diff --git a/testing/dante/sockd.initd b/testing/dante/sockd.initd
new file mode 100644
index 0000000000..ebf2780363
--- /dev/null
+++ b/testing/dante/sockd.initd
@@ -0,0 +1,43 @@
+#!/sbin/runscript
+#
+# startup script for sockd daemon
+#
+
+depend() {
+ need net
+ after firewall
+ provide sockd
+ use dns
+}
+
+SOCKD_PIDFILE=${SSHD_PIDFILE:-/var/run/${SVCNAME}.pid}
+SOCKD_BINARY=${SSHD_BINARY:-/usr/sbin/sockd}
+
+check_config() {
+ $SOCKD_BINARY -V || return 1
+}
+
+#########################################################################################
+
+start() {
+ check_config || return 1
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --exec "${SOCKD_BINARY}" \
+ --pidfile "${SOCKD_PIDFILE}" \
+ -- ${SOCKD_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --exec "${SOCKD_BINARY}" \
+ --pidfile "${SOCKD_PIDFILE}" --quiet
+ eend $?
+}
+
+restart() {
+ ebegin "Restarting ${SVCNAME}"
+ stop
+ start
+ eend $?
+}