使用supervisor设置应用开机自启

安装supervisor:

sudo apt install supervisor -y

创建配置文件:

sudo vim /etc/supervisor/conf.d/frpc.conf

frpc.conf示例:

[program:frpc]
command = /root/frpc/frpc -c /root/frpc/frpc.ini
autostart = true
stdout_logfile_maxbytes = 1024MB
stdout_logfile_backups = 3

重新加载一下supervisor:

# 重启supervisor
sudo systemctl restart supervisor
# 查看supervisor运行状态
sudo supervisorctl status
原文地址:https://www.cnblogs.com/steinven/p/12243886.html