summaryrefslogtreecommitdiffstats
path: root/packaging/docker/run.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2019-04-17 17:57:47 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2019-04-17 17:57:47 +0000
commit1d63948d79ca6f32889656692d6736c9127f2ee1 (patch)
treebb26a34d7c7b62ac30b0d4da15584efe3e2a754a /packaging/docker/run.sh
parentReleasing debian version 1.13.0-1. (diff)
downloadnetdata-1d63948d79ca6f32889656692d6736c9127f2ee1.tar.xz
netdata-1d63948d79ca6f32889656692d6736c9127f2ee1.zip
Merging upstream version 1.14.0~rc0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'packaging/docker/run.sh')
-rw-r--r--packaging/docker/run.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/packaging/docker/run.sh b/packaging/docker/run.sh
new file mode 100644
index 000000000..243cae8a2
--- /dev/null
+++ b/packaging/docker/run.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+#set -e
+
+if [ ${RESCRAMBLE+x} ]; then
+ echo "Reinstalling all packages to get the latest Polymorphic Linux scramble"
+ apk upgrade --update-cache --available
+fi
+
+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}" "$@"