From 49cfb3336e84503d286ab9f77ca74cfffa8ee6f1 Mon Sep 17 00:00:00 2001 From: Hazmi Alfarizqi Date: Wed, 9 Oct 2024 22:09:46 +0700 Subject: [PATCH] fix(initdb): fix conf dir --- initdb/000_alter_owner_temp.sh | 2 +- initdb/999_alter_owner_temp_revert.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/initdb/000_alter_owner_temp.sh b/initdb/000_alter_owner_temp.sh index 5c223d6..04ad954 100755 --- a/initdb/000_alter_owner_temp.sh +++ b/initdb/000_alter_owner_temp.sh @@ -19,7 +19,7 @@ if [ $POSTGRES_USER != "postgres" ]; then fi # Find "timescaledb.telemetry_level" in the postgresql.conf file - if grep -q "timescaledb.telemetry_level" /bitnami/postgresql/conf/postgresql.conf; then + if grep -q "timescaledb.telemetry_level" ${POSTGRESQL_CONF_DIR}/postgresql.conf; then # Change the owner of the initial databases to the POSTGRES_USER psql -U postgres postgres -f "ALTER DATABASE postgres OWNER TO $POSTGRES_USER;" psql -U postgres template1 -f "ALTER DATABASE template1 OWNER TO $POSTGRES_USER;" diff --git a/initdb/999_alter_owner_temp_revert.sh b/initdb/999_alter_owner_temp_revert.sh index 252331b..df6a0b2 100755 --- a/initdb/999_alter_owner_temp_revert.sh +++ b/initdb/999_alter_owner_temp_revert.sh @@ -19,7 +19,7 @@ if [ $POSTGRES_USER != "postgres" ]; then fi # Find "timescaledb.telemetry_level" in the postgresql.conf file - if grep -q "timescaledb.telemetry_level" /bitnami/postgresql/conf/postgresql.conf; then + if grep -q "timescaledb.telemetry_level" ${POSTGRESQL_CONF_DIR}/postgresql.conf; then # Change the owner of the initial databases to the POSTGRES_USER psql -U postgres postgres -f "ALTER DATABASE postgres OWNER TO postgres;" psql -U postgres template1 -f "ALTER DATABASE template1 OWNER TO postgres;"