supervisor 配置自动启动服务

一、编写服务

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

 

 

你可能感兴趣的:(工具,Linux,服务器,linux,运维)