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
|
@ -0,0 +1,18 @@
|
|||
from subprocess import Popen
|
||||
import os
|
||||
|
||||
if os.geteuid() != 0:
|
||||
print "Please run this as root."
|
||||
sys.exit(1)
|
||||
|
||||
try:
|
||||
#update-rc.d init script
|
||||
p = Popen("update-rc.d airtime-media-monitor defaults >/dev/null 2>&1", shell=True)
|
||||
sts = os.waitpid(p.pid, 0)[1]
|
||||
|
||||
#Start media-monitor daemon
|
||||
#p = Popen("/etc/init.d/airtime-media-monitor start-no-monit", shell=True)
|
||||
p = Popen("/etc/init.d/airtime-media-monitor restart", 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