sintonia/python_apps/media-monitor/bin/airtime-media-monitor

20 lines
488 B
Bash
Executable File

#!/bin/bash
# Location of pypo_cli.py Python script
exec 2>&1
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/media-monitor/error.log
exit 1
fi
export LC_ALL=`cat /etc/default/locale | grep "LANG=" | cut -d= -f2 | tr -d "\n\""`
exec python /usr/lib/airtime/media-monitor/media_monitor.py > /var/log/airtime/media-monitor/py-interpreter.log 2>&1
# EOF