This commit is contained in:
Bernhard Radermacher
2026-02-24 10:48:49 +01:00
parent 314194a6dd
commit 8192995782
4 changed files with 50 additions and 2 deletions

View File

@@ -4,6 +4,30 @@ set -Eeo pipefail
sudo service ssh start
{
printf "listen_addresses = '*'\n"
printf "port = 5432\n"
printf "unix_socket_directories = '/run'\n"
printf "pcp_socket_dir = '/run'\n"
printf "enable_pool_hba = off\n"
printf "allow_clear_text_frontend_auth = on\n"
printf "process_management_mode = 'dynamic'\n"
printf "backend_clustering_mode = 'raw'\n"
printf "health_check_timeout = 5\n"
printf "health_check_period = 5\n"
printf "health_check_user = 'pgpool'\n"
printf "health_check_password = '%s'\n" "$PGPOOL_PASSWORD"
IFS=':'
n=0
for backend in $PGPOOL_BACKEND
do
printf "backend_hostname%d = '%s'\n" $n $backend
printf "backend_port%d = 5432\n" $n
n=n + 1
done
} >> /etc/pgpool2/pgpool.conf
sudo service pgpool2 start
while true