-
-
Save bao3/a19aeb10645749f81b66c05957e5eedc to your computer and use it in GitHub Desktop.
Revisions
-
saitodev renamed this gist
Aug 12, 2013 . 1 changed file with 7 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,29 +1,29 @@ #!/bin/sh # # Startup script for the Supervisor server # # chkconfig: - 90 10 # description: Supervisor is a client/server system that allows its users to \ # monitor and control a number of processes on UNIX-like \ # operating systems. # # processname: supervisord # config: /etc/supervisor/supervisord.conf # pidfile: /var/run/supervisord.pid # Source function library. . /etc/rc.d/init.d/functions RETVAL=0 SUPERVISORD=/usr/local/bin/supervisord prog=$(basename $SUPERVISORD) PID_FILE=/var/run/supervisord.pid CONFIG_FILE=/etc/supervisor/supervisord.conf start() { echo -n $"Starting $prog: " $SUPERVISORD --pidfile $PID_FILE --configuration $CONFIG_FILE && success || failure RETVAL=$? echo return $RETVAL -
keimlink created this gist
Feb 17, 2011 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,80 @@ #!/bin/bash # # Startup script for the Supervisor server # # Tested with Red Hat Enterprise Linux Server release 5.5 # # chkconfig: 2345 85 15 # description: Supervisor is a client/server system that allows its users to \ # monitor and control a number of processes on UNIX-like \ # operating systems. # # processname: supervisord # pidfile: /var/run/supervisord.pid # Source function library. . /etc/rc.d/init.d/functions RETVAL=0 prog="supervisord" SUPERVISORD=/usr/bin/supervisord PID_FILE=/var/run/supervisord.pid start() { echo -n $"Starting $prog: " $SUPERVISORD --pidfile $PID_FILE && success || failure RETVAL=$? echo return $RETVAL } stop() { echo -n $"Stopping $prog: " killproc -p $PID_FILE -d 10 $SUPERVISORD RETVAL=$? echo } reload() { echo -n $"Reloading $prog: " if [ -n "`pidfileofproc $SUPERVISORD`" ] ; then killproc $SUPERVISORD -HUP else # Fails if the pid file does not exist BEFORE the reload failure $"Reloading $prog" fi sleep 1 if [ ! -e $PID_FILE ] ; then # Fails if the pid file does not exist AFTER the reload failure $"Reloading $prog" fi RETVAL=$? echo } case "$1" in start) start ;; stop) stop ;; restart) stop start ;; reload) reload ;; status) status -p $PID_FILE $SUPERVISORD RETVAL=$? ;; *) echo $"Usage: $0 {start|stop|restart|reload|status}" RETVAL=1 esac exit $RETVAL