Skip to content
Snippets Groups Projects
Commit 09a66221 authored by Stefano Alberto Russo's avatar Stefano Alberto Russo
Browse files

Fixex bug in the Postgres configuration and startup.

parent 5447b0a0
No related branches found
No related tags found
No related merge requests found
...@@ -26,27 +26,27 @@ if [ ! -d "/data/postgres/11" ]; then ...@@ -26,27 +26,27 @@ if [ ! -d "/data/postgres/11" ]; then
ln -s /data/postgres/11/main /var/lib/postgresql/11/main ln -s /data/postgres/11/main /var/lib/postgresql/11/main
# Move conf # Move conf
mv /etc/postgresql/11/main/pg_hba.conf /data/postgres #mv /etc/postgresql/11/main/pg_hba.conf /data/postgres
ln -s /data/postgres/pg_hba.conf /etc/postgresql/11/main/pg_hba.conf #ln -s /data/postgres/pg_hba.conf /etc/postgresql/11/main/pg_hba.conf
chown postgres:postgres /data/postgres/pg_hba.conf #chown postgres:postgres /data/postgres/pg_hba.conf
# Move conf # Move conf
mv /etc/postgresql/11/main/postgresql.conf /data/postgres #mv /etc/postgresql/11/main/postgresql.conf /data/postgres
ln -s /data/postgres/postgresql.conf /etc/postgresql/11/main/postgresql.conf #ln -s /data/postgres/postgresql.conf /etc/postgresql/11/main/postgresql.conf
chown postgres:postgres /data/postgres/postgresql.conf #chown postgres:postgres /data/postgres/postgresql.conf
else else
echo "Data dir does exist" echo "Data dir does exist"
mv /var/lib/postgresql/11/main /var/lib/postgresql/11/main_or mv /var/lib/postgresql/11/main /var/lib/postgresql/11/main_or
ln -s /data/postgres/11/main /var/lib/postgresql/11/main ln -s /data/postgres/11/main /var/lib/postgresql/11/main
mv /etc/postgresql/11/main/pg_hba.conf /etc/postgresql/11/main/pg_hba.conf_or #mv /etc/postgresql/11/main/pg_hba.conf /etc/postgresql/11/main/pg_hba.conf_or
ln -s /data/postgres/pg_hba.conf /etc/postgresql/11/main/pg_hba.conf #ln -s /data/postgres/pg_hba.conf /etc/postgresql/11/main/pg_hba.conf
chown postgres:postgres /data/postgres/pg_hba.conf #chown postgres:postgres /data/postgres/pg_hba.conf
mv /etc/postgresql/11/main/postgresql.conf /etc/postgresql/11/main/postgresql.conf_or #mv /etc/postgresql/11/main/postgresql.conf /etc/postgresql/11/main/postgresql.conf_or
ln -s /data/postgres/postgresql.conf /etc/postgresql/11/main/postgresql.conf #ln -s /data/postgres/postgresql.conf /etc/postgresql/11/main/postgresql.conf
chown postgres:postgres /data/postgres/postgresql.conf #chown postgres:postgres /data/postgres/postgresql.conf
fi fi
...@@ -80,7 +80,7 @@ if [ ! -f /data/postgres/configured_flag ]; then ...@@ -80,7 +80,7 @@ if [ ! -f /data/postgres/configured_flag ]; then
echo "PID=$PID" echo "PID=$PID"
# Wait for postgres to become ready (should be improved) # Wait for postgres to become ready (should be improved)
sleep 5 sleep 10
echo 'Creating user/db...' echo 'Creating user/db...'
# Execute sql commands for rosetta user/db # Execute sql commands for rosetta user/db
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment