mirror of
https://github.com/plantroon/acme.sh.git
synced 2024-12-26 23:11:44 +00:00
Merge pull request #3 from dojo90/all-inkl-kasserver-dns-script
support to delete multiple entries
This commit is contained in:
commit
16bfb1727f
@ -75,21 +75,27 @@ dns_kas_rm() {
|
|||||||
params="$params&kas_auth_type=$KAS_Authtype"
|
params="$params&kas_auth_type=$KAS_Authtype"
|
||||||
params="$params&kas_auth_data=$KAS_Authdata"
|
params="$params&kas_auth_data=$KAS_Authdata"
|
||||||
params="$params&kas_action=delete_dns_settings"
|
params="$params&kas_action=delete_dns_settings"
|
||||||
params="$params&var1=record_id"
|
|
||||||
params="$params&wert1=$_record_id"
|
# split it into a seperated list, if there where multiples entries made
|
||||||
_debug2 "Wait for 10 seconds by default before calling KAS API."
|
records=($_record_id)
|
||||||
sleep 10
|
for i in "${records[@]}"
|
||||||
response="$(_get "$KAS_Api$params")"
|
do
|
||||||
_debug2 "response" "$response"
|
params2="$params&var1=record_id"
|
||||||
if ! _contains "$response" "TRUE"; then
|
params2="$params2&wert1=$i"
|
||||||
_err "Either the txt record is not found or another error occurred, please check manually."
|
_debug2 "Wait for 10 seconds by default before calling KAS API."
|
||||||
return 1
|
sleep 10
|
||||||
fi
|
response="$(_get "$KAS_Api$params2")"
|
||||||
|
_debug2 "response" "$response"
|
||||||
|
if ! _contains "$response" "TRUE"; then
|
||||||
|
_err "Either the txt record is not found or another error occurred, please check manually."
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
else # Cannot delete or unkown error
|
else # Cannot delete or unkown error
|
||||||
_err "No record_id found that can be deleted. Please check manually."
|
_err "No record_id found that can be deleted. Please check manually."
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
########################## PRIVATE FUNCTIONS ###########################
|
########################## PRIVATE FUNCTIONS ###########################
|
||||||
|
Loading…
Reference in New Issue
Block a user