summaryrefslogtreecommitdiffstats
path: root/packaging
diff options
context:
space:
mode:
authorPaweł Krupa <pawel@krupa.net.pl>2019-02-21 19:34:46 +0100
committerGitHub <noreply@github.com>2019-02-21 19:34:46 +0100
commit24c500a1ce177a1a0653a113303848efc2faad4e (patch)
tree0c78972fd89b7a93ec59fddc803b21d2090f3f26 /packaging
parent02fb32a120f73e36d995eef735759b42ec3df6f3 (diff)
revert #5457 and test if files exist after installation (#5460)
[netdata patch release]
Diffstat (limited to 'packaging')
-rw-r--r--packaging/installer/functions.sh4
-rwxr-xr-xpackaging/installer/kickstart-static64.sh8
-rwxr-xr-xpackaging/installer/kickstart.sh8
-rw-r--r--packaging/installer/netdata-updater.sh10
4 files changed, 17 insertions, 13 deletions
diff --git a/packaging/installer/functions.sh b/packaging/installer/functions.sh
index a2d7365ea6..0d04508427 100644
--- a/packaging/installer/functions.sh
+++ b/packaging/installer/functions.sh
@@ -189,6 +189,10 @@ portable_find_processors() {
portable_find_processors
# -----------------------------------------------------------------------------
+fatal() {
+ printf >&2 "${TPUT_BGRED}${TPUT_WHITE}${TPUT_BOLD} ABORTED ${TPUT_RESET} ${*} \n\n"
+ exit 1
+}
run_ok() {
printf >&2 "${TPUT_BGGREEN}${TPUT_WHITE}${TPUT_BOLD} OK ${TPUT_RESET} ${*} \n\n"
diff --git a/packaging/installer/kickstart-static64.sh b/packaging/installer/kickstart-static64.sh
index 24e057c819..3a6b2653ea 100755
--- a/packaging/installer/kickstart-static64.sh
+++ b/packaging/installer/kickstart-static64.sh
@@ -83,10 +83,10 @@ fatal() {
download() {
url="${1}"
dest="${2}"
- if command -v wget >/dev/null 2>&1; then
- run wget -O - "${url}" >"${dest}" || fatal "Cannot download ${url}"
- elif command -v curl >/dev/null 2>&1; then
- run curl -L "${url}" >"${dest}" || fatal "Cannot download ${url}"
+ if command -v curl >/dev/null 2>&1; then
+ run curl -L --connect-timeout 5 --retry 3 "${url}" >"${dest}" || fatal "Cannot download ${url}"
+ elif command -v wget >/dev/null 2>&1; then
+ run wget -T 15 -O - "${url}" >"${dest}" || fatal "Cannot download ${url}"
else
fatal "I need curl or wget to proceed, but neither is available on this system."
fi
diff --git a/packaging/installer/kickstart.sh b/packaging/installer/kickstart.sh
index e03c81f79d..9a5e848ba8 100755
--- a/packaging/installer/kickstart.sh
+++ b/packaging/installer/kickstart.sh
@@ -115,10 +115,10 @@ fatal() {
download() {
url="${1}"
dest="${2}"
- if command -v wget >/dev/null 2>&1; then
- run wget -O - "${url}" >"${dest}" || fatal "Cannot download ${url}"
- elif command -v curl >/dev/null 2>&1; then
- run curl -L "${url}" >"${dest}" || fatal "Cannot download ${url}"
+ if command -v curl >/dev/null 2>&1; then
+ run curl -L --connect-timeout 5 --retry 3 "${url}" >"${dest}" || fatal "Cannot download ${url}"
+ elif command -v wget >/dev/null 2>&1; then
+ run wget -T 15 -O - "${url}" >"${dest}" || fatal "Cannot download ${url}"
else
fatal "I need curl or wget to proceed, but neither is available on this system."
fi
diff --git a/packaging/installer/netdata-updater.sh b/packaging/installer/netdata-updater.sh
index f6a9492f46..7846ce8bfa 100644
--- a/packaging/installer/netdata-updater.sh
+++ b/packaging/installer/netdata-updater.sh
@@ -34,12 +34,12 @@ failed() {
download() {
url="${1}"
dest="${2}"
- if command -v wget >/dev/null 2>&1; then
- wget -O - "${url}" >"${dest}" 2>&3 || echo >&2 "Cannot download ${url}" >&3 2>&3
- elif command -v curl >/dev/null 2>&1; then
- curl -L "${url}" >"${dest}" 2>&3 || echo "Cannot download ${url}" >&3 2>&3
+ if command -v curl >/dev/null 2>&1; then
+ curl -L --connect-timeout 5 --retry 3 "${url}" >"${dest}" || fatal "Cannot download ${url}"
+ elif command -v wget >/dev/null 2>&1; then
+ wget -T 15 -O - "${url}" >"${dest}" || fatal "Cannot download ${url}"
else
- failed "curl or wget is needed to proceed, but neither is available on this system."
+ failed "I need curl or wget to proceed, but neither is available on this system."
fi
}