Browse Source

fix format

pull/5326/head
neil 2 months ago
parent
commit
9b2eae24d2
  1. 6
      dnsapi/dns_bunny.sh
  2. 6
      dnsapi/dns_dgon.sh
  3. 2
      dnsapi/dns_dnsimple.sh
  4. 3
      dnsapi/dns_dynv6.sh
  5. 2
      dnsapi/dns_geoscaling.sh
  6. 2
      dnsapi/dns_he.sh
  7. 4
      dnsapi/dns_internetbs.sh
  8. 2
      dnsapi/dns_maradns.sh
  9. 2
      dnsapi/dns_opnsense.sh
  10. 2
      dnsapi/dns_pdns.sh
  11. 2
      dnsapi/dns_rcode0.sh

6
dnsapi/dns_bunny.sh

@ -196,7 +196,7 @@ _get_base_domain() {
_debug2 domain_list "$domain_list"
i=1
while [ $i -gt 0 ]; do
while [ "$i" -gt 0 ]; do
## get next longest domain
_domain=$(printf "%s" "$fulldomain" | cut -d . -f "$i"-"$MAX_DOM")
## check we got something back from our cut (or are we at the end)
@ -208,7 +208,7 @@ _get_base_domain() {
## check if it exists
if [ -n "$found" ]; then
## exists - exit loop returning the parts
sub_point=$(_math $i - 1)
sub_point=$(_math "$i" - 1)
_sub_domain=$(printf "%s" "$fulldomain" | cut -d . -f 1-"$sub_point")
_domain_id="$(echo "$found" | _egrep_o "Id\"\s*\:\s*\"*[0-9]+" | _egrep_o "[0-9]+")"
_debug _domain_id "$_domain_id"
@ -218,7 +218,7 @@ _get_base_domain() {
return 0
fi
## increment cut point $i
i=$(_math $i + 1)
i=$(_math "$i" + 1)
done
if [ -z "$found" ]; then

6
dnsapi/dns_dgon.sh

@ -203,7 +203,7 @@ _get_base_domain() {
_debug2 domain_list "$domain_list"
i=1
while [ $i -gt 0 ]; do
while [ "$i" -gt 0 ]; do
## get next longest domain
_domain=$(printf "%s" "$fulldomain" | cut -d . -f "$i"-"$MAX_DOM")
## check we got something back from our cut (or are we at the end)
@ -215,14 +215,14 @@ _get_base_domain() {
## check if it exists
if [ -n "$found" ]; then
## exists - exit loop returning the parts
sub_point=$(_math $i - 1)
sub_point=$(_math "$i" - 1)
_sub_domain=$(printf "%s" "$fulldomain" | cut -d . -f 1-"$sub_point")
_debug _domain "$_domain"
_debug _sub_domain "$_sub_domain"
return 0
fi
## increment cut point $i
i=$(_math $i + 1)
i=$(_math "$i" + 1)
done
if [ -z "$found" ]; then

2
dnsapi/dns_dnsimple.sh

@ -105,7 +105,7 @@ _get_root() {
if _contains "$response" 'not found'; then
_debug "$h not found"
else
_sub_domain=$(printf "%s" "$domain" | cut -d . -f 1-"$p"revious)
_sub_domain=$(printf "%s" "$domain" | cut -d . -f 1-"$previous")
_domain="$h"
_debug _domain "$_domain"

3
dnsapi/dns_dynv6.sh

@ -43,9 +43,8 @@ dns_dynv6_add() {
_err "Something went wrong! it does not seem like the record was added successfully"
return 1
fi
return 1
fi
return 1
}
#Usage: fulldomain txtvalue
#Remove the txt record after validation.

2
dnsapi/dns_geoscaling.sh

@ -202,7 +202,7 @@ find_zone() {
# Walk through all possible zone names
strip_counter=1
while true; do
attempted_zone=$(echo "${domain}" | cut -d . -f ${strip_counter}-)
attempted_zone=$(echo "${domain}" | cut -d . -f "${strip_counter}"-)
# All possible zone names have been tried
if [ -z "${attempted_zone}" ]; then

2
dnsapi/dns_he.sh

@ -143,7 +143,7 @@ _find_zone() {
# Walk through all possible zone names
_strip_counter=1
while true; do
_attempted_zone=$(echo "$_domain" | cut -d . -f ${_strip_counter}-)
_attempted_zone=$(echo "$_domain" | cut -d . -f "${_strip_counter}"-)
# All possible zone names have been tried
if [ -z "$_attempted_zone" ]; then

4
dnsapi/dns_internetbs.sh

@ -133,7 +133,7 @@ _get_root() {
fi
while true; do
h=$(printf "%s" "$domain" | cut -d . -f ${i}-100)
h=$(printf "%s" "$domain" | cut -d . -f "${i}"-100)
_debug h "$h"
if [ -z "$h" ]; then
#not valid
@ -141,7 +141,7 @@ _get_root() {
fi
if _contains "$response" "\"$h\""; then
_sub_domain=$(printf "%s" "$domain" | cut -d . -f 1-${p})
_sub_domain=$(printf "%s" "$domain" | cut -d . -f 1-"${p}")
_domain=${h}
return 0
fi

2
dnsapi/dns_maradns.sh

@ -72,7 +72,7 @@ _reload_maradns() {
pidpath="$1"
kill -s HUP -- "$(cat "$pidpath")"
if [ $? -ne 0 ]; then
_err "Unable to reload MaraDNS, kill returned $?"
_err "Unable to reload MaraDNS, kill returned"
return 1
fi
}

2
dnsapi/dns_opnsense.sh

@ -159,7 +159,7 @@ _get_root() {
return 0
fi
p=$i
i=$(_math $i + 1)
i=$(_math "$i" + 1)
done
_debug "$domain not found"

2
dnsapi/dns_pdns.sh

@ -194,7 +194,7 @@ _get_root() {
if [ -z "$h" ]; then
return 1
fi
i=$(_math $i + 1)
i=$(_math "$i" + 1)
done
_debug "$domain not found"

2
dnsapi/dns_rcode0.sh

@ -189,7 +189,7 @@ _get_root() {
if [ -z "$h" ]; then
return 1
fi
i=$(_math $i + 1)
i=$(_math "$i" + 1)
done
_debug "no matching domain for $domain found"

Loading…
Cancel
Save