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
效果如下