tolerate unset

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

View File

@ -254,6 +254,7 @@ then
# Create the default demobank. # Create the default demobank.
echo -n "Configuring sandbox at ${LIBEUFIN_SANDBOX_DB_CONNECTION} " echo -n "Configuring sandbox at ${LIBEUFIN_SANDBOX_DB_CONNECTION} "
libeufin-sandbox reset-tables
libeufin-sandbox config \ libeufin-sandbox config \
--currency "$CURRENCY" \ --currency "$CURRENCY" \
--users-debt-limit 99999999 \ --users-debt-limit 99999999 \
@ -344,13 +345,14 @@ then
# to the exchange. # to the exchange.
LIBEUFIN_NEXUS_DB_CONNECTION=$(taler-config -c "$CONF" -s "libeufin-nexus" -o "DB_CONNECTION") LIBEUFIN_NEXUS_DB_CONNECTION=$(taler-config -c "$CONF" -s "libeufin-nexus" -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_NEXUS_DB_CONNECTION=$(echo $LIBEUFIN_NEXUS_DB_CONNECTION | sed -e "s/\/var\/run\/postgresql/$EHOST/") LIBEUFIN_NEXUS_DB_CONNECTION=$(echo $LIBEUFIN_NEXUS_DB_CONNECTION | sed -e "s/\/var\/run\/postgresql/$EHOST/")
taler-config -c "$CONF" -s "libeufin-nexus" -o "DB_CONNECTION" -V "$LIBEUFIN_NEXUS_DB_CONNECTION" taler-config -c "$CONF" -s "libeufin-nexus" -o "DB_CONNECTION" -V "$LIBEUFIN_NEXUS_DB_CONNECTION"
fi fi
export LIBEUFIN_NEXUS_DB_CONNECTION export LIBEUFIN_NEXUS_DB_CONNECTION
libeufin-nexus reset-tables
# For convenience, username and password are # For convenience, username and password are
# identical to those used at the Sandbox. # identical to those used at the Sandbox.