Skip to content

Commit

Permalink
min
Browse files Browse the repository at this point in the history
  • Loading branch information
shudeshp committed Nov 8, 2024
1 parent cfc1c8b commit 996958c
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,14 @@ spec:
echo 'Waiting for PostgreSQL to start...';
sleep 2;
done;
if [[ -f /proc/sys/crypto/fips_enabled && $(< /proc/sys/crypto/fips_enabled) -eq 1 ]]; then
echo \"Using password: \\\"$POSTGRESQL_PASSWORD\\\"\";

if [ \"\$(cat /proc/sys/crypto/fips_enabled)\" -eq 1 ]; then
echo 'password_encryption = scram-sha-256' >> $PGDATA/postgresql.conf;
echo 'host all all 0.0.0.0/0 scram-sha-256' >> $PGDATA/pg_hba.conf;
pg_ctl reload;
psql -c \"ALTER SYSTEM SET password_encryption TO 'scram-sha-256';\";
psql -c \"SELECT pg_reload_conf();\";
psql -c \"ALTER USER $POSTGRESQL_USER WITH PASSWORD '$POSTGRESQL_PASSWORD';\";
fi"]
psql -c \"ALTER USER postgres WITH PASSWORD 'postgres';\";
fi
"]

0 comments on commit 996958c

Please sign in to comment.