more diagnostics
[god.git] / init / god
blob2c7d7336c80bd7174cbaf9a1898a1c34f4b07033
1 #!/bin/bash
3 # god Startup script for god (http://god.rubyforge.org)
5 # chkconfig: - 85 15
6 # description: God is an easy to configure, easy to extend monitoring \
7 # framework written in Ruby.
8 #
10 CONF_DIR=/etc/god
12 RETVAL=0
14 # Go no further if config directory is missing.
15 [ -d "$CONF_DIR" ] || exit 0
17 case "$1" in
18 start)
19 # Create pid directory
20 ruby /usr/bin/god -c $CONF_DIR/master.conf
21 RETVAL=$?
23 stop)
24 ruby /usr/bin/god terminate
25 RETVAL=$?
27 restart)
28 ruby /usr/bin/god terminate
29 ruby /usr/bin/god -c $CONF_DIR/master.conf
30 RETVAL=$?
32 status)
33 ruby /usr/bin/god status
34 RETVAL=$?
37 echo "Usage: god {start|stop|restart|status}"
38 exit 1
40 esac
42 exit $RETVAL