summaryrefslogtreecommitdiffstats
path: root/packaging/docker/run.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2019-05-21 18:55:22 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2019-05-21 18:55:22 +0000
commit61d0027904ee9c040985b1642ca228737d616d03 (patch)
treec90838c137b4dc4a2de1cff9f2d7be5552d605e7 /packaging/docker/run.sh
parentAdding upstream version 1.14.0. (diff)
downloadnetdata-61d0027904ee9c040985b1642ca228737d616d03.tar.xz
netdata-61d0027904ee9c040985b1642ca228737d616d03.zip
Adding upstream version 1.15.0.upstream/1.15.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-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}" "$@"