Skip to content

Instantly share code, notes, and snippets.

@vanushwashere
Last active March 19, 2024 09:59
Show Gist options
  • Star 7 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
@tzkmx
Copy link

tzkmx commented Jun 30, 2022

Thank you, It's incredible rpm supervisor through AWS has not Service Unit in its installation

@gsmethells
Copy link

gsmethells commented Jun 6, 2023

https://serverfault.com/a/1051082/177000

Summary:

The supervisors.service file above needs to have

[Service]
Type=forking

@vanushwashere

@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