summaryrefslogtreecommitdiffstats
path: root/packaging
diff options
context:
space:
mode:
authorIlya Mashchenko <ilya@netdata.cloud>2021-12-08 20:38:25 +0300
committerGitHub <noreply@github.com>2021-12-08 20:38:25 +0300
commite75f29b248337f828f9e4747925f5c9ffcc1b30d (patch)
tree39c504ad2414fa38a02f4754d8c72d4a2ea3ade8 /packaging
parentcc3d232b796ca45a7d7349c2f4a1e801769063a2 (diff)
fix(updater): fix exit code when updating static install && updater script (#11873)
Diffstat (limited to 'packaging')
-rwxr-xr-xpackaging/installer/netdata-updater.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/packaging/installer/netdata-updater.sh b/packaging/installer/netdata-updater.sh
index 59c5fab110..92688cac14 100755
--- a/packaging/installer/netdata-updater.sh
+++ b/packaging/installer/netdata-updater.sh
@@ -460,8 +460,10 @@ if [ "${IS_NETDATA_STATIC_BINARY}" == "yes" ]; then
echo "${install_type}" > /opt/netdata/etc/netdata/.install-type
- echo >&2 "Switching back to ${PREVDIR}"
- cd "${PREVDIR}"
+ if [ -e "${PREVDIR}" ]; then
+ echo >&2 "Switching back to ${PREVDIR}"
+ cd "${PREVDIR}"
+ fi
else
# the installer updates this script - so we run and exit in a single line
update && exit 0