From 582ddb9308ea3e43608b4696caf1c431f8be5b13 Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Fri, 11 Apr 2014 16:49:02 +0200 Subject: [PATCH] new: [postgres] compatibility with trusty images. --- precise/postgres/hooks/install | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/precise/postgres/hooks/install b/precise/postgres/hooks/install index 37f13ad..ff6178a 100755 --- a/precise/postgres/hooks/install +++ b/precise/postgres/hooks/install @@ -2,8 +2,19 @@ set -eux # -x for verbose logging to juju debug-log +## 0k git remote options +GIT_0K_CLONE_OPTIONS=${GIT_0K_CLONE_OPTIONS:-""} -apt-get install -y --force-yes postgresql-9.1 cron kal-scripts +## 0k git remote path +GIT_0K_BASE=${GIT_0K_BASE:-"git.0k.io:/var/git"} + +apt-get install -y --force-yes cron kal-scripts + +if [ "$(lsb_release -c -s)" == "trusty" ]; then + apt-get install -y --force-yes postgresql-9.3 +else + apt-get install -y --force-yes postgresql-9.1 +fi cat < /etc/cron.d/pgbackup @@ -32,7 +43,7 @@ EOF ## XXXvlab: Shouldn't we use ldap to create a key for each client and ## remove the clear password from here ? -echo "CREATE USER openerp WITH PASSWORD 'jw8s0F4' CREATEDB NOCREATEROLE;" | sudo -u postgres psql +#echo "CREATE USER openerp WITH PASSWORD 'xxxx' CREATEDB NOCREATEROLE;" | sudo -u postgres psql ## add this to pghba