File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -276,6 +276,10 @@ secretsConfiguration() {
276276 [[ " $key " == SECRETS_* ([0-9A-Z_a-z-]) ]] || continue
277277 local SECRET_KEY=" ${key# SECRETS_} "
278278 local SECRET_VAR=" ${! key} "
279+ if [[ " $SECRET_KEY " == * " _FILE" ]]; then
280+ SECRET_VAR=" $( cat " $SECRET_VAR " ) "
281+ SECRET_KEY=" ${SECRET_KEY% _FILE} "
282+ fi
279283 if [ -z " $SECRET_VAR " ]; then
280284 echo " Empty secret for key \" $SECRET_KEY \" ."
281285 fi
@@ -416,7 +420,9 @@ initialConfiguration() {
416420waitingForDatabase () {
417421 local TIMEOUT=60
418422 echo " Waiting for database server to allow connections ..."
419- while ! PGPASSWORD=" ${SECRETS_postgres_password?} " /usr/bin/pg_isready -h " $DB_HOST " -p " $DB_HOST_PORT " -U " $DB_USER " -t 1 > /dev/null 2>&1 ; do
423+ local PGPASSWORD
424+ PGPASSWORD=" $( crudini --get /etc/zulip/zulip-secrets.conf secrets postgres_password) "
425+ while ! PGPASSWORD=" $PGPASSWORD " /usr/bin/pg_isready -h " $DB_HOST " -p " $DB_HOST_PORT " -U " $DB_USER " -t 1 > /dev/null 2>&1 ; do
420426 if ! (( TIMEOUT-- )) ; then
421427 echo " Could not connect to database server. Exiting."
422428 exit 1
You can’t perform that action at this time.
0 commit comments