CC-2758: Make airtime-install script Debian/Ubuntu compatible

-further tweaks
This commit is contained in:
Martin Konecny 2011-10-28 17:24:38 -04:00
parent 56edfe4e68
commit fccaa554f5
9 changed files with 38 additions and 30 deletions

View file

@ -7,8 +7,12 @@ if os.geteuid() != 0:
sys.exit(1)
try:
print "Waiting for media-monitor processes to stop..."
p = Popen("/etc/init.d/airtime-media-monitor stop", shell=True)
sts = os.waitpid(p.pid, 0)[1]
print "Waiting for media-monitor processes to stop...",
if (os.path.exists('/etc/init.d/airtime-playout')):
p = Popen("/etc/init.d/airtime-media-monitor stop", shell=True)
sts = os.waitpid(p.pid, 0)[1]
print "OK"
else:
print "Wasn't running"
except Exception, e:
print e

View file

@ -8,8 +8,12 @@ if os.geteuid() != 0:
try:
#stop pypo and liquidsoap processes
print "Waiting for pypo processes to stop..."
p = Popen("/etc/init.d/airtime-playout stop", shell=True)
sts = os.waitpid(p.pid, 0)[1]
print "Waiting for pypo processes to stop...",
if (os.path.exists('/etc/init.d/airtime-playout')):
p = Popen("/etc/init.d/airtime-playout stop", shell=True)
sts = os.waitpid(p.pid, 0)[1]
print "OK"
else:
print "Wasn't running"
except Exception, e:
print e

View file

@ -29,15 +29,15 @@ try:
#remove bin dir
print "* Removing Show-Recorder Program Directories"
shutil.rmtree(config["bin_dir"])
shutil.rmtree(config["bin_dir"], ignore_errors=True)
#remove log dir
print "* Removing Show-Recorder Log Directory"
shutil.rmtree(config["log_dir"])
shutil.rmtree(config["log_dir"], ignore_errors=True)
#remove temporary media-storage dir
print "* Removing Show-Recorder Temporary Directory"
shutil.rmtree(config["base_recorded_files"])
shutil.rmtree(config["base_recorded_files"], ignore_errors=True)
#remove monit files
print "* Removing Show-Recorder Monit Files"

View file

@ -7,9 +7,13 @@ if os.geteuid() != 0:
sys.exit(1)
try:
print "Waiting for show-recorder processes to stop..."
p = Popen("/etc/init.d/airtime-show-recorder stop", shell=True)
sts = os.waitpid(p.pid, 0)[1]
print "Waiting for show-recorder processes to stop...",
if (os.path.exists('/etc/init.d/airtime-playout')):
p = Popen("/etc/init.d/airtime-show-recorder stop", shell=True)
sts = os.waitpid(p.pid, 0)[1]
print "OK"
else:
print "Wasn't running"
except Exception, e:
print e