Update db_fixer command to find and fix all pg_hba.conf files and append rules
This commit is contained in:
+2
-2
@@ -6,7 +6,7 @@ services:
|
||||
POSTGRES_USER: admin
|
||||
POSTGRES_PASSWORD: password
|
||||
POSTGRES_DB: sop_monitoring
|
||||
FORCE_RESTART: 1
|
||||
FORCE_RESTART: 2
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
@@ -19,7 +19,7 @@ services:
|
||||
volumes:
|
||||
- pgdata:/var/lib/postgresql/data
|
||||
command: >
|
||||
sh -c "sed -i 's/hostssl/host/g' /var/lib/postgresql/data/pg_hba.conf || true; sed -i 's/hostnossl/host/g' /var/lib/postgresql/data/pg_hba.conf || true; echo 'host all all all scram-sha-256' >> /var/lib/postgresql/data/pg_hba.conf; echo 'host all all all md5' >> /var/lib/postgresql/data/pg_hba.conf"
|
||||
sh -c "find /var/lib/postgresql/data -name pg_hba.conf -exec sed -i 's/hostssl/host/g' {} + || true; find /var/lib/postgresql/data -name pg_hba.conf -exec sh -c 'echo \"host all all all md5\" >> \"$1\"; echo \"host all all all scram-sha-256\" >> \"$1\"' _ {} \;"
|
||||
|
||||
|
||||
api:
|
||||
|
||||
Reference in New Issue
Block a user