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
|
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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user