Skip to content

Commit

Permalink
Fixed skupperproject#133: ensure no unbound variables
Browse files Browse the repository at this point in the history
  • Loading branch information
fgiorgetti committed Mar 8, 2022
1 parent 454942e commit aa14921
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ function printConfig() {
echo "---------------------------------------" && cat $OUTFILE && echo "---------------------------------------"
}

if [[ $QDROUTERD_CONF =~ .*\{.*\}.* ]]; then
if [[ ${QDROUTERD_CONF:-} =~ .*\{.*\}.* ]]; then
# env var contains inline config
echo "$QDROUTERD_CONF" > $OUTFILE
elif [[ -n $QDROUTERD_CONF ]]; then
elif [[ -n ${QDROUTERD_CONF:-} ]]; then
# treat as path(s)
IFS=':,' read -r -a array <<< "$QDROUTERD_CONF"
> $OUTFILE
Expand All @@ -56,10 +56,10 @@ if [ -f $OUTFILE ]; then
python3 $HOME_DIR/bin/expandvars.py $OUTFILE
fi

if [ -n "$QDROUTERD_AUTO_MESH_DISCOVERY" ]; then
if [ -n "${QDROUTERD_AUTO_MESH_DISCOVERY:-}" ]; then
python3 $HOME_DIR/bin/auto_mesh.py $OUTFILE || printConfig
fi

if [ -n "$QDROUTERD_AUTO_CREATE_SASLDB_SOURCE" ]; then
if [ -n "${QDROUTERD_AUTO_CREATE_SASLDB_SOURCE:-}" ]; then
$HOME_DIR/bin/create_sasldb.sh ${QDROUTERD_AUTO_CREATE_SASLDB_PATH:-$HOME_DIR/etc/qdrouterd.sasldb} $QDROUTERD_AUTO_CREATE_SASLDB_SOURCE "${APPLICATION_NAME:-qdrouterd}"
fi

0 comments on commit aa14921

Please sign in to comment.