Commit feffbba6 authored by mrbaiwei's avatar mrbaiwei
Browse files

Update dns_west.sh


Signed-off-by: default avatarmrbaiwei <mrbaiwei@gmail.com>
parent 6ea09444
...@@ -20,8 +20,8 @@ dns_west_add() { ...@@ -20,8 +20,8 @@ dns_west_add() {
if [ -z "$WEST_Username" ] || [ -z "$WEST_Key" ]; then if [ -z "$WEST_Username" ] || [ -z "$WEST_Key" ]; then
WEST_Username="" WEST_Username=""
WEST_Key="" WEST_Key=""
_err "You don't specify dnspod api key and key id yet." _err "You don't specify west api key and username yet."
_err "Please create you key and try again." _err "Please set you key and try again."
return 1 return 1
fi fi
...@@ -41,7 +41,7 @@ dns_west_rm() { ...@@ -41,7 +41,7 @@ dns_west_rm() {
WEST_Key="${WEST_Key:-$(_readaccountconf_mutable WEST_Key)}" WEST_Key="${WEST_Key:-$(_readaccountconf_mutable WEST_Key)}"
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 "Record.Lis error." _err "dnsrec.list error."
return 1 return 1
fi fi
...@@ -58,7 +58,7 @@ dns_west_rm() { ...@@ -58,7 +58,7 @@ dns_west_rm() {
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 "Record.Remove error." _err "dnsrec.remove error."
return 1 return 1
fi fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment