CC-3206: Add ability to do Airtime upgrade without restarting liquidsoap
-done
This commit is contained in:
parent
e7ad7f4b79
commit
7d60530312
2 changed files with 8 additions and 2 deletions
|
@ -34,7 +34,7 @@ liquidsoap_stop () {
|
||||||
rm -f $PIDFILE1
|
rm -f $PIDFILE1
|
||||||
}
|
}
|
||||||
|
|
||||||
pypo_stop () {
|
stop_pypo () {
|
||||||
monit unmonitor airtime-playout >/dev/null 2>&1
|
monit unmonitor airtime-playout >/dev/null 2>&1
|
||||||
|
|
||||||
# Send TERM after 5 seconds, wait at most 30 seconds.
|
# Send TERM after 5 seconds, wait at most 30 seconds.
|
||||||
|
@ -132,6 +132,12 @@ case "${1:-''}" in
|
||||||
start-liquidsoap
|
start-liquidsoap
|
||||||
echo "Done."
|
echo "Done."
|
||||||
;;
|
;;
|
||||||
|
'pypo-stop')
|
||||||
|
# restart commands here
|
||||||
|
echo -n "Restarting Pypo: "
|
||||||
|
stop_pypo
|
||||||
|
echo "Done."
|
||||||
|
;;
|
||||||
*) # no parameter specified
|
*) # no parameter specified
|
||||||
echo "Usage: $SELF start|stop|restart|status"
|
echo "Usage: $SELF start|stop|restart|status"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
@ -109,7 +109,7 @@ try:
|
||||||
sts = os.waitpid(p.pid, 0)[1]
|
sts = os.waitpid(p.pid, 0)[1]
|
||||||
else:
|
else:
|
||||||
print " * Keeping any previous Liquidsoap instances running"
|
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]
|
sts = os.waitpid(p.pid, 0)[1]
|
||||||
p = Popen("/etc/init.d/airtime-playout start-no-monit", shell=True)
|
p = Popen("/etc/init.d/airtime-playout start-no-monit", shell=True)
|
||||||
sts = os.waitpid(p.pid, 0)[1]
|
sts = os.waitpid(p.pid, 0)[1]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue