supervisor自啓動

supervisor自啓動
其實自啓動,也就是在主機開啓的時候,執行了sudo supervisord -c /etc/supervisord.conf
建立/usr/lib/systemd/system/supervisord.service文件;
寫入:
# dservice for systemd (CentOS 7.0+)
# by ET-CS (https://github.com/ET-CS)
[Unit]
Description=Supervisor daemonhtml

[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=42sgit

[Install]
WantedBy=multi-user.targetgithub

*注意:個人supervisord的目錄是/usr/local/bin/supervisord,須要把上邊目錄修改;
將文件拷貝至:「/usr/lib/systemd/system/supervisord.service」
systemctl enable supervisord
this

 
clip_image001

驗證一下是否爲開機啓動:systemctl is-enabled supervisord
 
clip_image002

 

Error: Another program is already listening on a port that one of our HTTP servers is configured to use. Shut this program down first before startingunix

解決方法:rest

find / -name supervisor.sockcode

unlink /name/supervisor.sockorm

unix:///var/run/supervisor.sock no such fileserver

sudo touch /var/run/supervisor.sock
sudo chmod 777 /var/run/supervisor.sock
sudo service supervisor restarthtm

相關文章
相關標籤/搜索