CC-3206: Add ability to do Airtime upgrade without restarting liquidsoap

-done
This commit is contained in:
Martin Konecny 2011-12-15 11:16:14 -05:00
parent 9bbe1d14fa
commit 76fac6fbef
4 changed files with 31 additions and 13 deletions

View file

@ -103,8 +103,14 @@ try:
#restart airtime-playout
print "* Waiting for pypo processes to start..."
p = Popen("/etc/init.d/airtime-playout stop", shell=True)
sts = os.waitpid(p.pid, 0)[1]
if os.environ["liquidsoap_keep_alive"] == "f":
print " * Restarting any previous Liquidsoap instances"
p = Popen("/etc/init.d/airtime-playout stop", shell=True)
sts = os.waitpid(p.pid, 0)[1]
else:
print " * Keeping any previous Liquidsoap instances running"
p = Popen("/etc/init.d/airtime-playout pypo_stop", shell=True)
sts = os.waitpid(p.pid, 0)[1]
p = Popen("/etc/init.d/airtime-playout start-no-monit", shell=True)
sts = os.waitpid(p.pid, 0)[1]