@cryptotaxi247 / netdata-1 / commits / c061d25ff

Update fping version (#10977)

Habetdin committed Apr 15, 2021 at 12:01 UTC c061d25ff1542ee9d29d1d5fa0887a5b451cfddc
1 file changed +6 -4
collectors/fping.plugin/fping.plugin.in
+6 -4
@@ -16,6 +16,8 @@ if [ "${1}" = "install" ]
16 then
17 [ "${UID}" != 0 ] && echo >&2 "Please run me as root. This will install a single binary file: /usr/local/bin/fping." && exit 1
18
19 + [ -z "${2}" ] && fping_version="5.0" || fping_version="${2}"
20 +
21 run() {
22 printf >&2 " > "
23 printf >&2 "%q " "${@}"
@@ -38,14 +40,14 @@ if [ "${1}" = "install" ]
40
41 run cd /usr/src
42
41 - if [ -d fping-4.2 ]
43 + if [ -d "fping-${fping_version}" ]
44 then
43 - run rm -rf fping-4.2 || exit 1
45 + run rm -rf "fping-${fping_version}" || exit 1
46 fi
47
46 - download 'https://github.com/schweikert/fping/releases/download/v4.2/fping-4.2.tar.gz' | run tar -zxvpf -
48 + download "https://github.com/schweikert/fping/releases/download/v${fping_version}/fping-${fping_version}.tar.gz" | run tar -zxvpf -
49 [ $? -ne 0 ] && exit 1
48 - run cd fping-4.2 || exit 1
50 + run cd "fping-${fping_version}" || exit 1
51
52 run ./configure --prefix=/usr/local
53 run make clean