25 lines
930 B
Bash
25 lines
930 B
Bash
#!/bin/sh
|
|
set -e
|
|
set -x
|
|
|
|
IFS=";"
|
|
|
|
apk add curl
|
|
echo certbot certonly \
|
|
-vvv \
|
|
--test-cert \
|
|
--preferred-challenges dns \
|
|
--authenticator dns-duckdns \
|
|
--dns-duckdns-token e4b5ca33-1f4d-494b-b06d-6dd4600df662 \
|
|
--dns-duckdns-propagation-seconds 120 \
|
|
--non-interactive \
|
|
--agree-tos \
|
|
--renew-by-default \
|
|
*.fbleagh-int.duckdns.org --email "stuart.stent@gmail.com"
|
|
|
|
echo curl -XPUT --data-bin "@/etc/letsencrypt/live/\*.fbleagh-int.duckdns.org/privkey.pem" http://$LETSCONSUL_CONSUL_URL:8500/v1/kv/letsconsul/$domain_main/privkey
|
|
echo curl -XPUT --data-bin "@/etc/letsencrypt/live/\*.fbleagh-int.duckdns.org/fullchain.pem" http://$LETSCONSUL_CONSUL_URL:8500/v1/kv/letsconsul/$domain_main/fullchain
|
|
done
|
|
|
|
echo curl -XPUT --data-bin @/var/log/letsencrypt/letsencrypt.log http://$LETSCONSUL_CONSUL_URL:8500/v1/kv/letsconsul/letsencrypt.log
|