summaryrefslogtreecommitdiffstats
path: root/collectors/fping.plugin/fping.plugin.in
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-05-19 12:33:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-05-19 12:33:27 +0000
commit841395dd16f470e3c051a0a4fff5b91efc983c30 (patch)
tree4115f6eedcddda75067130b80acaff9e51612f49 /collectors/fping.plugin/fping.plugin.in
parentAdding upstream version 1.30.1. (diff)
downloadnetdata-841395dd16f470e3c051a0a4fff5b91efc983c30.tar.xz
netdata-841395dd16f470e3c051a0a4fff5b91efc983c30.zip
Adding upstream version 1.31.0.upstream/1.31.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'collectors/fping.plugin/fping.plugin.in')
-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 5518194b..83c43176 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