summaryrefslogtreecommitdiffstats
path: root/collectors/fping.plugin
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-05-19 12:33:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-05-19 12:33:59 +0000
commit1ee0c09c5742557e037df5421ca62abddb90ae22 (patch)
tree71c0fa48bb6d31d036c9badd7e038527f90d1a73 /collectors/fping.plugin
parentReleasing debian version 1.30.1-1. (diff)
downloadnetdata-1ee0c09c5742557e037df5421ca62abddb90ae22.tar.xz
netdata-1ee0c09c5742557e037df5421ca62abddb90ae22.zip
Merging upstream version 1.31.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'collectors/fping.plugin')
-rwxr-xr-xcollectors/fping.plugin/fping.plugin.in10
1 files changed, 6 insertions, 4 deletions
diff --git a/collectors/fping.plugin/fping.plugin.in b/collectors/fping.plugin/fping.plugin.in
index 5518194be..83c431768 100755
--- a/collectors/fping.plugin/fping.plugin.in
+++ b/collectors/fping.plugin/fping.plugin.in
@@ -16,6 +16,8 @@ if [ "${1}" = "install" ]
then
[ "${UID}" != 0 ] && echo >&2 "Please run me as root. This will install a single binary file: /usr/local/bin/fping." && exit 1
+ [ -z "${2}" ] && fping_version="5.0" || fping_version="${2}"
+
run() {
printf >&2 " > "
printf >&2 "%q " "${@}"
@@ -38,14 +40,14 @@ if [ "${1}" = "install" ]
run cd /usr/src
- if [ -d fping-4.2 ]
+ if [ -d "fping-${fping_version}" ]
then
- run rm -rf fping-4.2 || exit 1
+ run rm -rf "fping-${fping_version}" || exit 1
fi
- download 'https://github.com/schweikert/fping/releases/download/v4.2/fping-4.2.tar.gz' | run tar -zxvpf -
+ download "https://github.com/schweikert/fping/releases/download/v${fping_version}/fping-${fping_version}.tar.gz" | run tar -zxvpf -
[ $? -ne 0 ] && exit 1
- run cd fping-4.2 || exit 1
+ run cd "fping-${fping_version}" || exit 1
run ./configure --prefix=/usr/local
run make clean