Skip to content

Commit a4aa197

Browse files
committed
fix: refactor gen-pass, remove Nix escaping
Signed-off-by: Chris Gianelloni <[email protected]>
1 parent 3f54cdd commit a4aa197

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

bin/gen-pgpass

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/usr/bin/env bash
22

3-
SECRET_DIR=$1
4-
echo $SECRET_DIR
3+
__dir=${1}
4+
echo ${__dir}
55
echo "Generating PGPASS file"
6-
POSTGRES_DB=''${POSTGRES_DB:-$(< ''${SECRET_DIR}/postgres_db)}
7-
POSTGRES_USER=''${POSTGRES_USER:-$(< ''${SECRET_DIR}/postgres_user)}
8-
POSTGRES_PASSWORD=''${POSTGRES_PASSWORD:-$(< ''${SECRET_DIR}/postgres_password)}
9-
echo "''${POSTGRES_HOST}:''${POSTGRES_PORT}:''${POSTGRES_DB}:''${POSTGRES_USER}:''${POSTGRES_PASSWORD}" > /configuration/pgpass
6+
POSTGRES_DB=${POSTGRES_DB:-$(< ${__dir}/postgres_db)}
7+
POSTGRES_USER=${POSTGRES_USER:-$(< ${__dir}/postgres_user)}
8+
POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-$(< ${__dir}/postgres_password)}
9+
echo "${POSTGRES_HOST}:${POSTGRES_PORT}:${POSTGRES_DB}:${POSTGRES_USER}:${POSTGRES_PASSWORD}" > /configuration/pgpass
1010
chmod 0600 /configuration/pgpass

0 commit comments

Comments
 (0)