Skip to content

Instantly share code, notes, and snippets.

@sm-tester
Forked from mozillazg/supervisord.service
Last active January 29, 2020 08:49
Show Gist options
  • Save sm-tester/cc12884d8af17812c917814080e80ece to your computer and use it in GitHub Desktop.
Save sm-tester/cc12884d8af17812c917814080e80ece 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=/usr/bin/supervisord -c /etc/supervisord/supervisord.conf
ExecStop=/usr/bin/supervisorctl $OPTIONS shutdown
ExecReload=/usr/bin/supervisorctl $OPTIONS reloadUser=root
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/mozillazg/6cbdcccbf46fe96a4edd/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