|
@@ -109,7 +109,7 @@ _get_root_by_getList() {
|
|
|
|
|
|
|
|
while true; do
|
|
while true; do
|
|
|
|
|
|
|
|
- h=$(printf "%s" "$domain" | cut -d . -f $i-100)
|
|
|
|
|
|
|
+ h=$(printf "%s" "$domain" | cut -d . -f "$i"-100)
|
|
|
_debug h "$h"
|
|
_debug h "$h"
|
|
|
if [ -z "$h" ]; then
|
|
if [ -z "$h" ]; then
|
|
|
#not valid
|
|
#not valid
|
|
@@ -123,7 +123,7 @@ _get_root_by_getList() {
|
|
|
if ! _contains "$response" "$h"; then
|
|
if ! _contains "$response" "$h"; then
|
|
|
_debug "$h not found"
|
|
_debug "$h not found"
|
|
|
else
|
|
else
|
|
|
- _sub_domain=$(printf "%s" "$domain" | cut -d . -f 1-$p)
|
|
|
|
|
|
|
+ _sub_domain=$(printf "%s" "$domain" | cut -d . -f 1-"$p")
|
|
|
_domain="$h"
|
|
_domain="$h"
|
|
|
return 0
|
|
return 0
|
|
|
fi
|
|
fi
|
|
@@ -139,12 +139,12 @@ _get_root_by_getHosts() {
|
|
|
|
|
|
|
|
while [ $p -ne 0 ]; do
|
|
while [ $p -ne 0 ]; do
|
|
|
|
|
|
|
|
- h=$(printf "%s" "$1" | cut -d . -f $i-100)
|
|
|
|
|
|
|
+ h=$(printf "%s" "$1" | cut -d . -f "$i"-100)
|
|
|
if [ -n "$h" ]; then
|
|
if [ -n "$h" ]; then
|
|
|
if _contains "$h" "\\."; then
|
|
if _contains "$h" "\\."; then
|
|
|
_debug h "$h"
|
|
_debug h "$h"
|
|
|
if _namecheap_set_tld_sld "$h"; then
|
|
if _namecheap_set_tld_sld "$h"; then
|
|
|
- _sub_domain=$(printf "%s" "$1" | cut -d . -f 1-$p)
|
|
|
|
|
|
|
+ _sub_domain=$(printf "%s" "$1" | cut -d . -f 1-"$p")
|
|
|
_domain="$h"
|
|
_domain="$h"
|
|
|
return 0
|
|
return 0
|
|
|
else
|
|
else
|
|
@@ -378,7 +378,7 @@ _namecheap_set_tld_sld() {
|
|
|
|
|
|
|
|
while true; do
|
|
while true; do
|
|
|
|
|
|
|
|
- _tld=$(printf "%s" "$domain" | cut -d . -f $i-100)
|
|
|
|
|
|
|
+ _tld=$(printf "%s" "$domain" | cut -d . -f "$i"-100)
|
|
|
_debug tld "$_tld"
|
|
_debug tld "$_tld"
|
|
|
|
|
|
|
|
if [ -z "$_tld" ]; then
|
|
if [ -z "$_tld" ]; then
|