diff --git a/services/netdata.yaml b/services/netdata.yaml index bc118c6..9f090a2 100755 --- a/services/netdata.yaml +++ b/services/netdata.yaml @@ -15,7 +15,7 @@ services: - /sys:/host/sys:ro - /etc/passwd:/host/etc/passwd:ro - /etc/group:/host/etc/group:ro - - /etc/os-release:/host/etc/os-release:ro + - ${OS_RELEASE_FILEPATH}:/host/etc/os-release:ro - /var/run/docker.sock:/var/run/docker.sock:ro labels: - "traefik.enable=true" diff --git a/update-all.sh b/update-all.sh index fb7b8be..af5af6a 100755 --- a/update-all.sh +++ b/update-all.sh @@ -82,6 +82,15 @@ for svc in $(cat services.conf | grep "\-vpn: enable" | sed -E "s/(.*)\: enable/ fi done +# Detect Synology devices for Netdata compatibility +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 + export OS_RELEASE_FILEPATH="/etc/VERSION" + else + export OS_RELEASE_FILEPATH="/etc/os-release" + fi +done + # Fetch all YAML files disabled_pattern="" while read -r line ; do