CentOS7 配置Supervisor开机启动

之前看过一篇文章写如何配置Supervisor开机启动,这里做一下记录

1. 在自己桌面新建一个supervisord.service文件

内容为: 

[Unit]
Description=Supervisor daemon

[Service]
Type=forking
ExecStart=/usr/bin/supervisord -c /etc/supervisor/supervisord.conf
ExecStop=/usr/bin/supervisorctl shutdown
ExecReload=/usr/bin/supervisorctl reload
KillMode=process
Restart=on-failure
RestartSec=42s

[Install]
WantedBy=multi-user.target

2. 将此文件拷贝到/usr/lib/systemd/system文件夹下

3. 执行命令:

systemctl enable supervisord

4. 执行命令测试是否为开机启动

systemctl is-enabled supervisord

原文地址:https://www.cnblogs.com/hsjava1/p/10120554.html