mirror of
https://github.com/acmesh-official/acme.sh
synced 2025-08-30 13:58:33 +00:00
Updating per comment re: Exit vs Return on initial validation
This commit is contained in:
@@ -39,6 +39,9 @@ dns_omglol_add() {
|
||||
_debug "omg.lol Address" "$omglol_address"
|
||||
|
||||
omglol_validate "$omglol_apikey" "$omglol_address" "$fulldomain"
|
||||
if [ ! $? ]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
dnsName=$(_getDnsRecordName "$fulldomain" "$omglol_address")
|
||||
authHeader="$(_createAuthHeader "$omglol_apikey")"
|
||||
@@ -66,6 +69,9 @@ dns_omglol_rm() {
|
||||
_debug address "$omglol_address"
|
||||
|
||||
omglol_validate "$omglol_apikey" "$omglol_address" "$fulldomain"
|
||||
if [ ! $? ]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
dnsName=$(_getDnsRecordName "$fulldomain" "$omglol_address")
|
||||
authHeader="$(_createAuthHeader "$omglol_apikey")"
|
||||
@@ -82,24 +88,24 @@ omglol_validate() {
|
||||
|
||||
if [ "" = "$omglol_address" ]; then
|
||||
_err "omg.lol base address not provided. Exiting"
|
||||
exit 1
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ "" = "$omglol_apikey" ]; then
|
||||
_err "omg.lol API key not provided. Exiting"
|
||||
exit 1
|
||||
return 1
|
||||
fi
|
||||
|
||||
_endswith "$fulldomain" "omg.lol"
|
||||
if [ ! $? ]; then
|
||||
_err "Domain name requested is not under omg.lol"
|
||||
exit 1
|
||||
return 1
|
||||
fi
|
||||
|
||||
_endswith "$fulldomain" "$omglol_address.omg.lol"
|
||||
if [ ! $? ]; then
|
||||
_err "Domain name is not a subdomain of provided omg.lol address $omglol_address"
|
||||
exit 1
|
||||
return 1
|
||||
fi
|
||||
|
||||
_debug "omglol_validate(): Required environment parameters are all present"
|
||||
|
Reference in New Issue
Block a user