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

31 lines
700 B
Plaintext

#!/sbin/runscript
PATH=$PATH:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
DAEMON="snail-watcher.sh"
DAEMON_ARGS=""
PIDFILE=/var/run/snail-watcher.pid
depend() {
need localmount
}
start() {
ebegin "Starting ${SVCNAME}"
start-stop-daemon \
--start \
--quiet \
--background \
--make-pidfile \
--pidfile $PIDFILE \
--exec $DAEMON \
-- $DAEMON_ARGS
eend $?
}
stop() {
ebegin "Stopping ${SVCNAME}"
start-stop-daemon --stop \
--pidfile $PIDFILE
eend $?
}