From 906809cee57cf78b1fa50213e19ec177b1563d6a Mon Sep 17 00:00:00 2001 From: Georg SCHLAGHOLZ Date: Tue, 7 Oct 2025 11:11:33 +0200 Subject: [PATCH] Fixes bug that does not detect empty variables since the switch to jq --- hashicorp-vault/renew-ssh-host-certificate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hashicorp-vault/renew-ssh-host-certificate.sh b/hashicorp-vault/renew-ssh-host-certificate.sh index 1fe00f3..c1168e3 100755 --- a/hashicorp-vault/renew-ssh-host-certificate.sh +++ b/hashicorp-vault/renew-ssh-host-certificate.sh @@ -24,7 +24,7 @@ hostRole=$( jq -r .hostRole "$config_file" ) appRole=$( jq -r .appRole "$config_file" ) # Ensure variables are set -if [[ -z "$server" || -z "$appRole" || -z "$roleid" || -z "$sshEnginePath" || -z "$hostRole" ]]; then +if [[ "$server" == "null" || "$appRole" == "null" || "$roleid" == "null" || "$sshEnginePath" == "null" || "$hostRole" == "null" ]]; then echo "Error: One or more variables are not set in the configuration file!" exit 3 fi