diff options
-rwxr-xr-x | packaging/installer/netdata-updater.sh | 6 |
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 |