CC-3206: Add ability to do Airtime upgrade without restarting liquidsoap

-done
This commit is contained in:
Martin Konecny 2011-12-15 11:22:22 -05:00
parent e7ad7f4b79
commit 7d60530312
2 changed files with 8 additions and 2 deletions

View File

@ -34,7 +34,7 @@ liquidsoap_stop () {
rm -f $PIDFILE1
}
pypo_stop () {
stop_pypo () {
monit unmonitor airtime-playout >/dev/null 2>&1
# Send TERM after 5 seconds, wait at most 30 seconds.
@ -132,6 +132,12 @@ case "${1:-''}" in
start-liquidsoap
echo "Done."
;;
'pypo-stop')
# restart commands here
echo -n "Restarting Pypo: "
stop_pypo
echo "Done."
;;
*) # no parameter specified
echo "Usage: $SELF start|stop|restart|status"
exit 1

View File

@ -109,7 +109,7 @@ try:
sts = os.waitpid(p.pid, 0)[1]
else:
print " * Keeping any previous Liquidsoap instances running"
p = Popen("/etc/init.d/airtime-playout pypo_stop", shell=True)
p = Popen("/etc/init.d/airtime-playout pypo-stop", shell=True)
sts = os.waitpid(p.pid, 0)[1]
p = Popen("/etc/init.d/airtime-playout start-no-monit", shell=True)
sts = os.waitpid(p.pid, 0)[1]