support systemd and supervisord
This commit is contained in:
parent
6d87447cf4
commit
d6c57c8aa7
17
docs/ffplayout-engine-multichannel.service
Normal file
17
docs/ffplayout-engine-multichannel.service
Normal file
@ -0,0 +1,17 @@
|
||||
[Unit]
|
||||
Description=Supervisor process control system for UNIX
|
||||
Documentation=http://supervisord.org
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/opt/ffplayout-engine/venv/bin/supervisord -n -c /opt/ffplayout-engine/supervisor/supervisord.conf
|
||||
ExecStop=/opt/ffplayout-engine/venv/bin/supervisorctl $OPTIONS shutdown
|
||||
ExecReload=/opt/ffplayout-engine/venv/bin/supervisorctl $OPTIONS reload
|
||||
KillMode=process
|
||||
Restart=on-failure
|
||||
RestartSec=5s
|
||||
User=root
|
||||
Group=root
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -1,15 +1,12 @@
|
||||
[Unit]
|
||||
Description=Supervisor process control system for UNIX
|
||||
Documentation=http://supervisord.org
|
||||
Description=python and ffmpeg based playout
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/opt/ffplayout-engine/venv/bin/supervisord -n -c /opt/ffplayout-engine/supervisor/supervisord.conf
|
||||
ExecStop=/opt/ffplayout-engine/venv/bin/supervisorctl $OPTIONS shutdown
|
||||
ExecReload=/opt/ffplayout-engine/venv/bin/supervisorctl $OPTIONS reload
|
||||
KillMode=process
|
||||
Restart=on-failure
|
||||
RestartSec=5s
|
||||
ExecStart=/opt/ffplayout-engine/venv/bin/python /opt/ffplayout-engine/ffplayout.py
|
||||
ExecReload=/bin/kill -1 $MAINPID
|
||||
Restart=always
|
||||
RestartSec=1
|
||||
User=root
|
||||
Group=root
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
[program:engine-001]
|
||||
directory=/opt/ffplayout-engine
|
||||
command=./venv/bin/python3 ffplayout.py # -c ffplayout.yml
|
||||
command=./venv/bin/python3 ffplayout.py -c /etc/ffplayout/ffplayout-001.yml
|
||||
killasgroup=true
|
||||
stopasgroup=true
|
||||
autorestart=true
|
||||
|
Loading…
x
Reference in New Issue
Block a user