]> git.proxmox.com Git - mirror_acme.sh.git/blobdiff - dnsapi/dns_namesilo.sh
fix: fix shellcheck
[mirror_acme.sh.git] / dnsapi / dns_namesilo.sh
index 15e4f21d96620b74391f49726ed5a01ecc26d5c8..f961d0bd118232529b9916cbfd74c558d22e8612 100755 (executable)
@@ -60,8 +60,8 @@ dns_namesilo_rm() {
     retcode=$(printf "%s\n" "$response" | _egrep_o "<code>300")
     if [ "$retcode" ]; then
       _record_id=$(echo "$response" | _egrep_o "<record_id>([^<]*)</record_id><type>TXT</type><host>$fulldomain</host>" | _egrep_o "<record_id>([^<]*)</record_id>" | sed -r "s/<record_id>([^<]*)<\/record_id>/\1/" | tail -n 1)
-      _debug record_id "$_record_id"
-      if [ "$record_id" ]; then
+      _debug _record_id "$_record_id"
+      if [ "$_record_id" ]; then
         _info "Successfully retrieved the record id for ACME challenge."
       else
         _info "Empty record id, it seems no such record."
@@ -110,7 +110,7 @@ _get_root() {
       return 1
     fi
 
-    if _contains "$response" "$host"; then
+    if _contains "$response" ">$host</domain>"; then
       _sub_domain=$(printf "%s" "$domain" | cut -d . -f 1-$p)
       _domain="$host"
       return 0