-We don't want any of our python services running at install time. Disable them early on.
This commit is contained in:
parent
8493180243
commit
0424a7f1d1
6 changed files with 18 additions and 8 deletions
|
@ -123,6 +123,18 @@ elif [ "$result" -eq "3" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#We don't want any of our python services running if we are doing an upgrade/reinstall.
|
||||||
|
#They will be automatically restarted later on.
|
||||||
|
if [ -e /etc/init.d/airtime-media-monitor ]; then
|
||||||
|
/etc/init.d/airtime-media-monitor stop > /dev/null 2>&1
|
||||||
|
fi
|
||||||
|
if [ -e /etc/init.d/airtime-playout ]; then
|
||||||
|
/etc/init.d/airtime-playout stop > /dev/null 2>&1
|
||||||
|
fi
|
||||||
|
if [ -e /etc/init.d/airtime-show-recorder ]; then
|
||||||
|
/etc/init.d/airtime-show-recorder stop > /dev/null 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
#export these variables to make them available in sub bash scripts
|
#export these variables to make them available in sub bash scripts
|
||||||
export DO_UPGRADE
|
export DO_UPGRADE
|
||||||
|
|
|
@ -445,9 +445,6 @@ class AirtimeMiscUpgrade{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "Pausing Pypo".PHP_EOL;
|
|
||||||
exec("/etc/init.d/airtime-playout stop");
|
|
||||||
|
|
||||||
while (@ob_end_flush());
|
while (@ob_end_flush());
|
||||||
|
|
||||||
UpgradeCommon::connectToDatabase();
|
UpgradeCommon::connectToDatabase();
|
||||||
|
@ -456,6 +453,3 @@ AirtimeDatabaseUpgrade::start();
|
||||||
AirtimeStorWatchedDirsUpgrade::start();
|
AirtimeStorWatchedDirsUpgrade::start();
|
||||||
AirtimeConfigFileUpgrade::start();
|
AirtimeConfigFileUpgrade::start();
|
||||||
AirtimeMiscUpgrade::start();
|
AirtimeMiscUpgrade::start();
|
||||||
|
|
||||||
//echo "Resuming Pypo".PHP_EOL;
|
|
||||||
//exec("/etc/init.d/airtime-playout start");
|
|
||||||
|
|
|
@ -14,8 +14,10 @@ try:
|
||||||
|
|
||||||
#Start media-monitor daemon
|
#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)
|
p = Popen("/etc/init.d/airtime-media-monitor stop", shell=True)
|
||||||
sts = os.waitpid(p.pid, 0)[1]
|
sts = os.waitpid(p.pid, 0)[1]
|
||||||
|
"""
|
||||||
p = Popen("/etc/init.d/airtime-media-monitor start-no-monit", shell=True)
|
p = Popen("/etc/init.d/airtime-media-monitor start-no-monit", shell=True)
|
||||||
sts = os.waitpid(p.pid, 0)[1]
|
sts = os.waitpid(p.pid, 0)[1]
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
|
|
|
@ -104,6 +104,7 @@ try:
|
||||||
|
|
||||||
#restart airtime-playout
|
#restart airtime-playout
|
||||||
print "* Waiting for pypo processes to start..."
|
print "* Waiting for pypo processes to start..."
|
||||||
|
"""
|
||||||
if os.environ["liquidsoap_keep_alive"] == "f":
|
if os.environ["liquidsoap_keep_alive"] == "f":
|
||||||
print " * Restarting any previous Liquidsoap instances"
|
print " * Restarting any previous Liquidsoap instances"
|
||||||
p = Popen("/etc/init.d/airtime-playout stop > /dev/null 2>&1", shell=True)
|
p = Popen("/etc/init.d/airtime-playout stop > /dev/null 2>&1", shell=True)
|
||||||
|
@ -112,6 +113,7 @@ try:
|
||||||
print " * Keeping any previous Liquidsoap instances running"
|
print " * Keeping any previous Liquidsoap instances running"
|
||||||
p = Popen("/etc/init.d/airtime-playout pypo-stop > /dev/null 2>&1", shell=True)
|
p = Popen("/etc/init.d/airtime-playout pypo-stop > /dev/null 2>&1", shell=True)
|
||||||
sts = os.waitpid(p.pid, 0)[1]
|
sts = os.waitpid(p.pid, 0)[1]
|
||||||
|
"""
|
||||||
p = Popen("/etc/init.d/airtime-playout start-no-monit > /dev/null 2>&1", shell=True)
|
p = Popen("/etc/init.d/airtime-playout start-no-monit > /dev/null 2>&1", shell=True)
|
||||||
sts = os.waitpid(p.pid, 0)[1]
|
sts = os.waitpid(p.pid, 0)[1]
|
||||||
|
|
||||||
|
|
|
@ -208,8 +208,6 @@ class PypoFetch(Thread):
|
||||||
# restarting pypo.
|
# restarting pypo.
|
||||||
# we could just restart liquidsoap but it take more time somehow.
|
# we could just restart liquidsoap but it take more time somehow.
|
||||||
logger.info("Restarting pypo...")
|
logger.info("Restarting pypo...")
|
||||||
#p = Popen("/etc/init.d/airtime-playout restart >/dev/null 2>&1", shell=True)
|
|
||||||
#sts = os.waitpid(p.pid, 0)[1]
|
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
else:
|
else:
|
||||||
logger.info("No change detected in setting...")
|
logger.info("No change detected in setting...")
|
||||||
|
|
|
@ -14,8 +14,10 @@ try:
|
||||||
|
|
||||||
#start daemon
|
#start daemon
|
||||||
print "* Waiting for show-recorder processes to start..."
|
print "* Waiting for show-recorder processes to start..."
|
||||||
|
"""
|
||||||
p = Popen("/etc/init.d/airtime-show-recorder stop", shell=True)
|
p = Popen("/etc/init.d/airtime-show-recorder stop", shell=True)
|
||||||
sts = os.waitpid(p.pid, 0)[1]
|
sts = os.waitpid(p.pid, 0)[1]
|
||||||
|
"""
|
||||||
p = Popen("/etc/init.d/airtime-show-recorder start-no-monit", shell=True)
|
p = Popen("/etc/init.d/airtime-show-recorder start-no-monit", shell=True)
|
||||||
sts = os.waitpid(p.pid, 0)[1]
|
sts = os.waitpid(p.pid, 0)[1]
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue