CC-4114: use liquidsoap shutdown() command to restart liquidsoap
-tying up loose ends
This commit is contained in:
parent
0270281385
commit
a874e9fff7
|
@ -178,7 +178,7 @@ fi
|
|||
if [ -e /etc/init.d/airtime-playout ]; then
|
||||
invoke-rc.d airtime-playout stop > /dev/null 2>&1
|
||||
fi
|
||||
if [ -e /etc/init.d/airtime-playout ]; then
|
||||
if [ -e /etc/init.d/airtime-liquidsoap ]; then
|
||||
invoke-rc.d airtime-liquidsoap stop > /dev/null 2>&1
|
||||
fi
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ chmod 600 /etc/monit/conf.d/monit-airtime-generic.cfg
|
|||
chmod 600 /etc/monit/conf.d/monit-airtime-liquidsoap.cfg
|
||||
chmod 600 /etc/monit/conf.d/monit-airtime-media-monitor.cfg
|
||||
chmod 600 /etc/monit/conf.d/monit-airtime-playout.cfg
|
||||
chmod 600 /etc/monit/conf.d/monit-airtime-liquidsoap.cfg
|
||||
chmod 600 /etc/monit/conf.d/monit-airtime-rabbitmq-server.cfg
|
||||
|
||||
# Start monit if it is not running, or restart if it is.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: airtime-playout
|
||||
# Provides: airtime-liquidsoap
|
||||
# Required-Start: $local_fs $remote_fs $network $syslog
|
||||
# Required-Stop: $local_fs $remote_fs $network $syslog
|
||||
# Default-Start: 2 3 4 5
|
||||
|
|
|
@ -102,6 +102,7 @@ try:
|
|||
|
||||
#initialize init.d scripts
|
||||
subprocess.call("update-rc.d airtime-playout defaults >/dev/null 2>&1", shell=True)
|
||||
subprocess.call("update-rc.d airtime-liquidsoap defaults >/dev/null 2>&1", shell=True)
|
||||
|
||||
#clear out an previous pypo cache
|
||||
print "* Clearing previous pypo cache"
|
||||
|
@ -109,8 +110,8 @@ try:
|
|||
|
||||
if "airtime_service_start" in os.environ and os.environ["airtime_service_start"] == "t":
|
||||
print "* Waiting for pypo processes to start..."
|
||||
subprocess.call("invoke-rc.d airtime-liquidsoap start-no-monit > /dev/null 2>&1", shell=True)
|
||||
subprocess.call("invoke-rc.d airtime-playout start-no-monit > /dev/null 2>&1", shell=True)
|
||||
subprocess.call("invoke-rc.d airtime-liquidsoap start-no-monit > /dev/null 2>&1", shell=True)
|
||||
|
||||
except Exception, e:
|
||||
print e
|
||||
|
|
|
@ -30,6 +30,7 @@ try:
|
|||
#remove init.d script
|
||||
print " * Removing Pypo init.d Script"
|
||||
remove_file("/etc/init.d/airtime-playout")
|
||||
remove_file("/etc/init.d/airtime-liquidsoap")
|
||||
|
||||
#remove bin, cache, tmp and file dir
|
||||
print " * Removing Pypo Program Directory"
|
||||
|
|
|
@ -8,7 +8,7 @@ if os.geteuid() != 0:
|
|||
|
||||
try:
|
||||
#stop pypo and liquidsoap processes
|
||||
print "Waiting for pypo processes to stop...",
|
||||
print "Waiting for Pypo process to stop...",
|
||||
try:
|
||||
os.remove("/usr/bin/airtime-liquidsoap")
|
||||
except Exception, e:
|
||||
|
@ -18,5 +18,12 @@ try:
|
|||
print "OK"
|
||||
else:
|
||||
print "Wasn't running"
|
||||
|
||||
print "Waiting for Liquidsoap process to stop...",
|
||||
if (os.path.exists('/etc/init.d/airtime-liquidsoap')):
|
||||
subprocess.call("invoke-rc.d airtime-liquidsoap stop", shell=True)
|
||||
print "OK"
|
||||
else:
|
||||
print "Wasn't running"
|
||||
except Exception, e:
|
||||
print e
|
||||
|
|
|
@ -31,8 +31,13 @@ try:
|
|||
sys.exit(1)
|
||||
|
||||
os.system("invoke-rc.d airtime-playout stop")
|
||||
os.system("invoke-rc.d airtime-liquidsoap stop")
|
||||
|
||||
os.system("rm -f /etc/init.d/airtime-playout")
|
||||
os.system("rm -f /etc/init.d/airtime-liquidsoap")
|
||||
|
||||
os.system("update-rc.d -f airtime-playout remove >/dev/null 2>&1")
|
||||
os.system("update-rc.d -f airtime-liquidsoap remove >/dev/null 2>&1")
|
||||
|
||||
#remove logrotate script
|
||||
os.system("rm -f /etc/logrotate.d/airtime-liquidsoap")
|
||||
|
@ -44,7 +49,7 @@ try:
|
|||
remove_path(config["cache_base_dir"])
|
||||
|
||||
print "Removing symlinks"
|
||||
os.system("rm -f /usr/bin/airtime-playout")
|
||||
os.system("rm -f /usr/bin/airtime-liquidsoap")
|
||||
|
||||
print "Removing pypo files"
|
||||
remove_path(config["bin_dir"])
|
||||
|
|
|
@ -6,4 +6,4 @@
|
|||
check process airtime-liquidsoap
|
||||
with pidfile "/var/run/airtime-liquidsoap.pid"
|
||||
start program = "/etc/init.d/airtime-liquidsoap start" with timeout 5 seconds
|
||||
stop program = "/etc/init.d/airtime-playout stop"
|
||||
stop program = "/etc/init.d/airtime-liquidsoap stop"
|
||||
|
|
|
@ -13,6 +13,7 @@ echo "Are you sure you want to do this? Press Enter to continue..."
|
|||
read
|
||||
|
||||
service airtime-playout stop >/dev/null 2>&1
|
||||
service airtime-liquidsoap stop >/dev/null 2>&1
|
||||
service airtime-media-monitor stop >/dev/null 2>&1
|
||||
service airtime-show-recorder stop >/dev/null 2>&1
|
||||
|
||||
|
|
Loading…
Reference in New Issue