No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

entrypoint.sh 825 B

123456789101112131415161718192021222324252627
  1. #!/usr/bin/env bash
  2. create_wildcard_certificate () {
  3. openssl req -x509 -newkey rsa:4096 -nodes -keyout ${1}.key -out ${1}.crt -days 365 -subj "/C=FR/ST=Gironde/L=Bordeaux/O=LessPass/OU=LessPass/CN=*.${1}"
  4. }
  5. if [[ ! -f /opt/app/ssl/${FQDN}.crt || ! -f /opt/app/ssl/${FQDN}.key ]]; then
  6. echo "${FQDN}.crt or ${FQDN}.key not found! Generate wildcard certificate"
  7. cd /opt/app/ssl
  8. create_wildcard_certificate ${FQDN}
  9. fi
  10. mkdir -p /etc/httpd/ssl
  11. chmod 755 /etc/httpd/ssl
  12. cp /opt/app/ssl/${FQDN}.crt /etc/httpd/ssl/
  13. chmod 644 /etc/httpd/ssl/${FQDN}.crt
  14. mkdir -p /etc/httpd/ssl/private
  15. chmod 710 /etc/httpd/ssl/private
  16. cp /opt/app/ssl/${FQDN}.key /etc/httpd/ssl/private/
  17. chmod 640 /etc/httpd/ssl/private/${FQDN}.key
  18. /opt/app/venv/bin/python /opt/app/generate_apache_conf.py
  19. cat /etc/httpd/conf.d/lesspass.conf
  20. exec "$@"