summaryrefslogtreecommitdiffstats
path: root/docker/run.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--docker/run.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/docker/run.sh b/docker/run.sh
new file mode 100644
index 00000000..b4cf52c7
--- /dev/null
+++ b/docker/run.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+#set -e
+
+if [ ${PGID+x} ]; then
+ echo "Adding user netdata to group with id ${PGID}"
+ addgroup -g "${PGID}" -S hostgroup 2>/dev/null
+ sed -i "s/${PGID}:$/${PGID}:netdata/g" /etc/group
+fi
+
+exec /usr/sbin/netdata -u netdata -D -s /host -p "${NETDATA_PORT}" "$@"