File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ Docs: github.com/acmesh-official/acme.sh/wiki/dnsapi2#dns_technitium
66Options:
77 Technitium_Server Server Address
88 Technitium_Token API Token
9+ Technitium_Expiry_Ttl Number of seconds before DNS server auto-deletes the acme record
910Issues: github.com/acmesh-official/acme.sh/issues/6116
1011Author: Henning Reich <acmesh@qupfer.de>
1112'
@@ -15,7 +16,10 @@ dns_technitium_add() {
1516 _Technitium_account
1617 fulldomain=$1
1718 txtvalue=$2
18- response=" $( _get " $Technitium_Server /api/zones/records/add?token=$Technitium_Token &domain=$fulldomain &type=TXT&text=${txtvalue} " ) "
19+ expiryTtl=${Technitium_Expirty_Ttl:- $(_readaccountconf_mutable Technitium_Expiry_Ttl)}
20+ expiryTtl=${expiryTtl:- 0}
21+
22+ response=" $( _get " $Technitium_Server /api/zones/records/add?token=$Technitium_Token &domain=$fulldomain &type=TXT&text=${txtvalue} &expiryTtl=$expiryTtl " ) "
1923 if _contains " $response " ' "status":"ok"' ; then
2024 return 0
2125 fi
@@ -28,6 +32,14 @@ dns_technitium_rm() {
2832 _Technitium_account
2933 fulldomain=$1
3034 txtvalue=$2
35+ expiryTtl=${Technitium_Expirty_Ttl:- $(_readaccountconf_mutable Technitium_Expiry_Ttl)}
36+ expiryTtl=${expiryTtl:- 0}
37+
38+ if [ " $expiryTtl " -ne 0 ]; then
39+ _info " DNS record is configured to be auto-removed after $expiryTtl seconds. Remove operation is bypassed."
40+ return 0
41+ fi
42+
3143 response=" $( _get " $Technitium_Server /api/zones/records/delete?token=$Technitium_Token &domain=$fulldomain &type=TXT&text=${txtvalue} " ) "
3244 if _contains " $response " ' "status":"ok"' ; then
3345 return 0
You can’t perform that action at this time.
0 commit comments