Browse Source

Fix style issues

pull/2455/head
Rolph Haspers 5 years ago
parent
commit
54b38086e5
  1. 4
      dnsapi/dns_leaseweb.sh

4
dnsapi/dns_leaseweb.sh

@ -109,7 +109,7 @@ _lsw_api() {
export _H2="Content-Type: application/json" export _H2="Content-Type: application/json"
export _H1="X-Lsw-Auth: ${LSW_Key}" export _H1="X-Lsw-Auth: ${LSW_Key}"
if [ "$cmd" == "POST" ]; then
if [ "$cmd" = "POST" ]; then
data="{\"name\": \"$fulldomain.\",\"type\": \"TXT\",\"content\": [\"$txtvalue\"],\"ttl\": 60}" data="{\"name\": \"$fulldomain.\",\"type\": \"TXT\",\"content\": [\"$txtvalue\"],\"ttl\": 60}"
response="$(_post "$data" "$LSW_API/$domain/resourceRecordSets" "$data" "POST")" response="$(_post "$data" "$LSW_API/$domain/resourceRecordSets" "$data" "POST")"
_code="$(grep "^HTTP" "$HTTP_HEADER" | _tail_n 1 | cut -d " " -f 2 | tr -d "\\r\\n")" _code="$(grep "^HTTP" "$HTTP_HEADER" | _tail_n 1 | cut -d " " -f 2 | tr -d "\\r\\n")"
@ -118,7 +118,7 @@ _lsw_api() {
return 0 return 0
fi fi
if [ "$cmd" == "DELETE" ]; then
if [ "$cmd" = "DELETE" ]; then
response="$(_post "" "$LSW_API/$domain/resourceRecordSets/$fulldomain/TXT" "" "DELETE")" response="$(_post "" "$LSW_API/$domain/resourceRecordSets/$fulldomain/TXT" "" "DELETE")"
_code="$(grep "^HTTP" "$HTTP_HEADER" | _tail_n 1 | cut -d " " -f 2 | tr -d "\\r\\n")" _code="$(grep "^HTTP" "$HTTP_HEADER" | _tail_n 1 | cut -d " " -f 2 | tr -d "\\r\\n")"
_debug "http response code $_code" _debug "http response code $_code"

Loading…
Cancel
Save