summaryrefslogtreecommitdiffstats
path: root/etc/letsencrypt/hook.sh
diff options
context:
space:
mode:
Diffstat (limited to 'etc/letsencrypt/hook.sh')
-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