Wrap text
Report abuse
#!/bin/bash
#
# God
#
# chkconfig: - 85 15
# description: start, stop, restart God (bet you feel powerful)
#
RETVAL=0
case "$1" in
start)
/usr/bin/god -P /var/run/god.pid -l /var/log/god.log
/usr/bin/god load /etc/god.conf
RETVAL=$?
;;
stop)
kill `cat /var/run/god.pid`
RETVAL=$?
;;
restart)
kill `cat /var/run/god.pid`
/usr/bin/god -P /var/run/god.pid -l /var/log/god.log
/usr/bin/god load /etc/god.conf
RETVAL=$?
;;
status)
RETVAL=$?
;;
*)
echo "Usage: god {start|stop|restart|status}"
exit 1
;;
esac
exit $RETVAL