Commit e2accaf7 authored by neil's avatar neil Committed by GitHub
Browse files

Merge pull request #925 from raidenii/master

Fix for Name.com API
parents bb4d3787 7b32bbfc
......@@ -168,9 +168,15 @@ _namecom_get_root() {
i=2
p=1
if _namecom_rest GET "domain/list"; then
while true; do
if ! _namecom_rest GET "domain/list"; then
return 1
fi
# Need to exclude the last field (tld)
numfields=$(echo "$domain" | _egrep_o "\." | wc -l)
while [ $i -le "$numfields" ]; do
host=$(printf "%s" "$domain" | cut -d . -f $i-100)
_debug host "$host"
if [ -z "$host" ]; then
return 1
fi
......@@ -183,6 +189,5 @@ _namecom_get_root() {
p=$i
i=$(_math "$i" + 1)
done
fi
return 1
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment