From 2090f83dacb2bc78a4f85cfdad5309b7d3aa4b01 Mon Sep 17 00:00:00 2001 From: Tine Jozelj Date: Tue, 18 Jul 2023 15:53:34 +0200 Subject: [PATCH] fix: set default value --- dyndns.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dyndns.sh b/dyndns.sh index 2d34f8f..4111d15 100755 --- a/dyndns.sh +++ b/dyndns.sh @@ -16,7 +16,7 @@ die() { exit 1 } -test -f "$DIGITALOCEAN_TOKEN_FILE" && DIGITALOCEAN_TOKEN="$(cat $DIGITALOCEAN_TOKEN_FILE)" +test -f "${DIGITALOCEAN_TOKEN_FILE:-}" && DIGITALOCEAN_TOKEN="$(cat $DIGITALOCEAN_TOKEN_FILE)" test -z $DIGITALOCEAN_TOKEN && die "DIGITALOCEAN_TOKEN not set!" test -z $DOMAIN && die "DOMAIN not set!" test -z $NAME && die "NAME not set!"