if! _rest POST "Record.Create""login_token=$DP_Id,$DP_Key&format=json&domain_id=$_domain_id&sub_domain=$_sub_domain&record_type=TXT&value=$txtvalue&record_line=默认";then
if! _rest POST "Record.Create""login_token=$DP_Id,$DP_Key&format=json&domain_id=$_domain_id&sub_domain=$_sub_domain&record_type=TXT&value=$txtvalue&record_line=默认";then
return 1
return 1
fi
fi
if printf"$response" | grep"Action completed successful";then
if printf"$response" | grep"Action completed successful";then
return 0
return 0
fi
fi
return 1 #error
return 1 #error
}
}
...
@@ -121,24 +113,21 @@ update_record() {
...
@@ -121,24 +113,21 @@ update_record() {
sub=$2
sub=$2
txtvalue=$3
txtvalue=$3
fulldomain=$sub.$root
fulldomain=$sub.$root
_info "Updating record"
_info "Updating record"
if! _rest POST "Record.Modify""login_token=$DP_Id,$DP_Key&format=json&domain_id=$_domain_id&sub_domain=$_sub_domain&record_type=TXT&value=$txtvalue&record_line=默认&record_id=$record_id";then
if! _rest POST "Record.Modify""login_token=$DP_Id,$DP_Key&format=json&domain_id=$_domain_id&sub_domain=$_sub_domain&record_type=TXT&value=$txtvalue&record_line=默认&record_id=$record_id";then
return 1
return 1
fi
fi
if printf"$response" | grep"Action completed successful";then
if printf"$response" | grep"Action completed successful";then