diff --git a/bin/letsencrypt-certonly.sh b/bin/letsencrypt-certonly.sh index 784286f..09c1b79 100644 --- a/bin/letsencrypt-certonly.sh +++ b/bin/letsencrypt-certonly.sh @@ -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 diff --git a/etc/letsencrypt/cli.ini b/etc/letsencrypt/cli.ini index 6ce5d1b..6a9f1c8 100644 --- a/etc/letsencrypt/cli.ini +++ b/etc/letsencrypt/cli.ini @@ -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