3 # init.d script for HELM draw_graph.cgi
5 # by --Zack <zack@cs.unibo.it>
6 # Created: Wed, 9 Oct 2002 11:12:01 +0200
7 # Last-Modified: Wed, 9 Oct 2002 11:12:01 +0200
9 #DAEMON=/projects/helm/graphs/tools/draw_graph.cgi
10 DAEMON=/projects/helm/graphs/tools/drawGraph.opt
11 USAGE="Usage: /etc/init.d/helm-draw-graph { start | stop | restart }"
14 if [ -f /etc/default/helm ]; then
17 if ! [ -f "$ENVSCRIPT" ]; then
18 echo "Can't find environment script '$ENVSCRIPT'"
21 . $ENVSCRIPT &> /dev/null
23 NAME=`basename $DAEMON`
24 PIDFILE=/projects/helm/run/$NAME.pid
27 echo "Starting $DAEMON ..."
29 --start --background --pidfile $PIDFILE --make-pidfile \
30 --chuid $OWNER --exec $DAEMON
34 echo "Stopping $DAEMON ..."
35 start-stop-daemon --stop --pidfile $PIDFILE && \
36 (if [ -f $PIDFILE ]; then rm -f $PIDFILE; else true; fi)