start.sh: Generate locales properly

This commit is contained in:
David Duque 2020-08-10 03:07:45 +01:00
parent 3d9f0e2135
commit 24c5d54f49
No known key found for this signature in database
GPG key ID: 2F327738A3C0AE3A

View file

@ -14,9 +14,14 @@ source setup/preflight.sh
# Python may not be able to read/write files. This is also # Python may not be able to read/write files. This is also
# in the management daemon startup script and the cron script. # in the management daemon startup script and the cron script.
# Make sure we have locales at all (some images are THAT minimal)
apt_get_quiet install locales
if ! locale -a | grep en_US.utf8 > /dev/null; then if ! locale -a | grep en_US.utf8 > /dev/null; then
echo "Generating locales..."
# Generate locale if not exists # Generate locale if not exists
hide_output locale-gen en_US.UTF-8 echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
hide_output locale-gen
fi fi
export LANGUAGE=en_US.UTF-8 export LANGUAGE=en_US.UTF-8