Browse Source

Removed 'head -n 1'

pull/1691/head
Ondřej Budín 7 years ago
parent
commit
1a17736f9e
  1. 2
      dnsapi/dns_wedos.sh

2
dnsapi/dns_wedos.sh

@ -123,7 +123,7 @@ _wedos_get_record_id() {
fi fi
if _contains "$row" "\"name\":\"$sub_domain\"" >/dev/null && _contains "$row" "\"rdata\":\"$r_data\"" >/dev/null; then if _contains "$row" "\"name\":\"$sub_domain\"" >/dev/null && _contains "$row" "\"rdata\":\"$r_data\"" >/dev/null; then
_record_id=$(printf "%s" "$row" | _egrep_o "\[*\"ID\":\"[^\"]*\"" | head -n 1 | cut -d : -f 2 | tr -d \")
_record_id=$(printf "%s" "$row" | _egrep_o "\[*\"ID\":\"[^\"]*\"" | cut -d : -f 2 | tr -d \")
if [ "$_record_id" ]; then if [ "$_record_id" ]; then
_info "$WEDOS_PREFIX OK." _info "$WEDOS_PREFIX OK."
return 0 return 0

Loading…
Cancel
Save