switch to supervisord, first step for multichannel support
This commit is contained in:
parent
210df1234a
commit
5ee2a3815a
@ -1,12 +1,15 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=python and ffmpeg based playout
|
Description=Supervisor process control system for UNIX
|
||||||
|
Documentation=http://supervisord.org
|
||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/opt/ffplayout-engine/venv/bin/python /opt/ffplayout-engine/ffplayout.py
|
ExecStart=/opt/ffplayout-engine/venv/bin/supervisord -n -c /opt/ffplayout-engine/supervisor/supervisord.conf
|
||||||
ExecReload=/bin/kill -1 $MAINPID
|
ExecStop=/opt/ffplayout-engine/venv/bin/supervisorctl $OPTIONS shutdown
|
||||||
Restart=always
|
ExecReload=/opt/ffplayout-engine/venv/bin/supervisorctl $OPTIONS reload
|
||||||
RestartSec=1
|
KillMode=process
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=5s
|
||||||
User=root
|
User=root
|
||||||
Group=root
|
Group=root
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
watchdog
|
|
||||||
colorama
|
colorama
|
||||||
pyyaml
|
pyyaml
|
||||||
|
supervisor
|
||||||
|
watchdog
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
colorama==0.4.3
|
colorama==0.4.4
|
||||||
pathtools==0.1.2
|
|
||||||
PyYAML==5.3.1
|
PyYAML==5.3.1
|
||||||
watchdog==0.10.3
|
supervisor==4.2.1
|
||||||
|
watchdog==1.0.2
|
||||||
|
9
supervisor/conf.d/engine-001.conf
Normal file
9
supervisor/conf.d/engine-001.conf
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
[program:ffplayout-engine-001]
|
||||||
|
directory=/opt/ffplayout-engine
|
||||||
|
command=./venv/bin/python3 ffplayout.py # -c ffplayout.yml
|
||||||
|
killasgroup=true
|
||||||
|
stopasgroup=true
|
||||||
|
autorestart=true
|
||||||
|
autostart=true
|
||||||
|
startsecs=2
|
||||||
|
startretries=10
|
14
supervisor/supervisord.conf
Normal file
14
supervisor/supervisord.conf
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
[supervisord]
|
||||||
|
# user=ffplayout
|
||||||
|
|
||||||
|
[include]
|
||||||
|
files = conf.d/*.conf
|
||||||
|
|
||||||
|
[inet_http_server]
|
||||||
|
port=127.0.0.1:9011
|
||||||
|
|
||||||
|
[supervisorctl]
|
||||||
|
serverurl=http://127.0.0.1:9011
|
||||||
|
|
||||||
|
[rpcinterface:supervisor]
|
||||||
|
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
|
Loading…
x
Reference in New Issue
Block a user