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

This commit is contained in:
Martin Konecny 2013-04-02 12:31:03 -04:00
commit 2d2aa8eb46
12 changed files with 3362 additions and 48 deletions

12
CREDITS
View File

@ -22,6 +22,18 @@ Mikayel Karapetian (michael.karapetian@sourcefabric.org)
Daniel James (daniel.james@sourcefabric.org) Daniel James (daniel.james@sourcefabric.org)
Role: Documentor & QA Role: Documentor & QA
Localizations:
Albert (French)
Christoph Rombach, Micz Flor (German)
Claudia Cruz (Spanish)
Katerina Michailidis (Greek)
Hoerich (Austrian)
Luba Sirina (Russian)
Luciano De Fazio (Brazilian Portuguese)
Sebastian Matuszewski (Polish)
Staff Pingu (Italian)
Version 2.2.1 Version 2.2.1
------------- -------------
Martin Konecny (martin.konecny@sourcefabric.org) Martin Konecny (martin.konecny@sourcefabric.org)

View File

@ -325,9 +325,12 @@ INSERT INTO cc_pref("keystr", "valstr") VALUES('locale', 'en_CA');
INSERT INTO cc_pref("subjid", "keystr", "valstr") VALUES(1, 'user_locale', 'en_CA'); INSERT INTO cc_pref("subjid", "keystr", "valstr") VALUES(1, 'user_locale', 'en_CA');
INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('en_CA', 'English'); INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('en_CA', 'English (Canada)');
INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('en_GB', 'English (Britain)');
INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('en_US', 'English (USA)');
INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('cs_CZ', 'Český'); INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('cs_CZ', 'Český');
INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('de_DE', 'Deutsch'); INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('de_DE', 'Deutsch');
INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('de_AT', 'Österreichisches Deutsch');
INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('es_ES', 'Español'); INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('es_ES', 'Español');
INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('fr_FR', 'Français'); INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('fr_FR', 'Français');
INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('it_IT', 'Italiano'); INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('it_IT', 'Italiano');

Binary file not shown.

File diff suppressed because it is too large Load Diff

2
debian/control vendored
View File

@ -17,6 +17,7 @@ Depends: apache2,
gzip (>= 1.3.12), gzip (>= 1.3.12),
libao-ocaml, libao-ocaml,
libapache2-mod-php5, libapache2-mod-php5,
libc-bin,
libcamomile-ocaml-data, libcamomile-ocaml-data,
libesd0, libesd0,
libmad-ocaml, libmad-ocaml,
@ -27,6 +28,7 @@ Depends: apache2,
libsoundtouch-ocaml, libsoundtouch-ocaml,
libtaglib-ocaml, libtaglib-ocaml,
liquidsoap (>= 1.0.0~), liquidsoap (>= 1.0.0~),
locales,
lsof, lsof,
monit, monit,
multitail, multitail,

4
debian/postinst vendored
View File

@ -16,7 +16,7 @@ includefile="${configdir}/apache.conf"
a2tplfile="${configdir}/apache.vhost.tpl" a2tplfile="${configdir}/apache.vhost.tpl"
phpinifile="${configdir}/airtime.ini" phpinifile="${configdir}/airtime.ini"
OLDVERSION="$2" OLDVERSION="$2"
NEWVERSION="2.3.0" NEWVERSION="2.3.1"
case "$1" in case "$1" in
configure|reconfigure) configure|reconfigure)
@ -229,7 +229,7 @@ case "$1" in
echo "Upgrades from Airtime versions before 2.1.0 are not supported. Please back up your files and perform a clean install." echo "Upgrades from Airtime versions before 2.1.0 are not supported. Please back up your files and perform a clean install."
elif [ "${APACHESETUP}" == "no thanks" ]; then elif [ "${APACHESETUP}" == "no thanks" ]; then
echo "Please run the ${tmpdir}/install_minimal/airtime-install script after you have set up the web server." echo "Please run the ${tmpdir}/install_minimal/airtime-install script with the -d option after you have set up the web server."
else else

View File

@ -30,9 +30,12 @@ INSERT INTO cc_pref("keystr", "valstr") VALUES('locale', 'en_CA');
INSERT INTO cc_pref("subjid", "keystr", "valstr") VALUES(1, 'user_locale', 'en_CA'); INSERT INTO cc_pref("subjid", "keystr", "valstr") VALUES(1, 'user_locale', 'en_CA');
INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('en_CA', 'English'); INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('en_CA', 'English (Canada)');
INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('en_GB', 'English (Britain)');
INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('en_US', 'English (USA)');
INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('cs_CZ', 'Český'); INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('cs_CZ', 'Český');
INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('de_DE', 'Deutsch'); INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('de_DE', 'Deutsch');
INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('de_AT', 'Österreichisches Deutsch');
INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('es_ES', 'Español'); INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('es_ES', 'Español');
INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('fr_FR', 'Français'); INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('fr_FR', 'Français');
INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('it_IT', 'Italiano'); INSERT INTO cc_locale (locale_code, locale_lang) VALUES ('it_IT', 'Italiano');

