Add executable regression and sanitizer checks, a hardened release profile, CI, fork security and update policies, release notes, and ephemeral Docker development certificates. Assisted-by: OpenAI Codex (GPT-5) Reviewed-by: Eric Ireland
22 lines
647 B
Bash
Executable File
22 lines
647 B
Bash
Executable File
set -eu
|
|
|
|
cd /etc/nginx/http.d
|
|
CRT="${CRT:-nginx-selfsigned.crt}"
|
|
KEY="${KEY:-nginx-selfsigned.key}"
|
|
CRT_PATH="/etc/ssl/certs/$CRT"
|
|
KEY_PATH="/etc/ssl/private/$KEY"
|
|
|
|
if [ ! -f "$CRT_PATH" ] || [ ! -f "$KEY_PATH" ]
|
|
then
|
|
rm -f "$CRT_PATH" "$KEY_PATH"
|
|
openssl req -x509 -newkey rsa:2048 -sha256 -nodes -days 7 \
|
|
-subj "/CN=localhost" -addext "subjectAltName=DNS:localhost" \
|
|
-keyout "$KEY_PATH" -out "$CRT_PATH"
|
|
chmod 600 "$KEY_PATH"
|
|
fi
|
|
|
|
sed -i "/ssl_certificate \//c\\\tssl_certificate $CRT_PATH;" default.conf
|
|
sed -i "/ssl_certificate_key \//c\\\tssl_certificate_key $KEY_PATH;" default.conf
|
|
|
|
exec nginx -g 'daemon off;'
|