summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Mills <1290234+prologic@users.noreply.github.com>2020-01-31 22:52:22 +1000
committerGitHub <noreply@github.com>2020-01-31 07:52:22 -0500
commitc47e7aac52246c0748f0e4c1b31d54641da3464e (patch)
tree6f92ccccca703fca026f4a144e4ce35c0cb6a7a2
parent29d9b5e51603792ee27ef5a21f1de0ba8e130158 (diff)
Fixes a bug in DO_NOT_TRACK expression (#7929)
* Fixed bug in DO_NOT_TRACK expression * Fix kickstart-static64 checksum in docs. Co-authored-by: Austin S. Hemmelgarn <ahferroin7@gmail.com>
-rwxr-xr-xdaemon/anonymous-statistics.sh.in2
-rwxr-xr-xnetdata-installer.sh2
-rwxr-xr-xpackaging/docker/run.sh2
-rwxr-xr-xpackaging/installer/kickstart-static64.sh2
-rw-r--r--packaging/installer/methods/kickstart-64.md2
-rwxr-xr-xpackaging/makeself/install-or-update.sh2
6 files changed, 6 insertions, 6 deletions
diff --git a/daemon/anonymous-statistics.sh.in b/daemon/anonymous-statistics.sh.in
index 841f9ea7cf..41b1c886c7 100755
--- a/daemon/anonymous-statistics.sh.in
+++ b/daemon/anonymous-statistics.sh.in
@@ -18,7 +18,7 @@ ACTION_DATA=$(echo "${ACTION_DATA}" | tr '"' "'")
# -------------------------------------------------------------------------------------------------
# check opt-out
-if [ -f "@configdir_POST@/.opt-out-from-anonymous-statistics" ] || [ ! "$DO_NOT_TRACK" -eq 0 ] || [ -n "$DO_NOT_TRACK" ]; then
+if [ -f "@configdir_POST@/.opt-out-from-anonymous-statistics" ] || [ ! "${DO_NOT_TRACK:-0}" -eq 0 ] || [ -n "$DO_NOT_TRACK" ]; then
exit 0
fi
diff --git a/netdata-installer.sh b/netdata-installer.sh
index 3d73ae5164..49b5433598 100755
--- a/netdata-installer.sh
+++ b/netdata-installer.sh
@@ -888,7 +888,7 @@ install_go
# -----------------------------------------------------------------------------
progress "Telemetry configuration"
-if [ ! "$DO_NOT_TRACK" -eq 0 ] || [ -n "$DO_NOT_TRACK" ]; then
+if [ ! "${DO_NOT_TRACK:-0}" -eq 0 ] || [ -n "$DO_NOT_TRACK" ]; then
NETDATA_DISABLE_TELEMETRY=1
fi
diff --git a/packaging/docker/run.sh b/packaging/docker/run.sh
index 70952b10b7..1d886f01ac 100755
--- a/packaging/docker/run.sh
+++ b/packaging/docker/run.sh
@@ -7,7 +7,7 @@
# Author : Pavlos Emm. Katsoulakis <paul@netdata.cloud>
set -e
-if [ ! "$DO_NOT_TRACK" -eq 0 ] || [ -n "$DO_NOT_TRACK" ]; then
+if [ ! "${DO_NOT_TRACK:-0}" -eq 0 ] || [ -n "$DO_NOT_TRACK" ]; then
touch /etc/netdata/.opt-out-from-anonymous-statistics
fi
diff --git a/packaging/installer/kickstart-static64.sh b/packaging/installer/kickstart-static64.sh
index 7f032bbfbe..673cb860a9 100755
--- a/packaging/installer/kickstart-static64.sh
+++ b/packaging/installer/kickstart-static64.sh
@@ -231,7 +231,7 @@ while [ -n "${1}" ]; do
fi
done
-if [ ! "$DO_NOT_TRACK" -eq 0 ] || [ -n "$DO_NOT_TRACK" ]; then
+if [ ! "${DO_NOT_TRACK:-0}" -eq 0 ] || [ -n "$DO_NOT_TRACK" ]; then
NETDATA_INSTALLER_OPTIONS="${NETDATA_INSTALLER_OPTIONS:+${NETDATA_INSTALLER_OPTIONS} }--disable-telemtry"
fi
diff --git a/packaging/installer/methods/kickstart-64.md b/packaging/installer/methods/kickstart-64.md
index 6660b43cfa..3b253df1f3 100644
--- a/packaging/installer/methods/kickstart-64.md
+++ b/packaging/installer/methods/kickstart-64.md
@@ -68,7 +68,7 @@ To use `md5sum` to verify the intregity of the `kickstart-static64.sh` script yo
command above, run the following:
```bash
-[ "788cfe179615158331877a577c140486" = "$(curl -Ss https://my-netdata.io/kickstart-static64.sh | md5sum | cut -d ' ' -f 1)" ] && echo "OK, VALID" || echo "FAILED, INVALID"
+[ "33ecd20452f569c1d9972bcefdf04692" = "$(curl -Ss https://my-netdata.io/kickstart-static64.sh | md5sum | cut -d ' ' -f 1)" ] && echo "OK, VALID" || echo "FAILED, INVALID"
```
If the script is valid, this command will return `OK, VALID`.
diff --git a/packaging/makeself/install-or-update.sh b/packaging/makeself/install-or-update.sh
index 4771f8ee25..fd64015c3b 100755
--- a/packaging/makeself/install-or-update.sh
+++ b/packaging/makeself/install-or-update.sh
@@ -57,7 +57,7 @@ while [ "${1}" ]; do
shift 1
done
-if [ ! "$DO_NOT_TRACK" -eq 0 ] || [ -n "$DO_NOT_TRACK" ]; then
+if [ ! "${DO_NOT_TRACK:-0}" -eq 0 ] || [ -n "$DO_NOT_TRACK" ]; then
REINSTALL_OPTIONS="${REINSTALL_OPTIONS} --disable-telemtry"
fi