update acme-challenge always

This commit is contained in:
myvesta 2021-07-11 15:00:25 +02:00 committed by GitHub
commit 7f9f1c0253
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -214,13 +214,13 @@ for auth in $authz; do
# default nginx method # default nginx method
conf="$HOMEDIR/$user/conf/web/nginx.$domain.conf_letsencrypt" conf="$HOMEDIR/$user/conf/web/nginx.$domain.conf_letsencrypt"
sconf="$HOMEDIR/$user/conf/web/snginx.$domain.conf_letsencrypt" sconf="$HOMEDIR/$user/conf/web/snginx.$domain.conf_letsencrypt"
if [ ! -e "$conf" ]; then # if [ ! -e "$conf" ]; then
echo 'location ~ "^/\.well-known/acme-challenge/(.*)$" {' \ echo 'location ~ "^/\.well-known/acme-challenge/(.*)$" {' \
> $conf > $conf
echo ' default_type text/plain;' >> $conf echo ' default_type text/plain;' >> $conf
echo ' return 200 "$1.'$THUMB'";' >> $conf echo ' return 200 "$1.'$THUMB'";' >> $conf
echo '}' >> $conf echo '}' >> $conf
fi # fi
echo "[$(date)] : in $conf we put: $THUMB" >> /usr/local/vesta/log/letsencrypt.log echo "[$(date)] : in $conf we put: $THUMB" >> /usr/local/vesta/log/letsencrypt.log
if [ ! -e "$sconf" ]; then if [ ! -e "$sconf" ]; then
ln -s "$conf" "$sconf" ln -s "$conf" "$sconf"