首页 > 系统服务 > 详细

CentOS7+ 或 Ubuntu 16.04+ 下使 supervisord 随系统启动 (systemd)

时间:2021-04-14 00:18:10      阅读:28      评论:0      收藏:0      [点我收藏+]

https://github.com/Supervisor/initscripts 下载 initscript,注意根据当前机器 supervisor 的安装情况和 supervisor.conf 的配置情况调整 centos-systemd-etcs initscript,

# supervisord service for systemd (CentOS 7.0+, Ubuntu 16.04+)
# by ET-CS (https://github.com/ET-CS)
[Unit]
Description=Supervisor daemon

[Service]
Type=forking
ExecStart=/usr/local/bin/supervisord
ExecStop=/usr/local/bin/supervisorctl $OPTIONS shutdown
ExecReload=/usr/bin/supervisorctl $OPTIONS reload
KillMode=process
Restart=on-failure
RestartSec=42s

[Install]
WantedBy=multi-user.target

将其拷贝到 /lib/systemd/system,并重命名为 supervisor.service

$ sudo  cp  centos-systemd-etcs  /lib/systemd/system/supervisor.service

然后 enable 该服务,并启动,

$ sudo systemctl enable supervisor.service
$ sudo systemctl start supervisor.service

然后 supervisor 就可以开机启动了。

 

(完)

 

CentOS7+ 或 Ubuntu 16.04+ 下使 supervisord 随系统启动 (systemd)

原文:https://www.cnblogs.com/gaowengang/p/14654746.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!