Create 00-nginx_correct.sh

This commit is contained in:
Alexandre
2023-03-05 19:28:34 +01:00
committed by GitHub
parent 396f200ec1
commit 361d1ecb3e

View File

@@ -0,0 +1,14 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
# Clean nginx files at each reboot
if [ -d /data/config/nginx ]; then
rm -r /data/config/nginx
fi
# Prepare file
sed -i "/Strict-Transport-Security/d" /nginx/site-confs/default.conf.sample
sed -i '$d' /nginx/site-confs/default.conf.sample
# Append lines
cat /defaults/nginx_addition >> /nginx/site-confs/default.conf.sample