Skip to content

Instantly share code, notes, and snippets.

@glenrobertson
Created May 16, 2012 21:54
Show Gist options
  • Save glenrobertson/2714272 to your computer and use it in GitHub Desktop.
Save glenrobertson/2714272 to your computer and use it in GitHub Desktop.
supervisord init.d script
#!/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