Created
May 16, 2012 21:54
-
-
Save glenrobertson/2714272 to your computer and use it in GitHub Desktop.
supervisord init.d script
This file contains 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 characters
#!/bin/bash | |
# Supervisord auto-start | |
# | |
# description: Auto-starts supervisord | |
# processname: supervisord | |
# pidfile: /var/run/supervisord.pid | |
SUPERVISORD=/usr/local/bin/supervisord | |
SUPERVISORCTL=/usr/local/bin/supervisorctl | |
start() { | |
echo -n "Starting supervisord: " | |
$SUPERVISORD | |
echo | |
} | |
stop() { | |
echo -n "Stopping supervisord: " | |
$SUPERVISORCTL shutdown | |
echo | |
} | |
status() { | |
$SUPERVISORCTL status | |
echo | |
} | |
case "$1" in | |
start) | |
start | |
;; | |
stop) | |
stop | |
;; | |
status) | |
status | |
;; | |
restart|reload|condrestart) | |
stop | |
start | |
;; | |
*) | |
echo $"Usage: $0 (start|stop|restart|reload|status)" | |
exit 1 | |
esac | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment