move standalone option from config to command, change path to pdns-credentials.ini
This commit is contained in:
parent
0933ae043f
commit
0cbb15247f
|
@ -49,15 +49,23 @@ while getopts "hd:tn" opt; do
|
|||
esac
|
||||
done
|
||||
|
||||
# check for domain (hostname)
|
||||
if [[ -z $domain ]]; then
|
||||
echo "domain (hostname) is required"
|
||||
exit
|
||||
fi
|
||||
|
||||
# set vars
|
||||
command="certbot certonly"
|
||||
if [[ -n $dnstxt ]]; then
|
||||
if [[ -f ~/.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"
|
||||
if [[ -f /usr/local/etc/pdns-credentials.ini ]]; then
|
||||
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
|
||||
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
|
||||
fi
|
||||
else
|
||||
command="$command --standalone"
|
||||
fi
|
||||
|
||||
dnscheck=false
|
||||
|
|
|
@ -6,7 +6,6 @@ allow-subset-of-names = True
|
|||
expand = True
|
||||
keep-until-expiring = True
|
||||
non-interactive = True
|
||||
standalone = True
|
||||
http-01-port=18080
|
||||
deploy-hook = /etc/letsencrypt/renewal-hooks/deploy/cp-to-etc-ssl.sh
|
||||
post-hook = /etc/letsencrypt/renewal-hooks/post/reload-services.sh
|
||||
|
|
Loading…
Reference in New Issue
Block a user