Rename custom files for Traefik rules (allow deletion on script run without conflict with generated rules)

This commit is contained in:
Jean Froment 2022-03-06 18:38:44 +01:00
parent d1e2bfa212
commit 18caa638bd
2 changed files with 4 additions and 2 deletions

2
.gitignore vendored
View File

@ -5,7 +5,9 @@
**/traefik/http_auth
backup/
services.conf
traefik/custom/dynamic*.yaml
traefik/custom/custom-*.yaml
samples/custom*/*.yaml
config.yaml

View File

@ -120,10 +120,10 @@ if [[ $(cat config.json | jq '[.services[] | select(.name=="flood" and .enabled=
fi
# Apply other arbitrary custom Traefik config files
# rm -f $f traefik/custom/dynamic-*
rm -f $f traefik/custom/custom-*
for f in `find samples/custom-traefik -maxdepth 1 -mindepth 1 -type f | grep -E "\.yml$|\.yaml$" | sort`; do
echo "[$0] Applying custom Traefik config $f..."
cp $f traefik/custom/dynamic-$(basename $f)
cp $f traefik/custom/custom-$(basename $f)
done
# Detect Synology devices for Netdata compatibility