diff options
Diffstat (limited to 'packaging')
-rwxr-xr-x | packaging/docker/run.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/packaging/docker/run.sh b/packaging/docker/run.sh index 1e001256c2..244f92c421 100755 --- a/packaging/docker/run.sh +++ b/packaging/docker/run.sh @@ -49,6 +49,12 @@ if mountpoint -q /etc/netdata && [ -z "$(ls -A /etc/netdata)" ]; then cp -a /etc/netdata.stock/. /etc/netdata fi +if mountpoint -q /etc/netdata; then + hostname > /etc/netdata/.container-hostname +else + rm -f /etc/netdata/.container-hostname +fi + if [ -n "${NETDATA_CLAIM_URL}" ] && [ -n "${NETDATA_CLAIM_TOKEN}" ] && [ ! -f /var/lib/netdata/cloud.d/claimed_id ]; then # shellcheck disable=SC2086 /usr/sbin/netdata-claim.sh -token="${NETDATA_CLAIM_TOKEN}" \ |