diff options
author | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2017-05-27 21:54:24 +0300 |
---|---|---|
committer | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2017-05-27 21:54:24 +0300 |
commit | e8164dbd905c1753e2cab43bcd7dc369f03d98e3 (patch) | |
tree | 49840b5cf889d27f6e10f26785b54d84bf59a8ff /kickstart-static64.sh | |
parent | 0d476301e6c6fcb9e1b22c4a8e4358766c59ba4a (diff) |
added kickstart-static64.sh
Diffstat (limited to 'kickstart-static64.sh')
-rwxr-xr-x | kickstart-static64.sh | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/kickstart-static64.sh b/kickstart-static64.sh new file mode 100755 index 0000000000..db0fda162c --- /dev/null +++ b/kickstart-static64.sh @@ -0,0 +1,37 @@ +#!/usr/bin/env sh + +if [ "$(uname -m)" != "x86_64" ] + then + echo >&2 "Static binary versions of netdata are available only for 64bit Intel/AMD CPUs (x86_64), but yours is: $(uname -m)." + exit 1 +fi + +if [ "$(uname -s)" != "Linux" ] + then + echo >&2 "Static binary versions of netdata are available only for Linux, but this system is $(uname -s)" + exit 1 +fi + +BASE='https://raw.githubusercontent.com/firehol/binary-packages/master' + +echo >&2 "Checking the latest version of static build..." +LATEST="$(curl -Ss "${BASE}/netdata-latest.gz.run")" + +if [ -z "${LATEST}" ] + then + echo >&2 "Cannot find the latest static binary version of netdata." + exit 1 +fi + +echo >&2 "Downloading static netdata binary: ${LATEST}" +curl "${BASE}/${LATEST}" >"/tmp/${LATEST}" +if [ $? -ne 0 ] + then + echo >&2 "Failed to download the latest static binary version of netdata." + exit 1 +fi +chmod 755 "/tmp/${LATEST}" + +echo >&2 "Executing the downloaded self-extracting archive" +sudo sh "/tmp/${LATEST}" + |