]> git.ipfire.org Git - thirdparty/dehydrated.git/commitdiff
fixed undefined-variable bug on early connection failure (while accessing ca directory)
authorLukas Schauer <lukas@schauer.so>
Thu, 22 Feb 2018 21:22:04 +0000 (22:22 +0100)
committerLukas Schauer <lukas@schauer.so>
Thu, 22 Feb 2018 21:22:04 +0000 (22:22 +0100)
dehydrated

index b9d72f01a882c36293a1657d373ffcb938b0c4a7..c81d73a1e4e7e32d535d114ebc34c0718087c6f9 100755 (executable)
@@ -520,7 +520,7 @@ http_request() {
 
   if [[ ! "${statuscode:0:1}" = "2" ]]; then
     # check for existing registration warning
-    if [[ ${API} -eq 1 ]] && [[ -n "${CA_NEW_REG:-}" ]] && [[ "${2}" = "${CA_NEW_REG:-}" ]] && [[ "${statuscode}" = "409" ]] && grep -q "Registration key is already in use" "${tempcont}"; then
+    if [[ "${API}" = "1" ]] && [[ -n "${CA_NEW_REG:-}" ]] && [[ "${2}" = "${CA_NEW_REG:-}" ]] && [[ "${statuscode}" = "409" ]] && grep -q "Registration key is already in use" "${tempcont}"; then
       # do nothing
       :
     # check for already-revoked warning