From 8bfdc23809d1b2a64fa6c1a2450e725ee930a4c9 Mon Sep 17 00:00:00 2001 From: Andy Heathershaw Date: Fri, 3 May 2019 22:26:50 +0100 Subject: [PATCH] Added checking to ensure the correct domain is located --- linode-auth-hook.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linode-auth-hook.sh b/linode-auth-hook.sh index 7415522..4324248 100644 --- a/linode-auth-hook.sh +++ b/linode-auth-hook.sh @@ -3,7 +3,7 @@ #echo $CERTBOT_VALIDATION #echo $CERTBOT_TOKEN -DOMAIN_ID=`linode-cli domains list|grep $CERTBOT_DOMAIN|awk -F' ' '{print $2}'` +DOMAIN_ID=`linode-cli domains list|grep -e "\s$CERTBOT_DOMAIN\s"|awk -F' ' '{print $2}'` linode-cli domains records-create --type TXT --name "_acme-challenge" --ttl_sec 60 --target "$CERTBOT_VALIDATION" $DOMAIN_ID