From 24d36b7340d6b82ea69e7c6d3349bcc5a0fe1f80 Mon Sep 17 00:00:00 2001 From: baerengraben Date: Thu, 23 Jan 2025 19:04:59 +0000 Subject: [PATCH] ShellCheck and shfmt correction --- dnsapi/dns_hosttech.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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 +}