Skip to content

Commit 7a7d986

Browse files
committed
dont add group if root
1 parent b505824 commit 7a7d986

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packaging/docker/run.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ fi
1212

1313
# Needed to read Proxmox VMs and (LXC) containers configuration files (name resolution + CPU and memory limits)
1414
function add_netdata_to_proxmox_conf_files_group() {
15+
[ "${DOCKER_USR}" = "root" ] && return
16+
1517
local group_guid
1618
group_guid="$(stat -c %g /host/etc/pve 2>/dev/null || true)"
1719
[ -z "${group_guid}" ] && return
@@ -35,6 +37,8 @@ function add_netdata_to_proxmox_conf_files_group() {
3537

3638
# Needed to access NVIDIA GPU monitoring
3739
function add_netdata_to_nvidia_group() {
40+
[ "${DOCKER_USR}" = "root" ] && return
41+
3842
local group_gid
3943
group_gid="$(stat -c %g /dev/nvidiactl 2>/dev/null || true)"
4044
[ -z "${group_gid}" ] && return

0 commit comments

Comments
 (0)