CC-4114: use liquidsoap shutdown() command to restart liquidsoap

-tying up loose ends
This commit is contained in:
Martin Konecny 2012-08-20 16:54:01 -04:00
parent 0270281385
commit a874e9fff7
9 changed files with 22 additions and 6 deletions

View file

@ -8,7 +8,7 @@ if os.geteuid() != 0:
try:
#stop pypo and liquidsoap processes
print "Waiting for pypo processes to stop...",
print "Waiting for Pypo process to stop...",
try:
os.remove("/usr/bin/airtime-liquidsoap")
except Exception, e:
@ -18,5 +18,12 @@ try:
print "OK"
else:
print "Wasn't running"
print "Waiting for Liquidsoap process to stop...",
if (os.path.exists('/etc/init.d/airtime-liquidsoap')):
subprocess.call("invoke-rc.d airtime-liquidsoap stop", shell=True)
print "OK"
else:
print "Wasn't running"
except Exception, e:
print e