cc-2055: switch to init.d
-initial upgrade script
This commit is contained in:
parent
4c9c86bf4f
commit
d516b963e4
5 changed files with 42 additions and 18 deletions
|
@ -51,7 +51,7 @@ try:
|
|||
|
||||
current_script_dir = get_current_script_dir()
|
||||
|
||||
p = Popen("/etc/init.d/airtime-media-monitor stop", shell=True)
|
||||
p = Popen("/etc/init.d/airtime-media-monitor stop >/dev/null 2>&1", shell=True)
|
||||
sts = os.waitpid(p.pid, 0)[1]
|
||||
|
||||
print "Creating log directories"
|
||||
|
@ -82,6 +82,4 @@ try:
|
|||
except Exception, e:
|
||||
print "exception:" + str(e)
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -20,8 +20,6 @@ def create_path(path):
|
|||
if not (os.path.exists(path)):
|
||||
print "Creating directory " + path
|
||||
os.makedirs(path)
|
||||
else:
|
||||
print "Directory already exists " + path
|
||||
|
||||
def copy_dir(src_dir, dest_dir):
|
||||
if (os.path.exists(dest_dir)) and (dest_dir != "/"):
|
||||
|
@ -62,7 +60,7 @@ try:
|
|||
|
||||
current_script_dir = get_current_script_dir()
|
||||
|
||||
p = Popen("/etc/init.d/airtime-playout stop", shell=True)
|
||||
p = Popen("/etc/init.d/airtime-playout stop >/dev/null 2>&1", shell=True)
|
||||
sts = os.waitpid(p.pid, 0)[1]
|
||||
|
||||
create_path(config["pypo_log_dir"])
|
||||
|
@ -111,7 +109,6 @@ try:
|
|||
os.system("rm -f /usr/bin/airtime-liquidsoap")
|
||||
os.system("ln -s "+config["bin_dir"]+"/bin/airtime-liquidsoap /usr/bin/")
|
||||
|
||||
|
||||
print "Installing pypo daemon"
|
||||
shutil.copy(config["bin_dir"]+"/bin/airtime-playout-init-d", "/etc/init.d/airtime-playout")
|
||||
|
||||
|
@ -126,6 +123,5 @@ try:
|
|||
except Exception, e:
|
||||
print "exception:" + str(e)
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ try:
|
|||
|
||||
current_script_dir = get_current_script_dir()
|
||||
|
||||
p = Popen("/etc/init.d/airtime-show-recorder stop", shell=True)
|
||||
p = Popen("/etc/init.d/airtime-show-recorder stop >/dev/null 2>&1", shell=True)
|
||||
sts = os.waitpid(p.pid, 0)[1]
|
||||
|
||||
print "Creating temporary media storage directory"
|
||||
|
@ -80,6 +80,4 @@ try:
|
|||
except Exception, e:
|
||||
print "exception:" + str(e)
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue