2012-05-15 01:53:07 +02:00
|
|
|
#!/bin/bash
|
2011-05-31 00:55:52 +02:00
|
|
|
|
2011-07-19 21:06:35 +02:00
|
|
|
virtualenv_bin="/usr/lib/airtime/airtime_virtualenv/bin/"
|
2011-07-18 23:04:46 +02:00
|
|
|
. ${virtualenv_bin}activate
|
|
|
|
|
2013-03-22 17:16:17 +01:00
|
|
|
# Absolute path to this script
|
|
|
|
SCRIPT=`readlink -f $0`
|
|
|
|
# Absolute directory this script is in
|
|
|
|
pypo_path=`dirname $SCRIPT`
|
2011-05-31 00:55:52 +02:00
|
|
|
|
2011-07-19 18:07:31 +02:00
|
|
|
api_client_path="/usr/lib/airtime/"
|
2012-03-01 23:58:44 +01:00
|
|
|
pypo_script="pypocli.py"
|
2011-05-31 00:55:52 +02:00
|
|
|
cd ${pypo_path}
|
|
|
|
|
2012-05-15 01:46:53 +02:00
|
|
|
set +e
|
|
|
|
cat /etc/default/locale | grep -i "LANG=.*UTF-\?8"
|
|
|
|
set -e
|
|
|
|
if [ "$?" != "0" ]; then
|
|
|
|
echo "non UTF-8 default locale found in /etc/default/locale." > /var/log/airtime/pypo/error.log
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2011-05-31 00:55:52 +02:00
|
|
|
export HOME="/var/tmp/airtime/pypo/"
|
|
|
|
export PYTHONPATH=${api_client_path}:$PYTHONPATH
|
2012-05-15 01:19:35 +02:00
|
|
|
export LC_ALL=`cat /etc/default/locale | grep "LANG=" | cut -d= -f2 | tr -d "\n\""`
|
2012-06-05 19:07:59 +02:00
|
|
|
export TERM=xterm
|
2011-05-31 00:55:52 +02:00
|
|
|
|
2012-08-28 21:00:02 +02:00
|
|
|
|
2013-03-22 17:16:17 +01:00
|
|
|
exec python ${pypo_path}/${pypo_script} > /var/log/airtime/pypo/py-interpreter.log 2>&1
|
2011-06-01 00:55:22 +02:00
|
|
|
|
2011-05-31 00:55:52 +02:00
|
|
|
# EOF
|