summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2023-08-30 14:05:14 +0200
committerAnton Luka Šijanec <anton@sijanec.eu>2023-08-30 14:05:14 +0200
commitffcfa745499c3813d53620c0fabc026020983922 (patch)
treed69486da657c21017baaf705f176b7d7a4bd0f5b /etc
parentb: nonlocal bind sysctl allow (diff)
downloadn-ffcfa745499c3813d53620c0fabc026020983922.tar
n-ffcfa745499c3813d53620c0fabc026020983922.tar.gz
n-ffcfa745499c3813d53620c0fabc026020983922.tar.bz2
n-ffcfa745499c3813d53620c0fabc026020983922.tar.lz
n-ffcfa745499c3813d53620c0fabc026020983922.tar.xz
n-ffcfa745499c3813d53620c0fabc026020983922.tar.zst
n-ffcfa745499c3813d53620c0fabc026020983922.zip
Diffstat (limited to 'etc')
-rwxr-xr-xetc/letsencrypt/hook.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/etc/letsencrypt/hook.sh b/etc/letsencrypt/hook.sh
new file mode 100755
index 0000000..5355a71
--- /dev/null
+++ b/etc/letsencrypt/hook.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+CREATE_DOMAIN="certbot.rfc2136.sijanec.eu."
+# update delete $CREATE_DOMAIN TXT
+echo "
+server 127.0.0.1
+update add $CREATE_DOMAIN 1 TXT $CERTBOT_VALIDATION
+send
+" | tee /dev/stderr | nsupdate -k /etc/bind/keyfile-rfc2136.conf
+if [ $CERTBOT_REMAINING_CHALLENGES -eq 0 ]
+then
+ rndc reload
+ sleep 30
+fi