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
|
rm -f /etc/ssl/private/${LETSENCRYPT_HOSTNAME}.key
|
||||||
fi
|
fi
|
||||||
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
|
ln -s /etc/letsencrypt/live/${LETSENCRYPT_HOSTNAME}/privkey.pem /etc/ssl/private/${LETSENCRYPT_HOSTNAME}.key
|
||||||
|
|
||||||
# link the public key
|
# link the public key
|
||||||
|
@ -241,6 +244,9 @@ function add_cert_letsencrypt {
|
||||||
rm -f /etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.pem
|
rm -f /etc/ssl/certs/${LETSENCRYPT_HOSTNAME}.pem
|
||||||
fi
|
fi
|
||||||
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
|
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
|
cp /etc/letsencrypt/live/${LETSENCRYPT_HOSTNAME}/fullchain.pem /etc/ssl/mycerts/${LETSENCRYPT_HOSTNAME}.pem
|
||||||
|
|
Loading…
Reference in New Issue