Merge branch 'acmesh-official:master' into dns_efficientip

This commit is contained in:
EfficientIP-Labs authored and GitHub committed 2025-09-16 11:15:51 +02:00
commit 86f2584162
2 files changed
+35 -17

No files matched your search

+18 -4
View File
@@ -436,14 +436,28 @@ _secure_debug3() {
fi fi
} }
__USE_TR_TAG=""
if [ "$(echo "abc" | LANG=C tr a-z A-Z 2>/dev/null)" != "ABC" ]; then
__USE_TR_TAG="1"
fi
export __USE_TR_TAG
_upper_case() { _upper_case() {
# shellcheck disable=SC2018,SC2019 if [ "$__USE_TR_TAG" ]; then
tr '[a-z]' '[A-Z]' LANG=C tr '[:lower:]' '[:upper:]'
else
# shellcheck disable=SC2018,SC2019
LANG=C tr '[a-z]' '[A-Z]'
fi
} }
_lower_case() { _lower_case() {
# shellcheck disable=SC2018,SC2019 if [ "$__USE_TR_TAG" ]; then
tr '[A-Z]' '[a-z]' LANG=C tr '[:upper:]' '[:lower:]'
else
# shellcheck disable=SC2018,SC2019
LANG=C tr '[A-Z]' '[a-z]'
fi
} }
_startswith() { _startswith() {
+17 -13
View File
@@ -110,15 +110,16 @@ rm_record() {
if _existingchallenge "$_domain" "$_host" "$new_challenge"; then if _existingchallenge "$_domain" "$_host" "$new_challenge"; then
# Delete # Delete
if _opns_rest "POST" "/record/delRecord/${_uuid}" "\{\}"; then if _opns_rest "POST" "/record/delRecord/${_uuid}" "\{\}"; then
if echo "$_return_str" | _egrep_o "\"result\":\"deleted\"" >/dev/null; then if echo "$response" | _egrep_o "\"result\":\"deleted\"" >/dev/null; then
_opns_rest "POST" "/service/reconfigure" "{}"
_debug "Record deleted" _debug "Record deleted"
_opns_rest "POST" "/service/reconfigure" "{}"
_debug "Service reconfigured"
else else
_err "Error deleting record $_host from domain $fulldomain" _err "Error deleting record $_host from domain $fulldomain"
return 1 return 1
fi fi
else else
_err "Error deleting record $_host from domain $fulldomain" _err "Error requesting deletion of record $_host from domain $fulldomain"
return 1 return 1
fi fi
else else
@@ -150,14 +151,17 @@ _get_root() {
return 1 return 1
fi fi
_debug h "$h" _debug h "$h"
id=$(echo "$_domain_response" | _egrep_o "\"uuid\":\"[a-z0-9\-]*\",\"enabled\":\"1\",\"type\":\"primary\",\"domainname\":\"${h}\"" | cut -d ':' -f 2 | cut -d '"' -f 2) lines=$(echo "$_domain_response" | sed 's/{/\n/g')
if [ -n "$id" ]; then for line in $lines; do
_debug id "$id" id=$(echo "$line" | _egrep_o "\"uuid\":\"[a-z0-9\-]*\",\"enabled\":\"1\",\"type\":\"primary\",.*\"domainname\":\"${h}\"" | cut -d ':' -f 2 | cut -d '"' -f 2)
_host=$(printf "%s" "$domain" | cut -d . -f 1-"$p") if [ -n "$id" ]; then
_domain="${h}" _debug id "$id"
_domainid="${id}" _host=$(printf "%s" "$domain" | cut -d . -f 1-"$p")
return 0 _domain="${h}"
fi _domainid="${id}"
return 0
fi
done
p=$i p=$i
i=$(_math "$i" + 1) i=$(_math "$i" + 1)
done done
@@ -206,13 +210,13 @@ _existingchallenge() {
return 1 return 1
fi fi
_uuid="" _uuid=""
_uuid=$(echo "$_record_response" | _egrep_o "\"uuid\":\"[^\"]*\",\"enabled\":\"[01]\",\"domain\":\"$1\",\"name\":\"$2\",\"type\":\"TXT\",\"value\":\"$3\"" | cut -d ':' -f 2 | cut -d '"' -f 2) _uuid=$(echo "$_record_response" | _egrep_o "\"uuid\":\"[a-z0-9\-]*\",\"enabled\":\"[01]\",\"domain\":\"[a-z0-9\-]*\",\"%domain\":\"$1\",\"name\":\"$2\",\"type\":\"TXT\",\"value\":\"$3\"" | cut -d ':' -f 2 | cut -d '"' -f 2)
if [ -n "$_uuid" ]; then if [ -n "$_uuid" ]; then
_debug uuid "$_uuid" _debug uuid "$_uuid"
return 0 return 0
fi fi
_debug "${2}.$1{1} record not found" _debug "${2}.${1} record not found"
return 1 return 1
} }
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.