From f14db344ba64ea61ad5a8fc0172dde78af840be6 Mon Sep 17 00:00:00 2001 From: Andy Heathershaw Date: Thu, 25 Apr 2019 12:48:00 +0100 Subject: [PATCH] Added the domain authorisation script --- linode-auth-hook.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 linode-auth-hook.sh diff --git a/linode-auth-hook.sh b/linode-auth-hook.sh new file mode 100644 index 0000000..7415522 --- /dev/null +++ b/linode-auth-hook.sh @@ -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