Mercurial Hosting > luan
changeset 2040:389f30ed66ea acme-tiny
fix
| author | Violet7 |
|---|---|
| date | Sun, 09 Nov 2025 01:27:28 -0800 |
| parents | aa0910b07953 |
| children | cd51e7e31950 |
| files | src/luan/host/https.luan |
| diffstat | 1 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/luan/host/https.luan Sun Nov 09 00:53:36 2025 -0800 +++ b/src/luan/host/https.luan Sun Nov 09 01:27:28 2025 -0800 @@ -39,7 +39,7 @@ local dry_run = false local dry_run_dir_url = "https://acme-staging-v02.api.letsencrypt.org/directory" - if is_https then -- https + if is_https then -- https if not key_file.exists() then local is_local = ip(domain) == "127.0.0.1" logger.info("is_local "..is_local) @@ -124,7 +124,7 @@ --csr ]]..csr_file_str..[[ \ --acme-dir ]]..acme_challenges..[[ \ ]] - if dry_run then + if dry_run == true then cmd = cmd.." --directory-url "..dry_run_dir_url end cmd = cmd.."> "..local_cer_file_str @@ -136,11 +136,11 @@ -- that could cause a recursion so it is safe to delete the guard here. guard_uri.delete() - -- Don't forget to delete the files so the nginx config - -- doesn't have 2 server blocks for the same site. + -- Don't forget to delete the files so the nginx config + -- doesn't have 2 server blocks for the same site. - local cmd = "rm -rf /tmp/acme_setup/"..domain - local s = uri("bash:"..cmd).read_text() + local cmd = "rm -rf /tmp/acme_setup/"..domain + local s = uri("bash:"..cmd).read_text() logger.info("get cert signed by letsencrypt\n"..s) @@ -160,7 +160,7 @@ nginx_file.write(nginx) end end - else -- http + else -- http if key_file.exists() or nginx_file.exists() then changed = true nginx_file.delete()
