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]
|
[Unit]
|
||||||
Description=Supervisor process control system for UNIX
|
Description=python and ffmpeg based playout
|
||||||
Documentation=http://supervisord.org
|
|
||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/opt/ffplayout-engine/venv/bin/supervisord -n -c /opt/ffplayout-engine/supervisor/supervisord.conf
|
ExecStart=/opt/ffplayout-engine/venv/bin/python /opt/ffplayout-engine/ffplayout.py
|
||||||
ExecStop=/opt/ffplayout-engine/venv/bin/supervisorctl $OPTIONS shutdown
|
ExecReload=/bin/kill -1 $MAINPID
|
||||||
ExecReload=/opt/ffplayout-engine/venv/bin/supervisorctl $OPTIONS reload
|
Restart=always
|
||||||
KillMode=process
|
RestartSec=1
|
||||||
Restart=on-failure
|
|
||||||
RestartSec=5s
|
|
||||||
User=root
|
User=root
|
||||||
Group=root
|
Group=root
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[program:engine-001]
|
[program:engine-001]
|
||||||
directory=/opt/ffplayout-engine
|
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
|
killasgroup=true
|
||||||
stopasgroup=true
|
stopasgroup=true
|
||||||
autorestart=true
|
autorestart=true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user