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

效果如下

原文地址:https://www.cnblogs.com/bjjjunjie/p/14023557.html