From e472f87976f95d82046870c947087a984ce46ad2 Mon Sep 17 00:00:00 2001 From: Alan Peabody Date: Wed, 19 Mar 2014 11:24:12 -0400 Subject: [PATCH] All locale reqs to postgres script. --- scripts/postgresql.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/scripts/postgresql.sh b/scripts/postgresql.sh index 6d97e22..c792d74 100644 --- a/scripts/postgresql.sh +++ b/scripts/postgresql.sh @@ -1,3 +1,24 @@ +# Set up locals + +if [ ! -f /etc/profile.d/lang.sh ] ; then + touch /etc/profile.d/lang.sh +fi + +if grep -lq 'en_US.UTF-8' /etc/profile.d/lang.sh ; then + echo 'Locals set up' +else + echo 'export LANGUAGE="en_US.UTF-8"' >> /etc/profile.d/lang.sh + echo 'export LANG="en_US.UTF-8"' >> /etc/profile.d/lang.sh + echo 'export LC_ALL="en_US.UTF-8"' >> /etc/profile.d/lang.sh + + locale-gen en_US.UTF-8 + dpkg-reconfigure locales +fi + +export LANGUAGE="en_US.UTF-8" +export LANG="en_US.UTF-8" +export LC_ALL="en_US.UTF-8" + # Install postgres apt-get install -y postgresql libpq-dev postgresql-contrib