Browse Source

added scripts for validating from a remote server

master
Danny Martinez 3 years ago
parent
commit
9c1987d1d6
  1. 7
      ddns_cleanup
  2. 1
      ddns_cleanup.template
  3. 7
      ddns_update
  4. 1
      ddns_update.template
  5. 10
      remote-server-authenticator-hook.sh
  6. 9
      remote-server-cleanup.sh

7
ddns_cleanup

@ -0,0 +1,7 @@
server ns1.keybored.co
zone DOMAIN_NAME
origin DOMAIN_NAME
key home_keyboredme:G/nBHnetXDKJrKOboGkNOMyn3tOtq4aBihdMU0eqUU8=
ttl 360
del SUBDOMAIN 360 txt
send

1
dns_cleanup.template → ddns_cleanup.template

@ -1,6 +1,7 @@
server DNS_SERVER
zone DOMAIN_NAME
origin DOMAIN_NAME
key KNOTC_KEY
ttl 360
del SUBDOMAIN 360 txt
send

7
ddns_update

@ -0,0 +1,7 @@
server ns1.keybored.co
zone DOMAIN_NAME
origin DOMAIN_NAME
key home_keyboredme:G/nBHnetXDKJrKOboGkNOMyn3tOtq4aBihdMU0eqUU8=
ttl 360
add SUBDOMAIN 360 txt VALIDATION_STRING
send

1
dns_update.template → ddns_update.template

@ -1,5 +1,6 @@
server DNS_SERVER
zone DOMAIN_NAME
key KNOTC_KEY
origin DOMAIN_NAME
ttl 360
add SUBDOMAIN 360 txt VALIDATION_STRING

10
remote-server-authenticator-hook.sh

@ -0,0 +1,10 @@
#!/bin/bash
set -x
export CERTBOT_DOMAIN=${1}
export CERTBOT_VALIDATION=${2}
DOMAIN=$(expr match "$CERTBOT_DOMAIN" '.*\.\(.*\..*\)')
CHALLENGE_DOMAIN="_acme-challenge.${CERTBOT_DOMAIN}"
[[ -z ${DOMAIN} ]] && export DOMAIN=${CERTBOT_DOMAIN}
sed -e "s DOMAIN_NAME ${DOMAIN} g" -e "s SUBDOMAIN ${CERTBOT_DOMAIN} g" -e "s VALIDATION_STRING ${CERTBOT_VALIDATION} g" ddns_update > /tmp/certbot_ddns_update
knsupdate /tmp/certbot_ddns_update
[[ ${?} == 0 ]] && rm -f /tmp/certbot_ddns_update

9
remote-server-cleanup.sh

@ -0,0 +1,9 @@
#!/bin/bash
export CERTBOT_DOMAIN=${1}
export CERTBOT_VALIDATION=${2}
DOMAIN=$(expr match "$CERTBOT_DOMAIN" '.*\.\(.*\..*\)')
CHALLENGE_DOMAIN="_acme-challenge.${CERTBOT_DOMAIN}"
[[ -z ${DOMAIN} ]] && export DOMAIN=${CERTBOT_DOMAIN}
sed -e "s DOMAIN_NAME ${DOMAIN} g" -e "s SUBDOMAIN ${CERTBOT_DOMAIN} g" > /tmp/cerbot_ddns_cleanup
knsupdate /tmp/certbot_ddns_cleanup
[[ ${?} == 0 ]] && rm -f /tmp/certbot_ddns_cleanup
Loading…
Cancel
Save