Added the domain authorisation script

This commit is contained in:
Andy Heathershaw 2019-04-25 12:48:00 +01:00
parent b0bdef719f
commit f14db344ba
1 changed files with 11 additions and 0 deletions

11
linode-auth-hook.sh Normal file
View File

@ -0,0 +1,11 @@
#!/bin/bash
#echo $CERTBOT_DOMAIN
#echo $CERTBOT_VALIDATION
#echo $CERTBOT_TOKEN
DOMAIN_ID=`linode-cli domains list|grep $CERTBOT_DOMAIN|awk -F' ' '{print $2}'`
linode-cli domains records-create --type TXT --name "_acme-challenge" --ttl_sec 60 --target "$CERTBOT_VALIDATION" $DOMAIN_ID
# Wait for the record to be deployed
sleep 20m