安装
dnf update -y
dnf install supervisor
sytemctl enable supervisord
配置
vim /etc/supervisor/xxx.conf
[program:testprogram]
directory = /root/go/src/test
command = /root/go/src/test/bin/server
autostart = true
startsecs = 5
autorestart = true
startretries = 3
user = root
redirect_stderr = true
stdout_logfile = /var/log/supervisor/test.log
使用
supervisorctl reload
supervisorctl start xxx
supervisorctl status