View File

@ -17,19 +17,24 @@ DAEMON=/usr/lib/airtime/media-monitor/airtime-media-monitor
PIDFILE=/var/run/airtime-media-monitor.pid PIDFILE=/var/run/airtime-media-monitor.pid
start () { start () {
start-stop-daemon --start --background --quiet --chuid $USERID:$GROUPID --make-pidfile --pidfile $PIDFILE --startas $DAEMON start-stop-daemon --start --background --quiet --chuid $USERID:$GROUPID \
monit monitor airtime-media-monitor >/dev/null 2>&1 --make-pidfile --pidfile $PIDFILE --startas $DAEMON
} }
stop () { stop () {
# Send TERM after 5 seconds, wait at most 30 seconds. # Send TERM after 5 seconds, wait at most 30 seconds.
monit unmonitor airtime-media-monitor >/dev/null 2>&1
start-stop-daemon --stop --oknodo --retry TERM/5/0/30 --quiet --pidfile $PIDFILE start-stop-daemon --stop --oknodo --retry TERM/5/0/30 --quiet --pidfile $PIDFILE
rm -f $PIDFILE rm -f $PIDFILE
} }
start_no_monit() { start_with_monit() {
start-stop-daemon --start --background --quiet --chuid $USERID:$GROUPID --make-pidfile --pidfile $PIDFILE --startas $DAEMON start
monit monitor airtime-media-monitor >/dev/null 2>&1
}
stop_with_monit() {
monit unmonitor airtime-media-monitor >/dev/null 2>&1
stop
} }
@ -53,10 +58,16 @@ case "${1:-''}" in
start start
echo "Done." echo "Done."
;; ;;
'start-no-monit') 'start-with-monit')
# restart commands here # restart commands here
echo -n "Starting $NAME: " echo -n "Starting $NAME: "
start_no_monit start_with_monit
echo "Done."
;;
'stop-with-monit')
# restart commands here
echo -n "Stopping $NAME: "
stop_with_monit
echo "Done." echo "Done."
;; ;;
'status') 'status')

View File

@ -16,6 +16,6 @@ try:
#Start media-monitor daemon #Start media-monitor daemon
if "airtime_service_start" in os.environ and os.environ["airtime_service_start"] == "t": if "airtime_service_start" in os.environ and os.environ["airtime_service_start"] == "t":
print "* Waiting for media-monitor processes to start..." print "* Waiting for media-monitor processes to start..."
subprocess.call("invoke-rc.d airtime-media-monitor start-no-monit", shell=True) subprocess.call("invoke-rc.d airtime-media-monitor start", shell=True)
except Exception, e: except Exception, e:
print e print e

View File

@ -17,22 +17,6 @@ DAEMON=/usr/lib/airtime/pypo/bin/airtime-liquidsoap
PIDFILE=/var/run/airtime-liquidsoap.pid PIDFILE=/var/run/airtime-liquidsoap.pid
start () { start () {
start_no_monit
monit monitor airtime-liquidsoap >/dev/null 2>&1
}
stop () {
monit unmonitor airtime-liquidsoap >/dev/null 2>&1
#send term signal after 10 seconds
timeout -k 5 10 /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
rm -f $PIDFILE
sleep 3
}
start_no_monit() {
chown pypo:pypo /var/log/airtime/pypo chown pypo:pypo /var/log/airtime/pypo
chown pypo:pypo /var/log/airtime/pypo-liquidsoap chown pypo:pypo /var/log/airtime/pypo-liquidsoap
chown pypo:pypo /etc/airtime/liquidsoap.cfg chown pypo:pypo /etc/airtime/liquidsoap.cfg
@ -45,21 +29,43 @@ start_no_monit() {
--pidfile $PIDFILE --nicelevel -15 --startas $DAEMON --pidfile $PIDFILE --nicelevel -15 --startas $DAEMON
} }
stop () {
#send term signal after 10 seconds
timeout -k 5 10 /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
rm -f $PIDFILE
sleep 3
}
start_with_monit () {
start
monit monitor airtime-liquidsoap >/dev/null 2>&1
}
stop_with_monit() {
monit unmonitor airtime-liquidsoap >/dev/null 2>&1
stop
}
case "${1:-''}" in case "${1:-''}" in
'stop') 'stop')
echo -n "Stopping Liquidsoap: " echo -n "Stopping $NAME: "
stop stop
echo "Done." echo "Done."
;; ;;
'start') 'start')
echo -n "Starting Liquidsoap: " echo -n "Starting $NAME: "
start start
echo "Done." echo "Done."
;; ;;
'restart') 'restart')
# restart commands here # restart commands here
echo -n "Restarting Liquidsoap: " echo -n "Restarting $NAME: "
stop stop
start start
echo "Done." echo "Done."
@ -69,22 +75,28 @@ case "${1:-''}" in
if [ -f "$PIDFILE" ]; then if [ -f "$PIDFILE" ]; then
pid=`cat $PIDFILE` pid=`cat $PIDFILE`
if [ -d "/proc/$pid" ]; then if [ -d "/proc/$pid" ]; then
echo "Liquidsoap is running" echo "$NAME is running"
exit 0 exit 0
fi fi
fi fi
echo "Liquidsoap is not running" echo "$NAME is not running"
exit 1 exit 1
;; ;;
'start-no-monit') 'start-with-monit')
# restart commands here # restart commands here
echo -n "Starting $NAME: " echo -n "Starting $NAME: "
start_no_monit start_with_monit
echo "Done."
;;
'stop-with-monit')
# restart commands here
echo -n "Stopping $NAME: "
stop_with_monit
echo "Done." echo "Done."
;; ;;
*) # no parameter specified *) # no parameter specified
echo "Usage: $SELF start|stop|restart" echo "Usage: $SELF start|stop|restart|status"
exit 1 exit 1
;; ;;

