Browse Source

[Microwavenby--dns_hostinger] Correcting shellcheck. Why is this not automatic?

pull/6843/head
Sasha Reid 2 weeks ago
parent
commit
0a0ab505a2
  1. 6
      dnsapi/dns_hostinger.sh

6
dnsapi/dns_hostinger.sh

@ -10,7 +10,6 @@ Issues: https://github.com/acmesh-official/acme.sh/issues/6831
Author: Sasha Reid <github@sasha.hackl.es> Author: Sasha Reid <github@sasha.hackl.es>
' '
HOSTINGER_Api="https://developers.hostinger.com/api/dns/v1/zones" HOSTINGER_Api="https://developers.hostinger.com/api/dns/v1/zones"
######## Public functions ##################### ######## Public functions #####################
@ -30,7 +29,6 @@ dns_hostinger_add() {
fi fi
_saveaccountconf_mutable HOSTINGER_Token "$HOSTINGER_Token" _saveaccountconf_mutable HOSTINGER_Token "$HOSTINGER_Token"
_debug "First detect the root zone" _debug "First detect the root zone"
if ! _get_root "$fulldomain"; then if ! _get_root "$fulldomain"; then
_err "invalid domain" _err "invalid domain"
@ -92,7 +90,7 @@ dns_hostinger_rm() {
return 1 return 1
fi fi
if _contains $response "\"name\":\"$_sub_domain\""; then
if _contains "$response" "\"name\":\"$_sub_domain\""; then
if ! _hostinger_rest DELETE "$_domain" "{\"filters\":[{\"name\":\"$_sub_domain\",\"type\":\"TXT\"}]}"; then if ! _hostinger_rest DELETE "$_domain" "{\"filters\":[{\"name\":\"$_sub_domain\",\"type\":\"TXT\"}]}"; then
_err "Delete record error." _err "Delete record error."
return 1 return 1
@ -123,7 +121,7 @@ _get_root() {
fi fi
_hostinger_rest GET "$h" _hostinger_rest GET "$h"
if ! _contains "$response" "Domain name is not valid" ; then
if ! _contains "$response" "Domain name is not valid"; then
if [ "$response" = "[]" ]; then if [ "$response" = "[]" ]; then
_debug "Valid subdomains are not the root" _debug "Valid subdomains are not the root"
else else

Loading…
Cancel
Save