summaryrefslogtreecommitdiffstats
path: root/packaging/installer/netdata-updater.sh
diff options
context:
space:
mode:
authorPaweł Krupa <pawel@krupa.net.pl>2019-02-25 21:43:18 +0100
committerGitHub <noreply@github.com>2019-02-25 21:43:18 +0100
commite11ffb482980bef8f182b6160d58884d0c313ce9 (patch)
tree1fdbdec78ac13d254e0dd9318ab0fca441e1a73d /packaging/installer/netdata-updater.sh
parent2ee2d94891e88d9c773f7633746a38fb341f2bac (diff)
Update netdata-updater.sh
Diffstat (limited to 'packaging/installer/netdata-updater.sh')
-rw-r--r--packaging/installer/netdata-updater.sh8
1 files changed, 3 insertions, 5 deletions
diff --git a/packaging/installer/netdata-updater.sh b/packaging/installer/netdata-updater.sh
index ae59889e9b..13759abd26 100644
--- a/packaging/installer/netdata-updater.sh
+++ b/packaging/installer/netdata-updater.sh
@@ -21,7 +21,7 @@ error() {
}
# this is what we will do if it fails (head-less only)
-failed() {
+fatal() {
error "FAILED TO UPDATE NETDATA : ${1}"
if [ -n "${logfile}" ]; then
@@ -39,7 +39,7 @@ download() {
elif command -v wget >/dev/null 2>&1; then
wget -T 15 -O - "${url}" >"${dest}" || fatal "Cannot download ${url}"
else
- failed "I need curl or wget to proceed, but neither is available on this system."
+ fatal "I need curl or wget to proceed, but neither is available on this system."
fi
}
@@ -105,8 +105,7 @@ EOF
source "${ENVIRONMENT_FILE}" || exit 1
if [ "${INSTALL_UID}" != "$(id -u)" ]; then
- echo >&2 "You are running this script as user with uid $(id -u). We recommend to run this script as root (user with uid 0)"
- exit 1
+ fatal "You are running this script as user with uid $(id -u). We recommend to run this script as root (user with uid 0)"
fi
logfile=
@@ -122,6 +121,5 @@ else
exec 3>"${logfile}"
fi
-
# the installer updates this script - so we run and exit in a single line
update && exit 0