Skip to content
Permalink
Browse files

Roll to Buster stable, patch speedtest

  • Loading branch information...
NEMS Linux
NEMS Linux committed Jul 8, 2019
1 parent 464aaa3 commit 566b996368fccf10f8a37b2ee1ddfd781790cc29
Showing with 19 additions and 2 deletions.
  1. +11 −2 data/1.5/nagios/plugins/check_speedtest-cli.sh
  2. +8 −0 patches.sh
@@ -22,7 +22,7 @@
########################################################################################################################################################

plugin_name="NEMS speedtest-cli plugin"
version="1.3"
version="1.5"
# Based on "1.2 2017122011:01"

#####################################################################
@@ -45,6 +45,9 @@ version="1.3"
#
# Version 1.4 - Use best server number or passed arg based on settings in NEMS System Settings Tool
#
# Version 1.5 - NEMS00001 Remove dependency on server ID being specified
# That said, also added automatic re-generation, but not used right now
#
#####################################################################
# function to output script usage
usage()
@@ -310,7 +313,10 @@ if [ "$Loc" == "e" ]; then
if [ "$debug" == "TRUE" ]; then
echo "External Server defined"
fi
command=$($STb/speedtest --no-pre-allocate --server=$SEs --simple)
# command=$($STb/speedtest --no-pre-allocate --server=$SEs --simple)
# ignoring provided server ID and instead letting speedtest automatically select
# the latest version does this well, unlike the old version where we had to specify
command=$($STb/speedtest --no-pre-allocate --simple)
elif [ "$Loc" == "i" ]; then
if [ "$debug" == "TRUE" ]; then
echo "Internal Server defined"
@@ -342,6 +348,9 @@ fi

if [ "$element_count" -ne "$expected_count" ]; then
echo "You do not have the expected number of indices in your output from SpeedTest. Is it correctly installed? Try running the check with the -V argument to see what is going wrong."
#echo "UNKNOWN: No response from server $SEs. Will redetect."
# redetect
/usr/local/share/nems/nems-scripts/speedtest-detect > /dev/null 2>&1
usage
exit 3
fi
@@ -39,3 +39,11 @@ if [[ $quickfix == 1 ]]; then
cd /usr/local/share/nems/nems-scripts && git pull
fi
fi
# Do the same for fixes
fixes=`/usr/local/bin/nems-info fixes`
if [[ $fixes == 1 ]]; then
if [[ $(find "/var/run/nems-fixes.pid" -mmin +90 -print) ]]; then
kill `cat /var/run/nems-fixes.pid` && rm /var/run/nems-fixes.pid
cd /usr/local/share/nems/nems-scripts && git pull
fi
fi

0 comments on commit 566b996

Please sign in to comment.
You can’t perform that action at this time.