move standalone option from config to command, change path to pdns-credentials.ini

This commit is contained in:
Matthew Saunders Brown 2022-06-15 12:33:38 -07:00
parent 0933ae043f
commit 0cbb15247f
2 changed files with 11 additions and 4 deletions

View File

@ -49,15 +49,23 @@ while getopts "hd:tn" opt; do
esac esac
done done
# check for domain (hostname)
if [[ -z $domain ]]; then
echo "domain (hostname) is required"
exit
fi
# set vars # set vars
command="certbot certonly" command="certbot certonly"
if [[ -n $dnstxt ]]; then if [[ -n $dnstxt ]]; then
if [[ -f ~/.pdns-credentials.ini ]]; then if [[ -f /usr/local/etc/pdns-credentials.ini ]]; then
command="$command --authenticator certbot-dns-powerdns:dns-powerdns --certbot-dns-powerdns:dns-powerdns-credentials ~/.pdns-credentials.ini --certbot-dns-powerdns:dns-powerdns-propagation-seconds 3" command="$command --authenticator certbot-dns-powerdns:dns-powerdns --certbot-dns-powerdns:dns-powerdns-credentials /usr/local/etc/pdns-credentials.ini --certbot-dns-powerdns:dns-powerdns-propagation-seconds 3"
else else
echo "ERROR: ~/.pdns-credentials.ini config file does not exist, can't use -t (DNS TXT authenticator)." echo "ERROR: /usr/local/etc/pdns-credentials.ini config file does not exist, can't use -t (DNS TXT authenticator)."
exit 1 exit 1
fi fi
else
command="$command --standalone"
fi fi
dnscheck=false dnscheck=false

View File

@ -6,7 +6,6 @@ allow-subset-of-names = True
expand = True expand = True
keep-until-expiring = True keep-until-expiring = True
non-interactive = True non-interactive = True
standalone = True
http-01-port=18080 http-01-port=18080
deploy-hook = /etc/letsencrypt/renewal-hooks/deploy/cp-to-etc-ssl.sh deploy-hook = /etc/letsencrypt/renewal-hooks/deploy/cp-to-etc-ssl.sh
post-hook = /etc/letsencrypt/renewal-hooks/post/reload-services.sh post-hook = /etc/letsencrypt/renewal-hooks/post/reload-services.sh