Snail/share/init.d/snail-watcher.openrc

31 lines
700 B
Plaintext
Raw Permalink Normal View History

2012-03-20 16:46:24 +04:00
#!/sbin/runscript
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=""
PIDFILE=/var/run/snail-watcher.pid
2012-03-20 16:46:24 +04:00
depend() {
need localmount
}
start() {
ebegin "Starting ${SVCNAME}"
start-stop-daemon \
2012-03-21 00:15:32 +04:00
--start \
--quiet \
--background \
--make-pidfile \
2012-03-21 00:15:32 +04:00
--pidfile $PIDFILE \
--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 $?
}