Tidied script

This commit is contained in:
Roy Kaldung 2018-08-03 13:56:28 +02:00
parent 385a2c6acb
commit c00f316946

View File

@ -77,7 +77,6 @@ dns_http_net_rm() {
_get_root() { _get_root() {
domain=$1 domain=$1
i=2 i=2
p=1
while true; do while true; do
h=$(printf "%s" "$domain" | cut -d . -f $i-100) h=$(printf "%s" "$domain" | cut -d . -f $i-100)
if [ -z "$h" ]; then if [ -z "$h" ]; then
@ -87,11 +86,9 @@ _get_root() {
_debug "Detecting if $h is the dns zone" _debug "Detecting if $h is the dns zone"
if _check_http_net_zone "$h"; then if _check_http_net_zone "$h"; then
_sub_domain=$(printf "%s" "$domain" | cut -d . -f 1-$p)
_domain="$h" _domain="$h"
return 0 return 0
fi fi
p=$i
i=$(_math "$i" + 1) i=$(_math "$i" + 1)
done done
return 1 return 1