Remove spaces from blank lines.

This commit is contained in:
Paul Koppen 2017-01-03 12:35:10 +00:00 committed by GitHub
parent b90917a529
commit 7b4be7be40

View File

@ -36,12 +36,12 @@ dns_ad_add() {
_debug _domain "$_domain" _debug _domain "$_domain"
_ad_tmpl_json="{\"domain\":$_domain_id,\"type\":\"TXT\",\"name\":\"$_sub_domain\",\"value\":\"$txtvalue\"}" _ad_tmpl_json="{\"domain\":$_domain_id,\"type\":\"TXT\",\"name\":\"$_sub_domain\",\"value\":\"$txtvalue\"}"
if _ad_rest POST "record/" "$_ad_tmpl_json" && [ -z "$response" ]; then if _ad_rest POST "record/" "$_ad_tmpl_json" && [ -z "$response" ]; then
_info "txt record updated success." _info "txt record updated success."
return 0 return 0
fi fi
return 1 return 1
} }
@ -61,7 +61,7 @@ dns_ad_rm() {
_debug "Getting txt records" _debug "Getting txt records"
_ad_rest GET "record/?domain=$_domain_id&name=$_sub_domain" _ad_rest GET "record/?domain=$_domain_id&name=$_sub_domain"
if [ -n "$response" ]; then if [ -n "$response" ]; then
record_id=$(printf "%s\n" "$response" | _egrep_o "\"id\":\s*[0-9]+" | cut -d : -f 2 | tr -d " " | _head_n 1) record_id=$(printf "%s\n" "$response" | _egrep_o "\"id\":\s*[0-9]+" | cut -d : -f 2 | tr -d " " | _head_n 1)
_debug record_id "$record_id" _debug record_id "$record_id"
@ -129,7 +129,7 @@ _ad_rest() {
_H1="Accept: application/json" _H1="Accept: application/json"
_H2="Content-Type: application/json" _H2="Content-Type: application/json"
if [ "$mtd" != "GET" ]; then if [ "$mtd" != "GET" ]; then
# both POST and DELETE. # both POST and DELETE.
_debug data "$data" _debug data "$data"