if ! _rest POST "domain/dns/""act=dnsrec.list&username=$WEST_Username&apikey=$WEST_Key&domain=$fulldomain&hostname=$fulldomain&record_type=TXT";then
if ! _rest POST "domain/dns/""act=dnsrec.list&username=$WEST_Username&apikey=$WEST_Key&domain=${fulldomain#*.}&hostname=${fulldomain%%.*}&record_type=TXT";then
_err "dnsrec.list error."
_err "dnsrec.list error."
return1
return1
fi
fi
@ -56,7 +56,7 @@ dns_west_cn_rm() {
return1
return1
fi
fi
if ! _rest POST "domain/dns/""act=dnsrec.remove&username=$WEST_Username&apikey=$WEST_Key&domain=$fulldomain&hostname=$fulldomain&record_id=$record_id";then
if ! _rest POST "domain/dns/""act=dnsrec.remove&username=$WEST_Username&apikey=$WEST_Key&domain=${fulldomain#*.}&hostname=${fulldomain%%.*}&record_id=$record_id";then
_err "dnsrec.remove error."
_err "dnsrec.remove error."
return1
return1
fi
fi
@ -72,7 +72,7 @@ add_record() {
_info "Adding record"
_info "Adding record"
if ! _rest POST "domain/dns/""act=dnsrec.add&username=$WEST_Username&apikey=$WEST_Key&domain=$fulldomain&hostname=$fulldomain&record_type=TXT&record_value=$txtvalue";then
if ! _rest POST "domain/dns/""act=dnsrec.add&username=$WEST_Username&apikey=$WEST_Key&domain=${fulldomain#*.}&hostname=${fulldomain%%.*}&record_type=TXT&record_value=$txtvalue";then