Add Synology compatibility for Netdata

This commit is contained in:
Jean Froment 2022-02-15 00:02:49 +01:00
parent 4166ced7ce
commit f5a42cb0be
2 changed files with 10 additions and 1 deletions

View File

@ -15,7 +15,7 @@ services:
- /sys:/host/sys:ro - /sys:/host/sys:ro
- /etc/passwd:/host/etc/passwd:ro - /etc/passwd:/host/etc/passwd:ro
- /etc/group:/host/etc/group: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 - /var/run/docker.sock:/var/run/docker.sock:ro
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"

View File

@ -82,6 +82,15 @@ for svc in $(cat services.conf | grep "\-vpn: enable" | sed -E "s/(.*)\: enable/
fi fi
done 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 # Fetch all YAML files
disabled_pattern="" disabled_pattern=""
while read -r line ; do while read -r line ; do