Skip to content

Instantly share code, notes, and snippets.

@it-can
Forked from mozillazg/supervisord.service
Last active June 22, 2017 20:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save it-can/c3ca457a52c454e5a9e5edb748ada7c3 to your computer and use it in GitHub Desktop.
Save it-can/c3ca457a52c454e5a9e5edb748ada7c3 to your computer and use it in GitHub Desktop.
install and configure supervisord on centos 7.
[Unit]
Description=supervisord - Supervisor process control system for UNIX
Documentation=http://supervisord.org
After=network.target
[Service]
Type=forking
ExecStart=/bin/supervisord -c /etc/supervisord/supervisord.conf
ExecReload=/bin/supervisorctl reload
ExecStop=/bin/supervisorctl shutdown
User=root
[Install]
WantedBy=multi-user.target
  1. install: pip install supervisor
  2. configure:
    1. mkdir -p /etc/supervisord/conf.d
    2. echo_supervisord_conf > /etc/supervisord/supervisord.conf
    3. echo "files = conf.d/*.conf" >> /etc/supervisord/supervisord.conf
  3. setup as service: wget https://gist.githubusercontent.com/it-can/c3ca457a52c454e5a9e5edb748ada7c3/raw/2f5c6f5e88fc43e27b974f8a4c19088fc22b1bd5/supervisord.service -O /usr/lib/systemd/system/supervisord.service
  4. start service systemctl start supervisord
  5. view service status: systemctl status supervisord
  6. auto start service on system startup: systemctl enable supervisord
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment