switch to supervisord, first step for multichannel support
This commit is contained in:
parent
210df1234a
commit
5ee2a3815a
@ -1,12 +1,15 @@
|
||||
[Unit]
|
||||
Description=python and ffmpeg based playout
|
||||
Description=Supervisor process control system for UNIX
|
||||
Documentation=http://supervisord.org
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/opt/ffplayout-engine/venv/bin/python /opt/ffplayout-engine/ffplayout.py
|
||||
ExecReload=/bin/kill -1 $MAINPID
|
||||
Restart=always
|
||||
RestartSec=1
|
||||
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
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
watchdog
|
||||
colorama
|
||||
pyyaml
|
||||
supervisor
|
||||
watchdog
|
||||
|
@ -1,4 +1,4 @@
|
||||
colorama==0.4.3
|
||||
pathtools==0.1.2
|
||||
colorama==0.4.4
|
||||
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