tolerate unset

This commit is contained in:
Christian Grothoff 2023-07-23 14:49:10 +02:00
parent d189fccd79
commit baef188ed0
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC

View File

@ -244,7 +244,7 @@ if [ "1" = "$START_SANDBOX" ]
then then
# #
LIBEUFIN_SANDBOX_DB_CONNECTION=$(taler-config -c "$CONF" -s "libeufin-sandbox" -o "DB_CONNECTION") LIBEUFIN_SANDBOX_DB_CONNECTION=$(taler-config -c "$CONF" -s "libeufin-sandbox" -o "DB_CONNECTION")
if [ ! -z "$PGHOST" ] if [ ! -z "${PGHOST:+}" ]
then then
EHOST=$(echo $PGHOST | sed -e "s/\//\\\\\//g") EHOST=$(echo $PGHOST | sed -e "s/\//\\\\\//g")
LIBEUFIN_SANDBOX_DB_CONNECTION=$(echo $LIBEUFIN_SANDBOX_DB_CONNECTION | sed -e "s/\/var\/run\/postgresql/$EHOST/") LIBEUFIN_SANDBOX_DB_CONNECTION=$(echo $LIBEUFIN_SANDBOX_DB_CONNECTION | sed -e "s/\/var\/run\/postgresql/$EHOST/")