CC-3575: Use invoke-rc.d to start and stop services, rather than calling init scripts directly

-fixed
This commit is contained in:
Martin Konecny 2012-04-05 15:09:20 -04:00
parent b00e74e831
commit 3611f1071d
6 changed files with 11 additions and 11 deletions

View file

@ -120,14 +120,14 @@ try:
"""
if os.environ["liquidsoap_keep_alive"] == "f":
print " * Restarting any previous Liquidsoap instances"
p = Popen("/etc/init.d/airtime-playout stop > /dev/null 2>&1", shell=True)
p = Popen("invoke-rc.d airtime-playout stop > /dev/null 2>&1", 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 > /dev/null 2>&1", shell=True)
p = Popen("invoke-rc.d airtime-playout pypo-stop > /dev/null 2>&1", shell=True)
sts = os.waitpid(p.pid, 0)[1]
"""
p = Popen("/etc/init.d/airtime-playout start-no-monit > /dev/null 2>&1", shell=True)
p = Popen("invoke-rc.d airtime-playout start-no-monit > /dev/null 2>&1", shell=True)
sts = os.waitpid(p.pid, 0)[1]
except Exception, e: