CC-3222: Add option to disable auto starting Airtime services (after install and after system restart)

-Done
This commit is contained in:
Martin Konecny 2011-12-23 15:32:48 -05:00
parent f4449865cc
commit 00a05e146b
10 changed files with 74 additions and 69 deletions

View file

@ -7,15 +7,16 @@ if os.geteuid() != 0:
sys.exit(1)
try:
#register init.d script
p = Popen("update-rc.d airtime-show-recorder defaults >/dev/null 2>&1", shell=True)
sts = os.waitpid(p.pid, 0)[1]
#start daemon
print "* Waiting for show-recorder processes to start..."
p = Popen("/etc/init.d/airtime-show-recorder stop", shell=True)
sts = os.waitpid(p.pid, 0)[1]
p = Popen("/etc/init.d/airtime-show-recorder start-no-monit", shell=True)
sts = os.waitpid(p.pid, 0)[1]
if os.environ["disable_auto_start_services"] == "f":
#register init.d script
p = Popen("update-rc.d airtime-show-recorder defaults >/dev/null 2>&1", shell=True)
sts = os.waitpid(p.pid, 0)[1]
#start daemon
print "* Waiting for show-recorder processes to start..."
p = Popen("/etc/init.d/airtime-show-recorder stop", shell=True)
sts = os.waitpid(p.pid, 0)[1]
p = Popen("/etc/init.d/airtime-show-recorder start-no-monit", shell=True)
sts = os.waitpid(p.pid, 0)[1]
except Exception, e:
print e