CC-2758: Make airtime-install script Debian/Ubuntu compatible
-cosmetic changes
This commit is contained in:
parent
d2f4e55dd6
commit
f2ef006385
17 changed files with 67 additions and 51 deletions
|
@ -11,7 +11,7 @@ try:
|
|||
sts = os.waitpid(p.pid, 0)[1]
|
||||
|
||||
#Start media-monitor daemon
|
||||
print "Waiting for media-monitor processes to start..."
|
||||
print "* Waiting for media-monitor processes to start..."
|
||||
p = Popen("/etc/init.d/airtime-media-monitor stop", shell=True)
|
||||
sts = os.waitpid(p.pid, 0)[1]
|
||||
p = Popen("/etc/init.d/airtime-media-monitor start-no-monit", shell=True)
|
||||
|
|
|
@ -16,7 +16,7 @@ def copy_dir(src_dir, dest_dir):
|
|||
if (os.path.exists(dest_dir)) and (dest_dir != "/"):
|
||||
shutil.rmtree(dest_dir)
|
||||
if not (os.path.exists(dest_dir)):
|
||||
print "Copying directory "+os.path.realpath(src_dir)+" to "+os.path.realpath(dest_dir)
|
||||
#print "Copying directory "+os.path.realpath(src_dir)+" to "+os.path.realpath(dest_dir)
|
||||
shutil.copytree(src_dir, dest_dir)
|
||||
|
||||
def create_dir(path):
|
||||
|
|
|
@ -24,19 +24,19 @@ except Exception, e:
|
|||
|
||||
try:
|
||||
#remove init.d script
|
||||
print "* Removing Media-Monitor init.d Script"
|
||||
print " * Removing Media-Monitor init.d Script"
|
||||
remove_file("/etc/init.d/airtime-media-monitor")
|
||||
|
||||
#remove bin dir
|
||||
print "* Removing Media-Monitor Program Directory"
|
||||
print " * Removing Media-Monitor Program Directory"
|
||||
shutil.rmtree(config['bin_dir'], ignore_errors=True)
|
||||
|
||||
#remove log dir
|
||||
print "* Removing Media-Monitor Log Directory"
|
||||
print " * Removing Media-Monitor Log Directory"
|
||||
shutil.rmtree(config['log_dir'], ignore_errors=True)
|
||||
|
||||
#remove monit files
|
||||
print "* Removing Media-Monitor Monit Files"
|
||||
print " * Removing Media-Monitor Monit Files"
|
||||
remove_file("/etc/monit/conf.d/monit-airtime-media-monitor.cfg")
|
||||
remove_file("/etc/monit/conf.d/monit-airtime-generic.cfg")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue