Skip to content

Instantly share code, notes, and snippets.

@ibrunotome
Forked from mozillazg/supervisord.service
Last active March 17, 2020 11:59
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ibrunotome/fea1a6abbfa7106938e6df7c9af0342a to your computer and use it in GitHub Desktop.
Save ibrunotome/fea1a6abbfa7106938e6df7c9af0342a 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/supervisor/supervisord.conf
ExecReload=/bin/supervisorctl reload
ExecStop=/bin/supervisorctl shutdown
User=root
[Install]
WantedBy=multi-user.target
  1. install: easy_install supervisor
  2. configure:
    1. mkdir -p /etc/supervisor/conf.d
    2. echo_supervisord_conf > /etc/supervisor/supervisord.conf
    3. echo "files = conf.d/*.conf" >> /etc/supervisor/supervisord.conf
  3. setup as service:
    1. nano /usr/lib/systemd/system/supervisord.service
    2. paste supervisord.service content
  4. start service systemctl start supervisord
  5. view service status: systemctl status supervisord
  6. auto start service on system startup: systemctl enable supervisord
  7. create your program into /etc/supervisor/supervisord.conf (more at http://supervisord.org/introduction.html)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment