示例如下:
[program:amax_iiot_p1]
directory = /home/iiot/
command = python3 mul_camera.py
autostart = true
startsecs = 5
autorestart = true
startretries = 3
user = iiot
redirect_stderr = true
stdout_logfile_maxbytes = 20MB
stdout_logfile_backups = 20
stdout_logfile = /var/log/supervisor/p1.log
stopasgroup=true
killasgroup=true
开机自动启动:
1.如果以 sudo apt-get install supervisor 方式安装会自动开机启动
2.其他方式安装可以从github下载开机自启动的脚本