Use file secrets where necessary

This commit is contained in:
Clemens Geibel 2020-11-19 15:26:20 +01:00
parent d9519c698d
commit bcd04af38b

View file

@ -1,5 +1,5 @@
#!/bin/bash
echo "${POSTGRES_HOST}:${POSTGRES_DB}:${POSTGRES_USER}:${DB_PASSWORD}" > /root/.pg_pass
echo "${POSTGRES_HOST}:template1:${POSTGRES_USER}:${DB_PASSWORD}" >> /root/.pg_pass
echo "${POSTGRES_HOST}:$(cat ${POSTGRES_DB_FILE}):$(cat ${POSTGRES_USER_FILE}):$(cat ${DB_PASSWORD_FILE})" > /root/.pg_pass
echo "${POSTGRES_HOST}:template1:$(cat ${POSTGRES_USER_FILE}):$(cat ${DB_PASSWORD_FILE})" >> /root/.pg_pass
chmod 0600 /root/.pg_pass