startup.sh 499 B

1234567891011121314
  1. #!/bin/bash
  2. if [ ! -f /etc/nginx/ssl/default.crt ]; then
  3. openssl genrsa -out "/etc/nginx/ssl/default.key" 2048
  4. openssl req -new -key "/etc/nginx/ssl/default.key" -out "/etc/nginx/ssl/default.csr" -subj "/CN=default/O=default/C=UK"
  5. openssl x509 -req -days 365 -in "/etc/nginx/ssl/default.csr" -signkey "/etc/nginx/ssl/default.key" -out "/etc/nginx/ssl/default.crt"
  6. chmod 644 /etc/nginx/ssl/default.key
  7. fi
  8. # Start crond in background
  9. crond -l 2 -b
  10. # Start nginx in foreground
  11. nginx