changeset 2045:265dc9af6a49 acme-tiny

fix guard_uri initiation
author Violet7
date Sun, 09 Nov 2025 02:31:57 -0800
parents d8550e64d613
children e0896f65c847
files src/luan/host/https.luan
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
diff -r d8550e64d613 -r 265dc9af6a49 src/luan/host/https.luan
--- a/src/luan/host/https.luan	Sun Nov 09 02:26:32 2025 -0800
+++ b/src/luan/host/https.luan	Sun Nov 09 02:31:57 2025 -0800
@@ -40,8 +40,8 @@
 	local dry_run_dir_url = "https://acme-staging-v02.api.letsencrypt.org/directory"
 
 	-- declare these so they are visible in the catch and finally blocks
-	local guard_uri
-	local temp_dir_string
+  local guard_file = "/tmp/acme_setup_locks/"..domain..".lock"
+  local guard_uri = uri("file:"..guard_file)
 
 	if is_https then	-- https
 		if not key_file.exists() then
@@ -67,8 +67,6 @@
 					-- and causing an infinite recursion.
 					local cmd = "mkdir -p /tmp/acme_setup_locks/"
 					local s = uri("bash:"..cmd).read_text()
-					local guard_file = "/tmp/acme_setup_locks/"..domain..".lock"
-					local guard_uri = uri("file:"..guard_file)
 					if guard_uri.exists() then
 							logger.info("set_https already running for "..domain..", skipping")
 							return