作業環境: Centos 7
- 在 /etc/systemd/system 建立 supervisord.service
- curl https://raw.githubusercontent.com/Supervisor/initscripts/master/centos-systemd-etcs > supervisord.service
- mv supervisord.service /etc/systemd/system/supervisord.service
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
- 配置開機自動啟動
- systemctl enable supervisord
check
[...]# systemctl is-enabled supervisord #顯示 enabled
相關參考
留言
張貼留言