summaryrefslogtreecommitdiff
path: root/hosts
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2021-05-30 17:36:49 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2021-05-30 17:36:49 +0200
commitfd23ce7673ff3d6115f3e009ebe48b80ffd111e4 (patch)
treebba8f67c491f08545fc3cc5870ab74435189412e /hosts
parent74c20e2d39aeaf7e948e141743ff76b58f66a54c (diff)
downloadnixos-fd23ce7673ff3d6115f3e009ebe48b80ffd111e4.tar
nixos-fd23ce7673ff3d6115f3e009ebe48b80ffd111e4.tar.gz
nixos-fd23ce7673ff3d6115f3e009ebe48b80ffd111e4.tar.bz2
nixos-fd23ce7673ff3d6115f3e009ebe48b80ffd111e4.tar.xz
nixos-fd23ce7673ff3d6115f3e009ebe48b80ffd111e4.zip
acme@surtr: ...
Diffstat (limited to 'hosts')
-rw-r--r--hosts/surtr/tls.nix9
1 files changed, 7 insertions, 2 deletions
diff --git a/hosts/surtr/tls.nix b/hosts/surtr/tls.nix
index f45c5c7c..c4ca09b1 100644
--- a/hosts/surtr/tls.nix
+++ b/hosts/surtr/tls.nix
@@ -16,16 +16,21 @@ let
16 16
17 owner=''${fqdn%".${zone}."} 17 owner=''${fqdn%".${zone}."}
18 18
19 function cleanup() {
20 ${knotCfg.cliWrappers}/bin/knotc zone-abort "${zone}"
21 }
22 trap cleanup EXIT
23
19 ${knotCfg.cliWrappers}/bin/knotc zone-begin "${zone}" 24 ${knotCfg.cliWrappers}/bin/knotc zone-begin "${zone}"
20 25
21 case "''${mode}" in 26 case "''${mode}" in
22 present) 27 present)
23 ${knotCfg.cliWrappers}/bin/knotc zone-unset ${zone} "''${owner}" TXT "" 28 ${knotCfg.cliWrappers}/bin/knotc zone-unset ${zone} "''${owner}" TXT '""'
24 ${knotCfg.cliWrappers}/bin/knotc zone-set ${zone} "''${owner}" 30 TXT "''${challenge}" 29 ${knotCfg.cliWrappers}/bin/knotc zone-set ${zone} "''${owner}" 30 TXT "''${challenge}"
25 ;; 30 ;;
26 cleanup) 31 cleanup)
27 ${knotCfg.cliWrappers}/bin/knotc zone-unset ${zone} "''${owner}" TXT "''${challenge}" 32 ${knotCfg.cliWrappers}/bin/knotc zone-unset ${zone} "''${owner}" TXT "''${challenge}"
28 ${knotCfg.cliWrappers}/bin/knotc zone-set ${zone} "''${owner}" 30 TXT "" 33 ${knotCfg.cliWrappers}/bin/knotc zone-set ${zone} "''${owner}" 30 TXT '""'
29 ;; 34 ;;
30 *) 35 *)
31 exit 2 36 exit 2