Remove init migration

This commit is contained in:
Eric Nemchik 2021-11-27 17:44:07 -06:00
parent 4634de50a0
commit 3ced767d8e
3 changed files with 1 additions and 53 deletions

View File

@ -1,6 +0,0 @@
#!/usr/bin/with-contenv bash
# shellcheck source=/dev/null
source /defaults/migrate.sh
migrate "/config/nginx/proxy.conf" "/config/nginx/location-confs/proxy.conf"

View File

@ -60,7 +60,7 @@ cp -R /config/fail2ban/action.d /etc/fail2ban/
cp /defaults/fail2ban/fail2ban.local /etc/fail2ban/ cp /defaults/fail2ban/fail2ban.local /etc/fail2ban/
cp /config/fail2ban/jail.local /etc/fail2ban/jail.local cp /config/fail2ban/jail.local /etc/fail2ban/jail.local
# copy crontab and proxy defaults if needed # copy crontab and nginx defaults if needed
[[ ! -f /config/crontabs/root ]] && \ [[ ! -f /config/crontabs/root ]] && \
cp /etc/crontabs/root /config/crontabs/ cp /etc/crontabs/root /config/crontabs/
[[ ! -f /config/nginx/location-confs/proxy.conf ]] && \ [[ ! -f /config/nginx/location-confs/proxy.conf ]] && \

View File

@ -1,46 +0,0 @@
#!/usr/bin/with-contenv bash
# NEEDS TO BE REWORKED FOR NEW STRUCTURE
## Should cycle through all *.sample files in /defaults/nginx/ (instead of hardcoded list)
## Should be moved into the alpine nginx base image
nginx_confs=( \
authelia-location.conf \
authelia-server.conf \
geoip2.conf \
ldap.conf \
nginx.conf \
proxy.conf \
site-confs/default.conf \
ssl.conf )
for i in ${nginx_confs[@]}; do
if [ "$(sed -nE 's|^## Version ([0-9]{4}\/[0-9]{2}\/[0-9]{2}).*|\1|p' /config/nginx/${i})" != "$(sed -nE 's|^## Version ([0-9]{4}\/[0-9]{2}\/[0-9]{2}).*|\1|p' /defaults/$(basename ${i}))" ]; then
nginx_confs_changed="/config/nginx/${i}\n${nginx_confs_changed}"
fi
done
if [ -n "$nginx_confs_changed" ]; then
echo "**** The following nginx confs have different version dates than the defaults that are shipped. ****"
echo "**** This may be due to user customization or an update to the defaults. ****"
echo "**** To update them to the latest defaults shipped within the image, delete these files and restart the container. ****"
echo "**** If they are user customized, check the date version at the top and compare to the upstream changelog via the link. ****"
echo -e "${nginx_confs_changed}"
fi
proxy_confs=$(ls /config/nginx/proxy-confs/*.conf 2>/dev/null)
for i in $proxy_confs; do
if [ -f "${i}.sample" ]; then
if [ "$(sed -nE 's|^## Version ([0-9]{4}\/[0-9]{2}\/[0-9]{2}).*|\1|p' ${i})" != "$(sed -nE 's|^## Version ([0-9]{4}\/[0-9]{2}\/[0-9]{2}).*|\1|p' ${i}.sample)" ]; then
proxy_confs_changed="${i}\n${proxy_confs_changed}"
fi
fi
done
if [ -n "$proxy_confs_changed" ]; then
echo "**** The following reverse proxy confs have different version dates than the samples that are shipped. ****"
echo "**** This may be due to user customization or an update to the samples. ****"
echo "**** You should compare them to the samples in the same folder to make sure you have the latest updates. ****"
echo -e "${proxy_confs_changed}"
fi