3 # init.d script for http_getter.pl
5 # by --Zack <zack@cs.unibo.it>
6 # Created: Tue, 8 Oct 2002 17:18:17 +0200
7 # Last-Modified: Tue, 8 Oct 2002 17:18:17 +0200
9 DAEMON=/projects/helm/http_getter/http_getter.pl
10 USAGE="Usage: /etc/init.d/helm-http-getter { start | stop | restart }"
13 if [ -f /etc/default/helm ]; then
16 if ! [ -f "$ENVSCRIPT" ]; then
17 echo "Can't find environment script '$ENVSCRIPT'"
20 . $ENVSCRIPT &> /dev/null
22 NAME=`basename $DAEMON`
23 PIDFILE=/projects/helm/run/$NAME.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)