Update dns_ls.sh

This commit is contained in:
yousaywhatiswhat 2021-07-26 10:08:44 +08:00 committed by GitHub
parent 33a5088aa2
commit 27e9508174
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,10 +33,12 @@ dns_ls_add() {
response="$(_post "secretkey=${LS_Key}&domain=${fulldomain}&rval=${txtvalue}" "$LS_API")"
if _contains "${response}" 'success'; then
return 0
else
_err "Could not create resource record, check logs"
_err "${response}"
return 1
fi
_err "Could not create resource record, check logs"
_err "${response}"
return 1
}
@ -59,8 +61,11 @@ dns_ls_rm() {
response="$(_post "secretkey=${LS_Key}&domain=${fulldomain}&rval=${txtvalue}&option=del" "$LS_API")"
if _contains "${response}" 'success'; then
return 0
else
_err "Could not del resource record, check logs"
_err "${response}"
return 1
fi
_err "Could not del resource record, check logs"
_err "${response}"
}
#################### Private functions below ##################################