prepare a script to be run
apt-get update -y
apt-get install supervisor
service supervisor restart (check if works)
cd /etc/supervisor/conf.d/
vim any.conf
-- any.conf --
[program:name]
command=sh /path/to/script.sh
autostart=true
autorestart=true
stderr_logfile=/var/log/name.err.log
stdout_logfile=/var/log/name.out.log
-- end of any.conf --
supervisorctl reread (if changed, supervisorctl update)
supervisorctl (to check if works)
apt-get update -y
apt-get install supervisor
service supervisor restart (check if works)
cd /etc/supervisor/conf.d/
vim any.conf
-- any.conf --
[program:name]
command=sh /path/to/script.sh
autostart=true
autorestart=true
stderr_logfile=/var/log/name.err.log
stdout_logfile=/var/log/name.out.log
-- end of any.conf --
supervisorctl reread (if changed, supervisorctl update)
supervisorctl (to check if works)
Comments
Post a Comment