summaryrefslogtreecommitdiffstats
path: root/packaging/installer/kickstart-static64.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2019-09-03 10:23:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2019-09-03 10:23:38 +0000
commit574098461cd45be12a497afbdac6f93c58978387 (patch)
tree9eb60a5930b7c20d42f7fde1e234cae3968ed3d9 /packaging/installer/kickstart-static64.sh
parentAdding upstream version 1.16.1. (diff)
downloadnetdata-574098461cd45be12a497afbdac6f93c58978387.tar.xz
netdata-574098461cd45be12a497afbdac6f93c58978387.zip
Adding upstream version 1.17.0.upstream/1.17.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'packaging/installer/kickstart-static64.sh')
-rwxr-xr-xpackaging/installer/kickstart-static64.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/packaging/installer/kickstart-static64.sh b/packaging/installer/kickstart-static64.sh
index a9f11238..34ca116d 100755
--- a/packaging/installer/kickstart-static64.sh
+++ b/packaging/installer/kickstart-static64.sh
@@ -189,7 +189,7 @@ done
# ---------------------------------------------------------------------------------------------------------------------
TMPDIR=$(create_tmp_directory)
-cd "${TMPDIR}" || :
+cd "${TMPDIR}"
set_tarball_urls "${RELEASE_CHANNEL}"
progress "Downloading static netdata binary: ${NETDATA_TARBALL_URL}"
@@ -202,12 +202,14 @@ fi
# ---------------------------------------------------------------------------------------------------------------------
progress "Installing netdata"
-
run ${sudo} sh "${TMPDIR}/netdata-latest.gz.run" ${opts} ${inner_opts}
#shellcheck disable=SC2181
if [ $? -eq 0 ]; then
- rm "${TMPDIR}/netdata-latest.gz.run"
+ run ${sudo} rm "${TMPDIR}/netdata-latest.gz.run"
+ if [ ! "${TMPDIR}" = "/" ] && [ -d "${TMPDIR}" ]; then
+ run ${sudo} rm -rf "${TMPDIR}"
+ fi
else
echo >&2 "NOTE: did not remove: ${TMPDIR}/netdata-latest.gz.run"
fi