#ubuntu 安装 supervisor
sudo apt install supervisor
#添加配置 /etc/supervisor/conf.d/{your_program_name}.conf
[supervisord]
nodaemon=false
[program:{your_program_name}]
command={your_command}
directory= {your_directory}
autostart=true
autorestart=true
user=root
stdout_logfile={your_log_file}
stderr_logfile={your_log_file}
#添加配置文件到 supervisor
sudo supervisor -c /etc/supervisor/conf.d/{your_program_name}.conf
#supervisorctl 控制状态
sudo supervisorctl status
sudo supervisorctl stop all
sudo supervisorctl update
sudo supervisorctl restart all
sudo supervisorctl start all
10-22 17:22