Centos 开机自动启动 supervisor

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_38165374/article/details/82812878

1.在目录/usr/lib/systemd/system/ 新建文件supervisord.service
2.添加配置内容:

[Unit] 
Description=Supervisor daemon

[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  # 开机42后启动

[Install] 
WantedBy=multi-user.target

3.启动服务 systemctl enable supervisord
4.验证一下是否为开机启动 systemctl is-enabled supervisord

猜你喜欢

转载自blog.csdn.net/qq_38165374/article/details/82812878