Added checking to ensure the correct domain is located

This commit is contained in:
Andy Heathershaw 2019-05-03 22:26:50 +01:00
parent ba73ca81ae
commit 8bfdc23809

View File

@ -3,7 +3,7 @@
#echo $CERTBOT_VALIDATION #echo $CERTBOT_VALIDATION
#echo $CERTBOT_TOKEN #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 linode-cli domains records-create --type TXT --name "_acme-challenge" --ttl_sec 60 --target "$CERTBOT_VALIDATION" $DOMAIN_ID