summaryrefslogtreecommitdiffstats
path: root/netdata-installer.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2019-02-21 19:34:08 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2019-02-21 19:34:08 +0000
commit6d2e027eb728c8294fdd7c3692e9853b3ca2603b (patch)
tree3e190253238075ac8590b2f214852d2256fdad53 /netdata-installer.sh
parentOpting out by default from sending anonymous statistics (phone home). (diff)
downloadnetdata-6d2e027eb728c8294fdd7c3692e9853b3ca2603b.tar.xz
netdata-6d2e027eb728c8294fdd7c3692e9853b3ca2603b.zip
Merging upstream version 1.12.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-xnetdata-installer.sh23
1 files changed, 15 insertions, 8 deletions
diff --git a/netdata-installer.sh b/netdata-installer.sh
index 55ee5978e..080570c87 100755
--- a/netdata-installer.sh
+++ b/netdata-installer.sh
@@ -43,10 +43,10 @@ fi
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 "${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
@@ -278,7 +278,7 @@ if [ "${UID}" -ne 0 ]; then
if [ -z "${NETDATA_PREFIX}" ]; then
netdata_banner "wrong command line options!"
cat <<NONROOTNOPREFIX
-
+
${TPUT_RED}${TPUT_BOLD}Sorry! This will fail!${TPUT_RESET}
You are attempting to install netdata as non-root, but you plan
@@ -302,7 +302,7 @@ NONROOTNOPREFIX
else
cat <<NONROOT
-
+
${TPUT_RED}${TPUT_BOLD}IMPORTANT${TPUT_RESET}:
You are about to install netdata as a non-root user.
Netdata will work, but a few data collection modules that
@@ -756,6 +756,11 @@ if [ ${UID} -eq 0 ]; then
run chmod 4750 "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/freeipmi.plugin"
fi
+ if [ -f "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/nfacct.plugin" ]; then
+ run chown root:${NETDATA_GROUP} "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/nfacct.plugin"
+ run chmod 4750 "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/nfacct.plugin"
+ fi
+
if [ -f "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/cgroup-network" ]; then
run chown root:${NETDATA_GROUP} "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/cgroup-network"
run chmod 4750 "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/cgroup-network"
@@ -778,7 +783,7 @@ fi
install_go() {
# When updating this value, ensure correct checksums in packaging/go.d.checksums
- GO_PACKAGE_VERSION="v0.0.2"
+ GO_PACKAGE_VERSION="v0.1.0"
ARCH_MAP=(
'i386::386'
'i686::386'
@@ -805,7 +810,9 @@ install_go() {
done
tmp=$(mktemp -d /tmp/netdata-go-XXXXXX)
GO_PACKAGE_BASENAME="go.d.plugin-$GO_PACKAGE_VERSION.$OS-$ARCH"
+
download "https://github.com/netdata/go.d.plugin/releases/download/$GO_PACKAGE_VERSION/$GO_PACKAGE_BASENAME" "${tmp}/$GO_PACKAGE_BASENAME"
+
download "https://github.com/netdata/go.d.plugin/releases/download/$GO_PACKAGE_VERSION/config.tar.gz" "${tmp}/config.tar.gz"
grep "${GO_PACKAGE_BASENAME}" "${installer_dir}/packaging/go.d.checksums" > "${tmp}/sha256sums.txt" 2>/dev/null
grep "config.tar.gz" "${installer_dir}/packaging/go.d.checksums" >> "${tmp}/sha256sums.txt" 2>/dev/null
@@ -1003,7 +1010,7 @@ if [ "${AUTOUPDATE}" = "1" ]; then
rm -f "${crondir}/netdata-updater.sh"
fi
progress "Installing new netdata-updater in cron"
-
+
rm ${installer_dir}/netdata-updater.sh || : #TODO(paulfantom): this workaround should be removed after v1.13.0-rc1. It just needs to be propagated
rm -f "${crondir}/netdata-updater"