2012-03-20 16:46:24 +04:00
|
|
|
#!/sbin/runscript
|
|
|
|
|
2012-04-01 19:39:56 +04:00
|
|
|
PATH=$PATH:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
|
2012-03-24 11:16:52 +04:00
|
|
|
DAEMON="snail-watcher.sh"
|
2012-03-20 16:46:24 +04:00
|
|
|
DAEMON_ARGS=""
|
2012-04-01 19:39:56 +04:00
|
|
|
PIDFILE=/var/run/snail-watcher.pid
|
2012-03-20 16:46:24 +04:00
|
|
|
|
|
|
|
depend() {
|
|
|
|
need localmount
|
|
|
|
}
|
|
|
|
|
|
|
|
start() {
|
|
|
|
ebegin "Starting ${SVCNAME}"
|
2012-04-01 20:54:49 +04:00
|
|
|
start-stop-daemon \
|
2012-03-21 00:15:32 +04:00
|
|
|
--start \
|
2012-04-01 20:54:49 +04:00
|
|
|
--quiet \
|
|
|
|
--background \
|
|
|
|
--make-pidfile \
|
2012-03-21 00:15:32 +04:00
|
|
|
--pidfile $PIDFILE \
|
2012-04-01 19:39:56 +04:00
|
|
|
--exec $DAEMON \
|
2012-03-21 00:15:32 +04:00
|
|
|
-- $DAEMON_ARGS
|
2012-03-20 16:46:24 +04:00
|
|
|
eend $?
|
|
|
|
}
|
|
|
|
|
|
|
|
stop() {
|
|
|
|
ebegin "Stopping ${SVCNAME}"
|
2012-03-21 00:15:32 +04:00
|
|
|
start-stop-daemon --stop \
|
|
|
|
--pidfile $PIDFILE
|
2012-03-20 16:46:24 +04:00
|
|
|
eend $?
|
|
|
|
}
|