Merge branch '2.3.x' into 2.3.x-saas

This commit is contained in:
Martin Konecny 2013-04-08 18:56:12 -04:00
commit 10fb9c9165
8 changed files with 20 additions and 12 deletions

View File

@ -143,6 +143,11 @@ 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"
set +e
monit unmonitor airtime-media-monitor >/dev/null 2>&1
monit unmonitor airtime-liquidsoap >/dev/null 2>&1
monit unmonitor airtime-playout >/dev/null 2>&1
set -e
if [ -e /etc/init.d/airtime-media-monitor ]; then
invoke-rc.d airtime-media-monitor stop > /dev/null 2>&1
fi
@ -172,6 +177,8 @@ set -e
echo -e "\n******************************** Install Begin *********************************"
rm -rf "/usr/lib/airtime"
mkdir -p /usr/lib/airtime
if [ "$python_service" -eq "0" ]; then
$AIRTIMEROOT/python_apps/python-virtualenv/virtualenv-install.sh
@ -208,6 +215,7 @@ if [ "$mediamonitor" = "t" -o "$pypo" = "t" ]; then
fi
#An attempt to force apache to realize that files are updated on upgrade...
touch /usr/share/airtime/public/index.php
if [ "$python_service" -eq "0" ]; then

View File

@ -72,7 +72,6 @@ if [ "$python_service" -eq "0" ]; then
fi
fi
mkdir -p /usr/lib/airtime
cp -R $AIRTIMEROOT/utils /usr/lib/airtime
cp -R $AIRTIMEROOT/python_apps/std_err_override /usr/lib/airtime

View File

@ -13,7 +13,7 @@ require_once(__DIR__.'/airtime-constants.php');
// -------------------------------------------------------------------------
$iniExists = file_exists("/etc/airtime/airtime.conf");
if ($iniExists){
if ($iniExists) {
//reinstall, Will ask if we should rewrite config files.
require_once(AirtimeInstall::GetAirtimeSrcDir().'/application/configs/conf.php');
$CC_CONFIG = Config::getConfig();

View File

@ -21,13 +21,9 @@ monit unmonitor airtime-liquidsoap >/dev/null 2>&1
monit unmonitor airtime-playout >/dev/null 2>&1
set -e
#virtualenv_bin="/usr/lib/airtime/airtime_virtualenv/bin/"
#. ${virtualenv_bin}activate
#uninitialize Airtime services
python $AIRTIMEROOT/python_apps/pypo/install/pypo-uninitialize.py
python $AIRTIMEROOT/python_apps/media-monitor/install/media-monitor-uninitialize.py
#python $AIRTIMEROOT/python_apps/show-recorder/install/recorder-uninitialize.py
if [ "$purge" = "t" ]; then
#call Airtime uninstall script

View File

@ -15,6 +15,7 @@ NAME="Liquidsoap Playout Engine"
DAEMON=/usr/lib/airtime/pypo/bin/airtime-liquidsoap
PIDFILE=/var/run/airtime-liquidsoap.pid
EXEC='/usr/bin/airtime-liquidsoap'
start () {
chown pypo:pypo /var/log/airtime/pypo
@ -24,8 +25,10 @@ start () {
touch $PIDFILE
chown pypo:pypo $PIDFILE
#start-stop-daemon --start --quiet --chuid $USERID:$GROUPID \
#--pidfile $PIDFILE --nicelevel -15 --startas $DAEMON
start-stop-daemon --start --quiet --chuid $USERID:$GROUPID \
--pidfile $PIDFILE --nicelevel -15 --startas $DAEMON
--nicelevel -15 --startas $DAEMON --exec $EXEC
}
stop () {
@ -33,9 +36,11 @@ stop () {
timeout -s9 10s /usr/lib/airtime/airtime_virtualenv/bin/python \
/usr/lib/airtime/pypo/bin/liquidsoap_scripts/liquidsoap_prepare_terminate.py
# Send TERM after 5 seconds, wait at most 30 seconds.
start-stop-daemon --stop --oknodo --retry=TERM/10/KILL/5 --quiet --pidfile $PIDFILE
#start-stop-daemon --stop --oknodo --retry=TERM/10/KILL/5 --quiet --pidfile $PIDFILE
start-stop-daemon --stop --oknodo --retry=TERM/10/KILL/5 --quiet --exec $EXEC
rm -f $PIDFILE
sleep 3
sleep 2
}
start_with_monit () {

View File

@ -192,6 +192,7 @@ def check_dj_client(user,password) =
ret = get_process_lines("python /usr/lib/airtime/pypo/bin/liquidsoap_scripts/liquidsoap_auth.py --dj #{user} #{password}")
#ret has now the value of the live client (dj1,dj2, or djx), or "ERROR"/"unknown" ...
hd = list.hd(ret)
log("Live DJ authenticated: #{hd}")
hd == "True"
end

View File

@ -3,8 +3,7 @@
set httpd port 2812
check process airtime-liquidsoap
with pidfile "/var/run/airtime-liquidsoap.pid"
check process airtime-liquidsoap matching "airtime-liquidsoap.*airtime.*ls_script"
start program = "/etc/init.d/airtime-liquidsoap start" with timeout 30 seconds
stop program = "/etc/init.d/airtime-liquidsoap stop"

View File

@ -142,7 +142,7 @@ class PypoFetch(Thread):
tn.write('exit\n')
tn.read_all()
except Exception, e:
logger.error(str(e))
logger.error(traceback.format_exc())
finally:
lock.release()