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

效果如下

 

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