removed acme-challenges directory from git, create if needed

This commit is contained in:
Lukas Schauer
2015-12-06 15:41:49 +01:00
parent 440dc30d5e
commit 3390080ccb
3 changed files with 4 additions and 2 deletions

View File

2
.gitignore vendored
View File

@@ -2,6 +2,4 @@ private_key.pem
domains.txt
config.sh
certs/*
!certs/.keep
.acme-challenges/*
!.acme-challenges/.keep

View File

@@ -193,6 +193,10 @@ if [[ ! -e "domains.txt" ]]; then
exit 1
fi
if [[ ! -e "${WELLKNOWN}" ]]; then
mkdir -p "${WELLKNOWN}"
fi
# Generate certificates for all domains found in domain.txt. Check if existing certificate are about to expire
<domains.txt sed 's/^\s*//g;s/\s*$//g' | grep -v '^#' | grep -v '^$' | while read -r line; do
domain="$(echo $line | cut -d' ' -f1)"