#!/bin/sh # # chkconfig: 2345 79 31 # description: cyclic Stormforce-Map Update # # processname: stormforce # # Source function library. . /etc/rc.d/init.d/functions # Source networking configuration. . /etc/sysconfig/network # Check that networking is up. [ ${NETWORKING} = "no" ] && exit 0 prog=storm2web.sh stormforce_prg=/usr/local/bin/$prog # Source an auxiliary options file if we have one, and pick up OPTIONS, if [ -r /etc/sysconfig/$prog ]; then . /etc/sysconfig/$prog fi start() { echo -n $"Starting $prog: " # $stormforce_prg start $stormforce_prg & RETVAL=$? echo [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog } stop() { echo -n $"Stopping $prog: " /usr/bin/killall $prog # $stormforce_prg stop RETVAL=$? echo [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog } restart() { stop start } # See how we were called. case "$1" in start) start ;; stop) stop ;; restart) restart ;; *) echo $"Usage: $0 {start|stop|restart}" exit 1 esac exit $RETVAL