generate-ssl.sh 586 B

123456789101112131415161718
  1. #!/bin/bash
  2. # To generate a self-signed certificate, you will need mkcert installed:
  3. # Please visit https://github.com/FiloSottile/mkcert#installation
  4. # You can generate certificate for a custom domain by passing down the domain/IP as an argument
  5. # and you can also use $ZAMMAD_BIND_IP
  6. # ./generate-ssl.sh 194.23.42.1
  7. # ZAMMAD_BIND_IP=194.23.42.1 ./generate-ssl.sh
  8. mkcert -cert-file localhost.crt -key-file localhost.key localhost 127.0.0.1 $ZAMMAD_BIND_IP $1
  9. mkcert -install
  10. mkdir -p config/ssl
  11. mv localhost.key config/ssl/localhost.key
  12. mv localhost.crt config/ssl/localhost.crt