wip
This commit is contained in:
@@ -27,13 +27,10 @@ docker_setup_env() {
|
|||||||
file_env 'POSTGRES_PGPOOL_PASSWORD'
|
file_env 'POSTGRES_PGPOOL_PASSWORD'
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "$(id -u)" = '0' ]; then
|
|
||||||
exec gosu postgres "$BASH_SOURCE"
|
|
||||||
fi
|
|
||||||
|
|
||||||
install --directory --owner postgres --group postgres --mode 700 /var/lib/postgresql/.ssh
|
install --directory --owner postgres --group postgres --mode 700 /var/lib/postgresql/.ssh
|
||||||
cp /ssh/* /var/lib/postgresql/.ssh/
|
cp /ssh/* /var/lib/postgresql/.ssh/
|
||||||
chmod 600 /var/lib/postgresql/.ssh/*
|
chmod 600 /var/lib/postgresql/.ssh/*
|
||||||
|
chown postgres:postgres /var/lib/postgresql/.ssh/*
|
||||||
|
|
||||||
docker_setup_env
|
docker_setup_env
|
||||||
|
|
||||||
@@ -48,9 +45,6 @@ docker_setup_env
|
|||||||
} > ~/.pcppass
|
} > ~/.pcppass
|
||||||
chmod 600 /etc/pgpool2/pcp.conf ~/.pcppass
|
chmod 600 /etc/pgpool2/pcp.conf ~/.pcppass
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
printf "listen_addresses = '*'\n"
|
printf "listen_addresses = '*'\n"
|
||||||
printf "port = 5432\n"
|
printf "port = 5432\n"
|
||||||
@@ -76,8 +70,8 @@ chmod 600 /etc/pgpool2/pcp.conf ~/.pcppass
|
|||||||
} > /etc/pgpool2/pgpool.conf
|
} > /etc/pgpool2/pgpool.conf
|
||||||
|
|
||||||
|
|
||||||
sudo service ssh start
|
service ssh start
|
||||||
sudo /usr/sbin/pgpool
|
/usr/sbin/pgpool
|
||||||
|
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
|
|||||||
Reference in New Issue
Block a user