Skip to content

Instantly share code, notes, and snippets.

@betapcode
Last active August 14, 2019 08:23
Show Gist options
  • Save betapcode/da2531e96788f1d5fc3e26ed3c5640b7 to your computer and use it in GitHub Desktop.
Save betapcode/da2531e96788f1d5fc3e26ed3c5640b7 to your computer and use it in GitHub Desktop.
[Centos] /etc/init.d/supervisord
#!/bin/sh
#
# supervisord init file for starting up the supervisord daemon
#
# chkconfig: - 20 80
# description: Starts and stops the supervisord daemon.
# AUTHOR : betapcode - [email protected]
# COMPANY: Tamtay JSC
# VERSION: 1.0
# CREATED: 04/11/2016 10:31:01 AM
SUPERVISORD=$(which supervisord) #/usr/local/bin/supervisord
SUPERVISORCTL=$(which supervisorctl) #/usr/local/bin/supervisorctl
case $1 in
start)
echo -n "Starting supervisord: "
$SUPERVISORD -c /etc/supervisord.conf
echo
;;
stop)
echo -n "Stopping supervisord: "
$SUPERVISORCTL shutdown
echo
;;
restart)
echo -n "Stopping supervisord: "
$SUPERVISORCTL shutdown
echo
echo -n "Starting supervisord: "
$SUPERVISORD
echo
;;
esac
~
@betapcode
Copy link
Author

sudo chmod +x /etc/init.d/supervisord
sudo update-rc.d supervisord defaults
sudo /etc/init.d/supervisord start
sudo /etc/init.d/supervisord stop

@betapcode
Copy link
Author

Enabled web UI interface in inet_http_server configuration block in supervisord.conf
Run: http://localhost:9001/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment