Update and rename 00-nginx_correct.sh to 00-refresh_files.sh

This commit is contained in:
Alexandre
2023-03-08 15:39:02 +01:00
committed by GitHub
parent c3b2717fe2
commit e98e82560a
2 changed files with 12 additions and 15 deletions

View File

@@ -1,15 +0,0 @@
#!/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" /defaults/nginx/site-confs/default.conf.sample
# Delete end of file
sed -i '1h;1!H;$!d;g;s/\(.*\)}/\1/' /defaults/nginx/site-confs/default.conf.sample
# Append lines
cat /defaults/nginx_addition >> /defaults/nginx/site-confs/default.conf.sample

View File

@@ -0,0 +1,12 @@
#!/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
# rm /data/config/crontabs
if [ -d /data/config/crontabs ]; then
rm -r /data/config/crontabs
fi