Ubuntu18下使用supervisor守護golang進程

golang編譯後可以使用  nohup ./test & 進行後臺啓動,但卻沒有守護進程的功能

當然了,寫shell腳本肯定是可以實現後臺守護的功能的,奈何本人不會寫啊

此時就想到了supervisor

 

首先安裝

apt install supervisor

創建配置文件

vim /etc/supervisor/conf.d/loraserver.conf

 

 


service supervisor start

supervisord -c /etc/supervisor/supervisord.conf
查看狀態
supervisorctl status

效果如下

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章