diff options
author | Paul Kilar <pkilar@gmail.com> | 2014-07-14 12:14:16 -0400 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2014-07-15 14:11:03 +0000 |
commit | 0e54ff14a89ae38646c1cf6db90f5fa882420086 (patch) | |
tree | 02c3750cafcc55e2168b02899057ee819e5b0e38 /testing/dante/sockd.initd | |
parent | 86ae8ce238156a4bb9ba0aeda82bb50c60e74ea8 (diff) | |
download | aports-0e54ff14a89ae38646c1cf6db90f5fa882420086.tar.bz2 aports-0e54ff14a89ae38646c1cf6db90f5fa882420086.tar.xz |
testing/dante: new aport https://www.inet.no/dante/ Dante - A free SOCKS server
Diffstat (limited to 'testing/dante/sockd.initd')
-rw-r--r-- | testing/dante/sockd.initd | 43 |
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 $? +} |