Ubuntu18下使用supervisor守护golang进程

时间:2020-11-26 15:01:15   收藏:0   阅读:10

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

效果如下

技术图片

 

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!