You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
364 B
Bash
12 lines
364 B
Bash
#!/bin/sh
|
|
|
|
if [ -z ENABLE_CERTBOT ] || [ -f /certs/cert.pem ]
|
|
then
|
|
cp /etc/nginx/nginx.conf.default /etc/nginx/nginx.conf
|
|
else
|
|
openssl req -newkey rsa:2048 -x509 -keyout /tmp/snakeoil.pem -out /tmp/snakeoil.pem -days 365 -nodes -subj "/C=NA/ST=None/L=None/O=None/CN=$DOMAIN"
|
|
cp /etc/nginx/nginx.conf.fallback /etc/nginx/nginx.conf
|
|
fi
|
|
|
|
nginx -g 'daemon off;'
|