Updating verifier.sh to match stacktach.sh functionality

This commit is contained in:
Andrew Melton 2013-03-12 17:29:33 -04:00
parent ef5dd0a23f
commit d20360711c

View File

@ -1,4 +1,14 @@
#!/bin/bash #!/bin/sh
### BEGIN INIT INFO
# Provides: verifier
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start/stop stacktach verifier
### END INIT INFO
. /lib/lsb/init-functions
WORKDIR=/srv/www/stacktach/app WORKDIR=/srv/www/stacktach/app
DAEMON=/usr/bin/python DAEMON=/usr/bin/python
@ -9,16 +19,24 @@ export DJANGO_SETTINGS_MODULE="settings"
case "$1" in case "$1" in
start) start)
echo "Starting server" echo "Starting stacktach verifier"
cd $WORKDIR cd $WORKDIR
/sbin/start-stop-daemon --start --pidfile $PIDFILE --make-pidfile -b --exec $DAEMON $ARGS /sbin/start-stop-daemon --start --pidfile $PIDFILE --make-pidfile -b --exec $DAEMON $ARGS
;; ;;
stop) stop)
echo "Stopping server" echo "Stopping stacktach verifier"
/sbin/start-stop-daemon --stop --pidfile $PIDFILE --verbose /sbin/start-stop-daemon --stop --pidfile $PIDFILE --verbose
;; ;;
restart)
echo "Restarting stacktach verifier"
/sbin/start-stop-daemon --stop --pidfile $PIDFILE --retry 5
/sbin/start-stop-daemon --start --pidfile $PIDFILE --make-pidfile -b --exec $DAEMON $ARGS
;;
status)
status_of_proc "$DAEMON" "verifier" && exit 0 || exit $?
;;
*) *)
echo "Usage: verifier.sh {start|stop}" echo "Usage: verifier.sh {start|stop|restart|status}"
exit 1 exit 1
;; ;;
esac esac