Merge branch 'devel' of dev.sourcefabric.org:airtime into devel

This commit is contained in:
Naomi Aro 2011-07-29 11:57:49 +02:00
commit 6a00941a0d
6 changed files with 29 additions and 6 deletions

View file

@ -28,7 +28,7 @@ sudo apt-get -y install tar gzip curl apache2 php5-pgsql libapache2-mod-php5 \
php-pear php5-gd postgresql odbc-postgresql python2.6 lame libsoundtouch-ocaml \
libvorbis-ocaml-dev libmp3lame-dev libtaglib-ocaml libao-ocaml libmad-ocaml \
libesd0 icecast2 sudo libportaudio2 libsamplerate0 libcamomile-ocaml-dev \
ecasound php5-curl mpg123 rabbitmq-server monit python-virtualenv
ecasound php5-curl mpg123 rabbitmq-server monit
if [ "$?" -ne "0" ]; then
echo ""
@ -37,6 +37,9 @@ if [ "$?" -ne "0" ]; then
exit 1
fi
#install virtualenv 1.6.3
easy_install virtualenv==1.6.3
# Install phing
sudo pear channel-discover pear.phing.info
sudo pear install phing/phing-2.4.2

Binary file not shown.

Binary file not shown.

View file

@ -10,7 +10,13 @@ SCRIPTPATH=`dirname $SCRIPT`
VIRTUAL_ENV_DIR="/usr/lib/airtime/airtime_virtualenv"
if [ ! -d "$VIRTUAL_ENV_DIR" ]; then
echo -e "\n*** Creating Vitualenv for Airtime ***"
sudo virtualenv --no-site-package -p /usr/bin/python2.6 /usr/lib/airtime/airtime_virtualenv
EXTRAOPTION=$(virtualenv --help | grep extra-search-dir)
if [ "$?" -eq "0" ]; then
sudo virtualenv --extra-search-dir=${SCRIPTPATH}/3rd_party --no-site-package -p /usr/bin/python2.6 /usr/lib/airtime/airtime_virtualenv
else
sudo virtualenv --distribute --no-site-package -p /usr/bin/python2.6 /usr/lib/airtime/airtime_virtualenv
fi
echo -e "\n*** Installing Python Libraries ***"
sudo /usr/lib/airtime/airtime_virtualenv/bin/pip install ${SCRIPTPATH}/airtime_virtual_env.pybundle -E /usr/lib/airtime/airtime_virtualenv

View file

@ -88,10 +88,12 @@ class AirtimeCheck {
if (is_numeric($numSecondsRunning) && (int)$numSecondsRunning < 3) {
self::$check_system_ok = false;
output_msg("WARNING! It looks like the $name engine is continually restarting.");
$command = "tail -10 $logFile";
exec($command, $output, $result);
foreach ($output as $line) {
output_msg($line);
if(file_exists($logFile)){
$command = "tail -10 $logFile";
exec($command, $output, $result);
foreach ($output as $line) {
output_msg($line);
}
}
}
}

View file

@ -144,6 +144,10 @@ def WatchAddAction(option, opt, value, parser):
elif(len(parser.rargs) == 0 ):
raise OptionValueError("No argument found. This option requires exactly one argument.")
path = parser.rargs[0]
if (path[0] == "/" or path[0] == "~"):
path = os.path.realpath(path)
else:
path = currentDir+path
path = path.decode('utf-8')
path = path.encode('utf-8')
if(os.path.isdir(path)):
@ -181,6 +185,10 @@ def WatchRemoveAction(option, opt, value, parser):
elif(len(parser.rargs) == 0 ):
raise OptionValueError("No argument found. This option requires exactly one argument.")
path = parser.rargs[0]
if (path[0] == "/" or path[0] == "~"):
path = os.path.realpath(path)
else:
path = currentDir+path
path = path.decode('utf-8')
path = path.encode('utf-8')
if(os.path.isdir(path)):
@ -223,6 +231,10 @@ def StorageSetAction(option, opt, value, parser):
raise OptionValueError("No argument found. This option requires exactly one argument.")
path = parser.rargs[0]
if (path[0] == "/" or path[0] == "~"):
path = os.path.realpath(path)
else:
path = currentDir+path
path = path.decode('utf-8')
path = path.encode('utf-8')
if(os.path.isdir(path)):