Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
Conflicts: airtime_mvc/public/js/airtime/schedule/add-show.js
This commit is contained in:
commit
332c1d91b5
|
@ -321,7 +321,7 @@ function setAddShowEvents() {
|
|||
applyPlatformOpacityRules: false
|
||||
});
|
||||
|
||||
var action = "/Schedule/"+addShowButton.attr("data-action");
|
||||
var action = "/Schedule/"+String(addShowButton.attr("data-action"));
|
||||
|
||||
$.post(action, {format: "json", data: data, hosts: hosts, days: days}, function(json){
|
||||
//addShowButton.removeClass("disabled");
|
||||
|
|
|
@ -26,8 +26,7 @@ showhelp () {
|
|||
--pypo|-p Install only pypo and liquidsoap
|
||||
--show-recorder|-s Install only show-recorder
|
||||
--web|-w Install only files for web-server
|
||||
--liquidsoap-keep-alive|-l Keep Liquidsoap alive when upgrading
|
||||
--disable-auto-start-services|-d Disable auto-starting Airtime services"
|
||||
--liquidsoap-keep-alive|-l Keep Liquidsoap alive when upgrading"
|
||||
}
|
||||
|
||||
overwrite="f"
|
||||
|
@ -39,9 +38,8 @@ pypo="f"
|
|||
showrecorder="f"
|
||||
web="f"
|
||||
liquidsoap_keep_alive="f"
|
||||
disable_auto_start_services="f"
|
||||
|
||||
set -- $(getopt -l help,overwrite,preserve,no-db,reinstall,media-monitor,pypo,show-recorder,web,liquidsoap-keep-alive,disable-auto-start-services "hopnrmyswld" "$@")
|
||||
set -- $(getopt -l help,overwrite,preserve,no-db,reinstall,media-monitor,pypo,show-recorder,web,liquidsoap-keep-alive "hopnrmyswl" "$@")
|
||||
while [ $# -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
|
@ -55,7 +53,6 @@ do
|
|||
(-s|--show-recorder) showrecorder="t";;
|
||||
(-w|--web) web="t";;
|
||||
(-l|--liquidsoap-keep-alive) liquidsoap_keep_alive="t";;
|
||||
(-d|--disable-auto-start-services) disable_auto_start_services="t";;
|
||||
|
||||
(--) shift; break;;
|
||||
(-*) echo "$0: error - unrecognized option $1" 1>&2; exit 1;;
|
||||
|
@ -125,14 +122,15 @@ 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.
|
||||
echo "* Temporarily stopping any previous running services"
|
||||
if [ -e /etc/init.d/airtime-media-monitor ]; then
|
||||
/etc/init.d/airtime-media-monitor stop > /dev/null 2>&1
|
||||
invoke-rc.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
|
||||
invoke-rc.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
|
||||
invoke-rc.d airtime-show-recorder stop > /dev/null 2>&1
|
||||
fi
|
||||
|
||||
|
||||
|
@ -147,7 +145,6 @@ export nodb
|
|||
export overwrite
|
||||
export preserve
|
||||
export liquidsoap_keep_alive
|
||||
export disable_auto_start_services
|
||||
|
||||
set +e
|
||||
test "$mediamonitor" = "t" -o "$pypo" = "t" -o "$showrecorder" = "t"
|
||||
|
|
|
@ -46,24 +46,19 @@ fi
|
|||
# so we can ensure they can register with monit to monitor them when they start.
|
||||
# If monit is already running, this step is still useful as we need monit to
|
||||
# reload its config files.
|
||||
/etc/init.d/monit restart
|
||||
invoke-rc.d monit restart
|
||||
|
||||
#give monit some time to boot-up before issuing commands
|
||||
sleep 1
|
||||
|
||||
set +e
|
||||
|
||||
if [ "$disable_auto_start_services" = "f" ]; then
|
||||
if [ "$mediamonitor" = "t" ]; then
|
||||
monit monitor airtime-media-monitor
|
||||
fi
|
||||
if [ "$pypo" = "t" ]; then
|
||||
monit monitor airtime-playout
|
||||
monit monitor airtime-liquidsoap
|
||||
fi
|
||||
# if [ "$showrecorder" = "t" ]; then
|
||||
# monit monitor airtime-show-recorder
|
||||
# fi
|
||||
if [ "$mediamonitor" = "t" ]; then
|
||||
monit monitor airtime-media-monitor
|
||||
fi
|
||||
if [ "$pypo" = "t" ]; then
|
||||
monit monitor airtime-playout
|
||||
monit monitor airtime-liquidsoap
|
||||
fi
|
||||
|
||||
monit monitor rabbitmq-server
|
||||
|
|
|
@ -50,8 +50,8 @@ try:
|
|||
#copy monit files
|
||||
shutil.copy('%s/../../monit/monit-airtime-generic.cfg'%current_script_dir, '/etc/monit/conf.d/')
|
||||
subprocess.call('sed -i "s/\$admin_pass/%s/g" /etc/monit/conf.d/monit-airtime-generic.cfg' % get_rand_string(), shell=True)
|
||||
if os.environ["disable_auto_start_services"] == "f":
|
||||
shutil.copy('%s/../monit-airtime-media-monitor.cfg'%current_script_dir, '/etc/monit/conf.d/')
|
||||
|
||||
shutil.copy('%s/../monit-airtime-media-monitor.cfg'%current_script_dir, '/etc/monit/conf.d/')
|
||||
|
||||
#create log dir
|
||||
create_dir(config['log_dir'])
|
||||
|
|
|
@ -9,18 +9,18 @@ try:
|
|||
#create media-monitor dir under /var/tmp/airtime
|
||||
if not os.path.exists("/var/tmp/airtime/media-monitor"):
|
||||
os.makedirs("/var/tmp/airtime/media-monitor")
|
||||
if os.environ["disable_auto_start_services"] == "f":
|
||||
#update-rc.d init script
|
||||
p = Popen("update-rc.d airtime-media-monitor defaults >/dev/null 2>&1", shell=True)
|
||||
sts = os.waitpid(p.pid, 0)[1]
|
||||
|
||||
#Start media-monitor daemon
|
||||
print "* Waiting for media-monitor processes to start..."
|
||||
"""
|
||||
p = Popen("/etc/init.d/airtime-media-monitor stop", shell=True)
|
||||
sts = os.waitpid(p.pid, 0)[1]
|
||||
"""
|
||||
p = Popen("/etc/init.d/airtime-media-monitor start-no-monit", shell=True)
|
||||
sts = os.waitpid(p.pid, 0)[1]
|
||||
#update-rc.d init script
|
||||
p = Popen("update-rc.d airtime-media-monitor defaults >/dev/null 2>&1", shell=True)
|
||||
sts = os.waitpid(p.pid, 0)[1]
|
||||
|
||||
#Start media-monitor daemon
|
||||
print "* Waiting for media-monitor processes to start..."
|
||||
"""
|
||||
p = Popen("invoke-rc.d airtime-media-monitor stop", shell=True)
|
||||
sts = os.waitpid(p.pid, 0)[1]
|
||||
"""
|
||||
p = Popen("invoke-rc.d airtime-media-monitor start-no-monit", shell=True)
|
||||
sts = os.waitpid(p.pid, 0)[1]
|
||||
except Exception, e:
|
||||
print e
|
||||
|
|
|
@ -51,9 +51,9 @@ try:
|
|||
shutil.copy('%s/../../monit/monit-airtime-generic.cfg'%current_script_dir, '/etc/monit/conf.d/')
|
||||
subprocess.call('sed -i "s/\$admin_pass/%s/g" /etc/monit/conf.d/monit-airtime-generic.cfg' % get_rand_string(), shell=True)
|
||||
shutil.copy('%s/../../monit/monit-airtime-rabbitmq-server.cfg'%current_script_dir, '/etc/monit/conf.d/')
|
||||
if os.environ["disable_auto_start_services"] == "f":
|
||||
shutil.copy('%s/../monit-airtime-liquidsoap.cfg'%current_script_dir, '/etc/monit/conf.d/')
|
||||
shutil.copy('%s/../monit-airtime-playout.cfg'%current_script_dir, '/etc/monit/conf.d/')
|
||||
|
||||
shutil.copy('%s/../monit-airtime-liquidsoap.cfg'%current_script_dir, '/etc/monit/conf.d/')
|
||||
shutil.copy('%s/../monit-airtime-playout.cfg'%current_script_dir, '/etc/monit/conf.d/')
|
||||
|
||||
#create pypo log dir
|
||||
create_dir(config['pypo_log_dir'])
|
||||
|
|
|
@ -111,25 +111,18 @@ try:
|
|||
else:
|
||||
print "Unable to connect to the Airtime server."
|
||||
|
||||
if os.environ["disable_auto_start_services"] == "f":
|
||||
#initialize init.d scripts
|
||||
p = Popen("update-rc.d airtime-playout defaults >/dev/null 2>&1", shell=True)
|
||||
sts = os.waitpid(p.pid, 0)[1]
|
||||
#initialize init.d scripts
|
||||
p = Popen("update-rc.d airtime-playout defaults >/dev/null 2>&1", shell=True)
|
||||
sts = os.waitpid(p.pid, 0)[1]
|
||||
|
||||
#restart airtime-playout
|
||||
print "* Waiting for pypo processes to start..."
|
||||
"""
|
||||
if os.environ["liquidsoap_keep_alive"] == "f":
|
||||
print " * Restarting any previous Liquidsoap instances"
|
||||
p = Popen("/etc/init.d/airtime-playout stop > /dev/null 2>&1", shell=True)
|
||||
sts = os.waitpid(p.pid, 0)[1]
|
||||
else:
|
||||
print " * Keeping any previous Liquidsoap instances running"
|
||||
p = Popen("/etc/init.d/airtime-playout pypo-stop > /dev/null 2>&1", shell=True)
|
||||
sts = os.waitpid(p.pid, 0)[1]
|
||||
"""
|
||||
p = Popen("/etc/init.d/airtime-playout start-no-monit > /dev/null 2>&1", shell=True)
|
||||
sts = os.waitpid(p.pid, 0)[1]
|
||||
#clear out an previous pypo cache
|
||||
print "* Clearing previous pypo cache"
|
||||
p = Popen("rm -rf '/var/tmp/airtime/pypo/cache/scheduler/*' >/dev/null 2>&1", shell=True)
|
||||
sts = os.waitpid(p.pid, 0)[1]
|
||||
|
||||
print "* Waiting for pypo processes to start..."
|
||||
p = Popen("invoke-rc.d airtime-playout start-no-monit > /dev/null 2>&1", shell=True)
|
||||
sts = os.waitpid(p.pid, 0)[1]
|
||||
|
||||
except Exception, e:
|
||||
print e
|
||||
|
|
|
@ -10,7 +10,7 @@ try:
|
|||
#stop pypo and liquidsoap processes
|
||||
print "Waiting for pypo processes to stop...",
|
||||
if (os.path.exists('/etc/init.d/airtime-playout')):
|
||||
p = Popen("/etc/init.d/airtime-playout stop", shell=True)
|
||||
p = Popen("invoke-rc.d airtime-playout stop", shell=True)
|
||||
sts = os.waitpid(p.pid, 0)[1]
|
||||
print "OK"
|
||||
else:
|
||||
|
|
|
@ -30,7 +30,7 @@ try:
|
|||
print 'Error loading config file: ', e
|
||||
sys.exit(1)
|
||||
|
||||
os.system("/etc/init.d/airtime-playout stop")
|
||||
os.system("invoke-rc.d airtime-playout stop")
|
||||
os.system("rm -f /etc/init.d/airtime-playout")
|
||||
os.system("update-rc.d -f airtime-playout remove >/dev/null 2>&1")
|
||||
|
||||
|
|
Loading…
Reference in New Issue