2011-10-28 18:35:58 +02:00
|
|
|
import os
|
|
|
|
import sys
|
2012-05-07 21:46:49 +02:00
|
|
|
import subprocess
|
2011-10-28 18:35:58 +02:00
|
|
|
|
|
|
|
if os.geteuid() != 0:
|
|
|
|
print "Please run this as root."
|
|
|
|
sys.exit(1)
|
|
|
|
|
|
|
|
try:
|
|
|
|
#stop pypo and liquidsoap processes
|
2012-08-20 22:54:01 +02:00
|
|
|
print "Waiting for Pypo process to stop...",
|
2012-05-28 19:36:49 +02:00
|
|
|
try:
|
|
|
|
os.remove("/usr/bin/airtime-liquidsoap")
|
|
|
|
except Exception, e:
|
|
|
|
pass
|
2011-10-28 23:24:38 +02:00
|
|
|
if (os.path.exists('/etc/init.d/airtime-playout')):
|
2012-05-07 21:46:49 +02:00
|
|
|
subprocess.call("invoke-rc.d airtime-playout stop", shell=True)
|
2011-10-28 23:24:38 +02:00
|
|
|
print "OK"
|
|
|
|
else:
|
|
|
|
print "Wasn't running"
|
2012-08-20 22:54:01 +02:00
|
|
|
|
|
|
|
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"
|
2011-10-28 18:35:58 +02:00
|
|
|
except Exception, e:
|
|
|
|
print e
|