Add support for custom Traefik config files

This commit is contained in:
Jean Froment 2022-02-18 23:48:58 +01:00
parent 4bec84badc
commit 34baae3af1
3 changed files with 11 additions and 1 deletions

3
.gitignore vendored
View File

@ -6,4 +6,5 @@
**/traefik/http_auth **/traefik/http_auth
backup/ backup/
services.conf services.conf
traefik/custom/dynamic*.yaml traefik/custom/dynamic*.yaml
samples/custom*/*.yaml

View File

@ -0,0 +1,3 @@
# Custom Traefik config files
Place in this directory any custom Traefik config file, they will be copied to Traefik folder when running ``update-all.sh`` script.

View File

@ -82,6 +82,12 @@ for svc in $(cat services.conf | grep "\-vpn: enable" | sed -E "s/(.*)\: enable/
fi fi
done done
# Apply other arbitrary custom Traefik config files
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)
done
# Detect Synology devices for Netdata compatibility # Detect Synology devices for Netdata compatibility
if [[ $(cat services.conf | { grep -E "netdata\: enable" || true; } | wc -l) -eq 1 ]]; then if [[ $(cat services.conf | { grep -E "netdata\: enable" || true; } | wc -l) -eq 1 ]]; then
if [[ $(uname -a | { grep synology || true; } | wc -l) -eq 1 ]]; then if [[ $(uname -a | { grep synology || true; } | wc -l) -eq 1 ]]; then