====== Supervisord ======
pkg install py39-supervisor
nano /etc/supervisor/conf.d/np_natlog.conf
[program:np_natlog]
environment=PATH="/usr/bin"
directory=/usr/local/nodeny/
command=perl nokernel.pl -m=natlog -d &
autostart=true
autorestart=true
stderr_logfile=/var/log/nodeny/np_natlog.err.log
stdout_logfile=/var/log/nodeny/np_natlog.out.log
mkdir -p /var/log/nodeny
supervisorctl reread
supervisorctl update
nano /etc/supervisor/conf.d/np_natlogsort.conf
[program:np_natlogsort]
environment=PATH="/usr/bin"
directory=/usr/local/nodeny/
command=perl nokernel.pl -m=natlogsort -d &
autostart=true
autorestart=true
stderr_logfile=/var/log/nodeny/np_natlogsort.err.log
stdout_logfile=/var/log/nodeny/np_natlogsort.out.log
supervisorctl reread
supervisorctl update
синтаксис перезапуску програм
supervisorctl restart [ ... ]
перезапуск програм
supervisorctl restart np_natlog np_natlogsort
вивід команди
np_natlog RUNNING pid 7558, uptime 0:03:16
np_natlogsort RUNNING pid 7561, uptime 0:03:15
перевірити статус
supervisorctl status np_natlog np_natlogsort
вивід команди
np_natlog: stopped
np_natlogsort: stopped
np_natlog: started
np_natlogsort: started
====== URLS ======
[[https://adw0rd.com/2012/11/02/python-supervisor/]]
[[http://www.supervisord.org/]]