3 # init.d script for http_getter
5 # by --Zack <zack@cs.unibo.it>
6 # Created: Tue, 8 Oct 2002 17:18:17 +0200
7 # Last-Modified: Wed, 8 Jan 2003 12:09:41 +0100
9 DAEMON="/projects/helm/daemons/http_getter/http_getter.opt"
10 USAGE="Usage: /etc/init.d/helm-http-getter_mowgli { start | stop | restart }"
13 if [ -f /etc/default/helm_mowgli ]; then
14 . /etc/default/helm_mowgli
16 if ! [ -f "$ENVSCRIPT" ]; then
17 echo "Can't find environment script '$ENVSCRIPT'"
20 . $ENVSCRIPT &> /dev/null
22 NAME=`basename $DAEMON`
23 PIDFILE=/var/run/"$NAME"_mowgli.pid
26 echo "Starting $DAEMON ..."
28 --start --background --pidfile $PIDFILE --make-pidfile \
29 --chuid $OWNER --exec $DAEMON
33 echo "Stopping $DAEMON ..."
34 start-stop-daemon --stop --pidfile $PIDFILE && \
35 (if [ -f $PIDFILE ]; then rm -f $PIDFILE; else true; fi)