Created
May 1, 2013 12:45
-
-
Save Atem18/5495098 to your computer and use it in GitHub Desktop.
Init script to start supervisord with custom conf file.
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 | |
### BEGIN INIT INFO | |
# Provides: scriptname | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start daemon at boot time | |
# Description: Enable service provided by daemon. | |
### END INIT INFO | |
# Supervisord auto-start | |
# | |
# description: Auto-starts supervisord | |
# processname: supervisord | |
# pidfile: /var/run/supervisord.pid | |
SUPERVISORD=/usr/local/bin/supervisord | |
SUPERVISORD_ARGS='-c /etc/supervisord.conf' | |
SUPERVISORCTL=/usr/local/bin/supervisorctl | |
case $1 in | |
start) | |
echo -n "Starting supervisord: " | |
$SUPERVISORD $SUPERVISORD_ARGS | |
echo | |
;; | |
stop) | |
echo -n "Stopping supervisord: " | |
$SUPERVISORCTL shutdown | |
echo | |
;; | |
restart) | |
echo -n "Stopping supervisord: " | |
$SUPERVISORCTL shutdown | |
echo | |
echo -n "Starting supervisord: " | |
$SUPERVISORD $SUPERVISORD_ARGS | |
echo | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment