CC-2758: Make airtime-install script Debian/Ubuntu compatible
-initial commit
This commit is contained in:
parent
d26e410799
commit
8cafc52cad
16 changed files with 491 additions and 15 deletions
20
python_apps/show-recorder/install/recorder-initialize.py
Normal file
20
python_apps/show-recorder/install/recorder-initialize.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
from subprocess import Popen
|
||||
import os
|
||||
import sys
|
||||
|
||||
if os.geteuid() != 0:
|
||||
print "Please run this as root."
|
||||
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 processes to start..."
|
||||
p = Popen("/etc/init.d/airtime-show-recorder stop", shell=True)
|
||||
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
|
Loading…
Add table
Add a link
Reference in a new issue