coffeebite / god.sh secret
Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

God init script

View god.sh
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
#!/bin/bash
#
# God
#
# chkconfig: - 85 15
# description: start, stop, restart God
#
. /etc/rc.d/init.d/functions
RETVAL=0
god=/usr/local/bin/god
PID_FILE=/var/run/god.pid
LOG_FILE=/var/log/god/god.log
CONFIG_FILE=/etc/god/config.god
prog=$(basename $god)
 
case "$1" in
start)
$god -P $PID_FILE -l $LOG_FILE -c $CONFIG_FILE
RETVAL=$?
;;
stop)
kill `cat /var/run/god.pid`
RETVAL=$?
;;
restart)
kill `cat /var/run/god.pid`
$god -P $PID_FILE -l $LOG_FILE -c $CONFIG_FILE
RETVAL=$?
;;
status)
status $prog
RETVAL=$?
;;
*)
echo "Usage: god {start|stop|restart|status}"
exit 1
;;
esac
exit $RETVAL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.