@cryptotaxi247 / netdata-1 / commits / cbe45897d

fix: wget log spam in headless mode (#5359)

Maciej Krüger committed Feb 11, 2019 at 11:26 UTC cbe45897dec5d4013c4e8228ddad715f5366d8c6
1 file changed +5 -1
netdata-installer.sh
+5 -1
@@ -44,7 +44,11 @@ download() {
44 url="${1}"
45 dest="${2}"
46 if command -v wget >/dev/null 2>&1; then
47 - run wget -O - "${url}" >"${dest}" || fatal "Cannot download ${url}"
47 + if [ -t 1 ]; then
48 + run wget -O - "${url}" >"${dest}" || fatal "Cannot download ${url}"
49 + else
50 + run wget --progress=dot:mega -O - "${url}" >"${dest}" || fatal "Cannot download ${url}"
51 + fi
52 elif command -v curl >/dev/null 2>&1; then
53 run curl "${url}" >"${dest}" || fatal "Cannot download ${url}"
54 else