2018-11-13 20:44:51 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
if [ ! -f /etc/nginx/ssl/default.crt ]; then
|
|
|
|
openssl genrsa -out "/etc/nginx/ssl/default.key" 2048
|
|
|
|
openssl req -new -key "/etc/nginx/ssl/default.key" -out "/etc/nginx/ssl/default.csr" -subj "/CN=default/O=default/C=UK"
|
|
|
|
openssl x509 -req -days 365 -in "/etc/nginx/ssl/default.csr" -signkey "/etc/nginx/ssl/default.key" -out "/etc/nginx/ssl/default.crt"
|
2020-11-25 19:50:03 +08:00
|
|
|
chmod 644 /etc/nginx/ssl/default.key
|
2018-11-13 20:44:51 +08:00
|
|
|
fi
|
|
|
|
|
2019-05-18 10:54:45 +08:00
|
|
|
# Start crond in background
|
|
|
|
crond -l 2 -b
|
|
|
|
|
|
|
|
# Start nginx in foreground
|
2018-11-13 20:44:51 +08:00
|
|
|
nginx
|