Remove symlinks if they exist
This commit is contained in:
parent
0631a8b4a7
commit
e41728d618
|
@ -231,6 +231,9 @@ function add_cert_letsencrypt {
|
|||
rm -f /etc/ssl/private/${LETSENCRYPT_HOSTNAME}.key
|
||||
fi
|
||||
fi
|
||||
if [ -L /etc/ssl/private/${LETSENCRYPT_HOSTNAME}.key ]; then
|
||||
rm /etc/ssl/private/${LETSENCRYPT_HOSTNAME}.key
|
||||
fi
|
||||
ln -s /etc/letsencrypt/live/${LETSENCRYPT_HOSTNAME}/privkey.pem /etc/ssl/private/${LETSENCRYPT_HOSTNAME}.key
|
||||
|
||||
# link the public key
|
||||
|
@ -241,6 +244,9 @@ function add_cert_letsencrypt {
|
|||
rm -f /etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.pem
|
||||
fi
|
||||
fi
|
||||
if [ -L /etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.pem ]; then
|
||||
rm /etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.pem
|
||||
fi
|
||||
ln -s /etc/letsencrypt/live/${LETSENCRYPT_HOSTNAME}/fullchain.pem /etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.pem
|
||||
|
||||
cp /etc/letsencrypt/live/${LETSENCRYPT_HOSTNAME}/fullchain.pem /etc/ssl/mycerts/${LETSENCRYPT_HOSTNAME}.pem
|
||||
|
|
Loading…
Reference in New Issue