format dns_me api

This commit is contained in:
neilpang 2016-11-09 23:15:08 +08:00
parent 2ea5b283a8
commit dec90f7e5e

View File

@ -65,7 +65,7 @@ dns_me_add(){
if [ "$?" = "0" ]; then
_info "Updated"
#todo: check if the record takes effect
return 0;
return 0
fi
_err "Update error"
return 1
@ -73,14 +73,12 @@ dns_me_add(){
}
#fulldomain
dns_me_rm() {
fulldomain=$1
}
#################### Private functions bellow ##################################
#_acme-challenge.www.domain.com
#returns
@ -95,7 +93,7 @@ _get_root() {
h=$(printf $domain | cut -d . -f $i-100)
if [ -z "$h" ]; then
#not valid
return 1;
return 1
fi
if ! _me_rest GET "name?domainname=$h"; then
@ -144,5 +142,3 @@ _me_rest() {
_debug2 response "$response"
return 0
}