Last active
January 19, 2018 11:54
Revisions
-
ihor renamed this gist
Jan 19, 2018 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
ihor created this gist
Oct 3, 2012 .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,56 @@ #!/bin/bash DAEMON=/usr/local/bin/supervisord OPTS='-c /usr/local/etc/supervisor/supervisord.conf' NAME=supervisor DESC=supervisor test -x $DAEMON || exit 0 set -e start() { $DAEMON $OPTS > /dev/null 2>&1 & return } stop() { kill -SIGQUIT `cat /usr/local/var/run/supervisord.pid` return } case "$1" in start) echo -n "Starting $DESC: " start echo "started." ;; stop) echo -n "Stopping $DESC: " stop echo "stopped." ;; restart|force-reload) echo -n "Restarting $DESC: " stop sleep 1 start echo "restarted." ;; reload) echo -n "Reloading $DESC: " kill -SIGHUP `cat /usr/local/var/run/supervisord.pid` echo "reloaded." ;; *) echo "Usage: $0 {start|stop|restart|force-reload|reload}" >&2 exit 1 ;; esac exit 0