From ac119fb82b7e2b52b6b0ed79f398d6c88cfb1d61 Mon Sep 17 00:00:00 2001 From: Arjan H Date: Sat, 8 Nov 2025 14:35:42 +0100 Subject: [PATCH] Try to prevent emtpy fqdn setting (#203) --- control.sh | 2 +- control_do.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/control.sh b/control.sh index 10b7c16..fd0ee3a 100755 --- a/control.sh +++ b/control.sh @@ -8,7 +8,7 @@ get_fqdn() { file_fqdn=$(grep fqdn /opt/labca/data/config.json 2>/dev/null | cut -d ":" -f 2- | tr -d " \",") fi if [ "$file_fqdn" == "" ]; then - if [ "$LABCA_FQDN" == "notset" ]; then + if [ "$LABCA_FQDN" == "notset" ] || [ "$LABCA_FQDN" == "" ]; then echo "ERROR: environment variable LABCA_FQDN is not set!" exit 1 else diff --git a/control_do.sh b/control_do.sh index d0980d9..dd2206d 100755 --- a/control_do.sh +++ b/control_do.sh @@ -8,7 +8,7 @@ get_fqdn() { file_fqdn=$(grep fqdn /opt/labca/data/config.json 2>/dev/null | cut -d ":" -f 2- | tr -d " \",") fi if [ "$file_fqdn" == "" ]; then - if [ "$LABCA_FQDN" == "notset" ]; then + if [ "$LABCA_FQDN" == "notset" ] || [ "$LABCA_FQDN" == "" ]; then echo "ERROR: environment variable LABCA_FQDN is not set!" exit 1 else