View File

@ -10,7 +10,7 @@
### END INIT INFO ### END INIT INFO
USERID=root USERID=root
NAME="Airtime Scheduler Engine" NAME="Airtime Scheduler"
DAEMON=/usr/lib/airtime/pypo/bin/airtime-playout DAEMON=/usr/lib/airtime/pypo/bin/airtime-playout
PIDFILE=/var/run/airtime-playout.pid PIDFILE=/var/run/airtime-playout.pid
@ -18,21 +18,24 @@ PIDFILE=/var/run/airtime-playout.pid
start () { start () {
chown pypo:pypo /etc/airtime chown pypo:pypo /etc/airtime
chown pypo:pypo /etc/airtime/liquidsoap.cfg chown pypo:pypo /etc/airtime/liquidsoap.cfg
start-stop-daemon --start --background --quiet --chuid $USERID:$USERID \
start-stop-daemon --start --background --quiet --chuid $USERID:$USERID --make-pidfile --pidfile $PIDFILE --startas $DAEMON --make-pidfile --pidfile $PIDFILE --startas $DAEMON
monit monitor airtime-playout >/dev/null 2>&1
} }
stop () { stop () {
# Send TERM after 5 seconds, wait at most 30 seconds. # Send TERM after 5 seconds, wait at most 30 seconds.
monit unmonitor airtime-playout >/dev/null 2>&1
start-stop-daemon --stop --oknodo --retry TERM/5/0/30 --quiet --pidfile $PIDFILE start-stop-daemon --stop --oknodo --retry TERM/5/0/30 --quiet --pidfile $PIDFILE
rm -f $PIDFILE rm -f $PIDFILE
} }
start_no_monit() { start_with_monit() {
start-stop-daemon --start --background --quiet --chuid $USERID:$USERID --make-pidfile --pidfile $PIDFILE --startas $DAEMON start
monit monitor airtime-playout >/dev/null 2>&1
}
stop_with_monit() {
monit unmonitor airtime-playout >/dev/null 2>&1
stop
} }
case "${1:-''}" in case "${1:-''}" in
@ -55,12 +58,19 @@ case "${1:-''}" in
start start
echo "Done." echo "Done."
;; ;;
'start-no-monit') 'start-with-monit')
# restart commands here # restart commands here
echo -n "Starting $NAME: " echo -n "Starting $NAME: "
start_no_monit start_with_monit
echo "Done." echo "Done."
;; ;;
'stop-with-monit')
# restart commands here
echo -n "Stopping $NAME: "
stop_with_monit
echo "Done."
;;
'status') 'status')
# status commands here # status commands here
/usr/bin/airtime-check-system /usr/bin/airtime-check-system

View File

@ -88,8 +88,8 @@ try:
if "airtime_service_start" in os.environ and os.environ["airtime_service_start"] == "t": if "airtime_service_start" in os.environ and os.environ["airtime_service_start"] == "t":
print "* Waiting for pypo processes to start..." print "* Waiting for pypo processes to start..."
subprocess.call("invoke-rc.d airtime-playout start-no-monit > /dev/null 2>&1", shell=True) subprocess.call("invoke-rc.d airtime-playout start > /dev/null 2>&1", shell=True)
subprocess.call("invoke-rc.d airtime-liquidsoap start-no-monit > /dev/null 2>&1", shell=True) subprocess.call("invoke-rc.d airtime-liquidsoap start > /dev/null 2>&1", shell=True)
except Exception, e: except Exception, e:
print e print e