Skip to content

Instantly share code, notes, and snippets.

@vanushwashere
Last active April 18, 2024 03:14
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save vanushwashere/6f255caf4fa42673153db035222701f2 to your computer and use it in GitHub Desktop.
Save vanushwashere/6f255caf4fa42673153db035222701f2 to your computer and use it in GitHub Desktop.
Systemd unit file for supervisord service

Systemd unit file for supervisord service

  • place this config in /etc/systemd/system/supervisord.service
  • kill all supervisord processes
  • sudo systemctl daemon-reload
  • sudo systemctl enable supervisord
  • start with sudo systemctl start supervisord if already not started
[Unit]
Description=Supervisor process control system for UNIX
Documentation=http://supervisord.org
After=network.target
[Service]
#Uncomment the line below if you want to run it as a daemon
#Type=forking
ExecStart=/usr/bin/supervisord -n -c /etc/supervisord.conf
ExecStop=/usr/bin/supervisorctl $OPTIONS shutdown
ExecReload=/usr/bin/supervisorctl $OPTIONS reload
KillMode=process
Restart=on-failure
RestartSec=20s
[Install]
WantedBy=multi-user.target
@lixiaomeng8520
Copy link

@gsmethells

I think
if the supervisord start with daemon, it should be forking;
and if nodaemon, it should be simple

@vanushwashere
Copy link
Author

@lixiaomeng8520 right!
Thank you @gsmethells and @lixiaomeng8520, updated the gist.

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