|
@ -2,8 +2,19 @@ |
|
|
|
|
|
|
|
|
set -eux # -x for verbose logging to juju debug-log |
|
|
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 <<EOF > /etc/cron.d/pgbackup |
|
|
cat <<EOF > /etc/cron.d/pgbackup |
|
|
|
|
|
|
|
@ -32,7 +43,7 @@ EOF |
|
|
|
|
|
|
|
|
## XXXvlab: Shouldn't we use ldap to create a key for each client and |
|
|
## XXXvlab: Shouldn't we use ldap to create a key for each client and |
|
|
## remove the clear password from here ? |
|
|
## 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 |
|
|
## add this to pghba |
|
|