CC-3415: Live Stream: Disconnect all input.harbor connections before
terminating the process - Modified init.d script. init.d script calls liquidsoap_prepare_terminate.py
This commit is contained in:
parent
79f8eabe2b
commit
cde6db812f
3 changed files with 48 additions and 28 deletions
|
@ -0,0 +1,19 @@
|
|||
from configobj import ConfigObj
|
||||
import telnetlib
|
||||
import sys
|
||||
|
||||
try:
|
||||
config = ConfigObj('/etc/airtime/pypo.cfg')
|
||||
LS_HOST = config['ls_host']
|
||||
LS_PORT = config['ls_port']
|
||||
|
||||
tn = telnetlib.Telnet(LS_HOST, LS_PORT)
|
||||
tn.write("master_harbor.stop\n")
|
||||
tn.write("live_dj_harbor.stop\n")
|
||||
tn.write('exit\n')
|
||||
tn.read_all()
|
||||
|
||||
except Exception, e:
|
||||
print('Error loading config file: %s', e)
|
||||
sys.exit()
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue