blob: ebf2780363048cbbe713fa104fae4a8c2421f0eb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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 $?
}
|