Merge pull request #1978 from olympy/fix-renew-ssl-on-domain-match

Fix issue #1977 / Letsencrypt ssl certificate update fails
This commit is contained in:
Anton Reutov 2021-08-02 14:26:46 +03:00 committed by GitHub
commit b0f65509e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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