Letsencrypt ssl certificate update fails when you have domains like example.com and example.com.ua (beginning matches)

issue #1977 https://github.com/serghey-rodin/vesta/issues/1977
This commit is contained in:
olymp 2020-02-23 12:44:51 +02:00
commit dae2eb0854

View file

@ -57,7 +57,13 @@ fi
# Deleting old certificate
tmpdir=$(mktemp -p $HOMEDIR/$user/web/$domain/private -d)
rm -f $HOMEDIR/$user/conf/web/ssl.$domain.*
# remove certificate files - do not use wildcard, as this might remove other domains
rm -f $HOMEDIR/$user/conf/web/ssl.$domain.ca
rm -f $HOMEDIR/$user/conf/web/ssl.$domain.crt
rm -f $HOMEDIR/$user/conf/web/ssl.$domain.key
rm -f $HOMEDIR/$user/conf/web/ssl.$domain.pem
mv $USER_DATA/ssl/$domain.* $tmpdir
chown -R $user:$user $tmpdir