summaryrefslogtreecommitdiffstats
path: root/packaging/installer/kickstart.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2019-09-03 10:23:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2019-09-03 10:23:48 +0000
commitcd7ed12292aef11d9062b64f61215174e8cc1860 (patch)
tree9998ab03d153956743d9319cf3a0279b9593ce36 /packaging/installer/kickstart.sh
parentReleasing debian version 1.16.1-6. (diff)
downloadnetdata-cd7ed12292aef11d9062b64f61215174e8cc1860.tar.xz
netdata-cd7ed12292aef11d9062b64f61215174e8cc1860.zip
Merging upstream version 1.17.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-xpackaging/installer/kickstart.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/packaging/installer/kickstart.sh b/packaging/installer/kickstart.sh
index d396f139..bab95fda 100755
--- a/packaging/installer/kickstart.sh
+++ b/packaging/installer/kickstart.sh
@@ -304,7 +304,7 @@ if [ "${INTERACTIVE}" = "0" ]; then
fi
TMPDIR=$(create_tmp_directory)
-cd ${TMPDIR} || :
+cd "${TMPDIR}"
dependencies
@@ -328,7 +328,9 @@ cd netdata-* || fatal "Cannot cd to netdata source tree"
if [ -x netdata-installer.sh ]; then
progress "Installing netdata..."
run ${sudo} ./netdata-installer.sh ${NETDATA_UPDATES} ${NETDATA_INSTALLER_OPTIONS} "${@}" || fatal "netdata-installer.sh exited with error"
- rm -rf "${TMPDIR}" >/dev/null 2>&1
+ if [ -d "${TMPDIR}" ] && [ ! "${TMPDIR}" = "/" ]; then
+ run ${sudo} rm -rf "${TMPDIR}" >/dev/null 2>&1
+ fi
else
fatal "Cannot install netdata from source (the source directory does not include netdata-installer.sh). Leaving all files in ${TMPDIR}"
fi