letsencrypt-linode/linode-auth-hook.sh

12 lines
336 B
Bash
Raw Normal View History

2019-04-25 12:48:00 +01:00
#!/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