一、编写服务
nano /usr/lib/systemd/system/supervisord.service
==================内容开始===============
[Unit]
Description=Process Monitoring and Control Daemon
After=rc-local.service nss-user-lookup.target
[Service]
Type=forking
ExecStart=/usr/bin/supervisord -c /etc/supervisord.conf
ExecStop=/usr/bin/supervisorctl shutdown
ExecReload=/usr/bin/supervisorctl reload
KillMode=process
Restart=on-failure
RestartSec=42s
[Install]
WantedBy=multi-user.target
==================内容结束===============
二、启动服务
systemctl enable supervisord
sudo systemctl start supervisord
文章来源:https://www.toymoban.com/news/detail-738425.html
文章来源地址https://www.toymoban.com/news/detail-738425.html
到了这里,关于supervisor 配置自动启动服务的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!