CC-3791: Media Monitor crash when there are media files with non-ascii name in watched folder
-override LC_ALL=POSIX that happens on system bootup
This commit is contained in:
parent
c24a8a2308
commit
92931f662f
2 changed files with 9 additions and 1 deletions
|
@ -185,6 +185,14 @@ if [ "$DO_UPGRADE" -eq "0" ]; then
|
||||||
fi
|
fi
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
echo "* Making sure /etc/default/locale is set properly"
|
||||||
|
update-locale
|
||||||
|
cat /etc/default/locale | grep -i "LANG=.*UTF-\?8"
|
||||||
|
if [ "$?" != "0" ]; then
|
||||||
|
echo "non UTF-8 default locale found in /etc/default/locale.".PHP_EOL;
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
$SCRIPTPATH/include/airtime-copy-files.sh
|
$SCRIPTPATH/include/airtime-copy-files.sh
|
||||||
$SCRIPTPATH/include/airtime-initialize.sh $@
|
$SCRIPTPATH/include/airtime-initialize.sh $@
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ cd ${media_monitor_path}
|
||||||
exec 2>&1
|
exec 2>&1
|
||||||
|
|
||||||
export PYTHONPATH=${api_client_path}
|
export PYTHONPATH=${api_client_path}
|
||||||
export LC_ALL=`cat /etc/default/locale | grep "LANG=" | cut -d= -f2`
|
export LC_ALL=`cat /etc/default/locale | grep "LANG=" | cut -d= -f2 | tr -d "\n\""`
|
||||||
|
|
||||||
# Note the -u when calling python! we need it to get unbuffered binary stdout and stderr
|
# Note the -u when calling python! we need it to get unbuffered binary stdout and stderr
|
||||||
exec python -u ${media_monitor_path}${media_monitor_script} > /var/log/airtime/media-monitor/py-interpreter.log 2>&1
|
exec python -u ${media_monitor_path}${media_monitor_script} > /var/log/airtime/media-monitor/py-interpreter.log 2>&1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue