Browse Source

Remove existing certificate before creating the new one

master
parent
commit
3e7ecf8873
1 changed files with 1 additions and 0 deletions
  1. 1
    0
      haraka.sh

+ 1
- 0
haraka.sh View File

@@ -19,6 +19,7 @@ if [ "${USE_LETSENCRYPT,,}" == "yes" -o "${USE_LETSENCRYPT,,}" == "true" ]; then
ln -sf /etc/letsencrypt/live/$HOSTNAME/fullchain.pem tls-cert.pem
else
# Generate a self-signed certificate for the hostname provided
rm -f tls-key.pem tls-cert.pem
openssl req -subj "/O=Self Signed Certificate/CN=$HOSTNAME" -new -newkey rsa:4096 -days 365 -nodes -x509 -sha256 -keyout tls-key.pem -out tls-cert.pem
fi
cd -

Loading…
Cancel
Save