summaryrefslogtreecommitdiffstats
path: root/packaging/installer/kickstart.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.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.sh')
-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 d396f139e..bab95fda2 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