Supervisord
apt-get install supervisor systemctl enable supervisor service supervisor restart service supervisor status
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 <name1> [ <name1> ... <nameN>]
перезапуск програм
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