From: Lukas Schauer Date: Sun, 6 Dec 2015 14:38:52 +0000 (+0100) Subject: make config.sh optional X-Git-Tag: v0.1.0~203 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=440dc30d5ef22cd0c8e8a59c36f7ebb091cb93fe;p=thirdparty%2Fdehydrated.git make config.sh optional --- diff --git a/letsencrypt.sh b/letsencrypt.sh index 615a731..15befbe 100755 --- a/letsencrypt.sh +++ b/letsencrypt.sh @@ -12,7 +12,9 @@ RENEW_DAYS="14" KEYSIZE="4096" WELLKNOWN=".acme-challenges" -. ./config.sh +if [[ -e "config.sh" ]]; then + . ./config.sh +fi umask 077 # paranoid umask, we're creating private keys @@ -186,6 +188,11 @@ if [[ "${register}" = "1" ]]; then signed_request "${CA}/acme/new-reg" '{"resource": "new-reg", "agreement": "'"$LICENSE"'"}' > /dev/null fi +if [[ ! -e "domains.txt" ]]; then + echo "You have to create a domains.txt file listing the domains you want certificates for. Have a look at domains.txt.example." + exit 1 +fi + # Generate certificates for all domains found in domain.txt. Check if existing certificate are about to expire