diff --git a/dnsapi/dns_hosttech.sh b/dnsapi/dns_hosttech.sh index 11185c82..8e5c3e19 100644 --- a/dnsapi/dns_hosttech.sh +++ b/dnsapi/dns_hosttech.sh @@ -95,8 +95,8 @@ _get_root() { i=1 p=1 while true; do - _domain=$(printf "%s" "$domain" | cut -d . -f $i-100) - _sub_domain=$(printf "%s" "$domain" | cut -d . -f 1-$p) + _domain=$(printf "%s" "$domain" | cut -d . -f "$i"-100) + _sub_domain=$(printf "%s" "$domain" | cut -d . -f 1-"$p") _debug _domain "$_domain" if [ -z "$_domain" ]; then #not valid @@ -121,8 +121,8 @@ _get_zoneid() { i=1 p=1 while true; do - _domain=$(printf "%s" "$domain" | cut -d . -f $i-100) - _sub_domain=$(printf "%s" "$domain" | cut -d . -f 1-$p) + _domain=$(printf "%s" "$domain" | cut -d . -f "$i"-100) + _sub_domain=$(printf "%s" "$domain" | cut -d . -f 1-"$p") _debug _domain "$_domain" if [ -z "$_domain" ]; then #not valid @@ -158,7 +158,7 @@ _get_recordid() { _debug "No records in dns" return 1 fi - if ! _contains "$_response" '\"name\":\"'$subdomain'\"'; then + if ! _contains "$_response" '\"name\":\"'"$subdomain"'\"'; then _debug "Record does not exist" return 1 fi @@ -195,4 +195,4 @@ _hosttech_rest() { _debug2 response "$_response" return 0 -} \ No newline at end of file +}