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 abc5c08 commit 7eb87be7307ce439d7c98bb2dd3359e130874505
Showing with 29 additions and 20 deletions.
  1. +0 −18 daily
  2. +7 −2 fixes.sh
  3. +22 −0 speedtest-detect
18 daily
@@ -13,21 +13,3 @@ echo "Running cleanup tasks..."
echo " done."
fi

printf "Setting Internet speedtest server..."
# Detect current first since this will create the conf if missing
speedtestcurrent=`/usr/local/bin/nems-info speedtest`
# Detect the best server
speedtestbest=`/usr/local/bin/nems-info speedtest best`
# Overwrite the conf
if (( $speedtestcurrent != $speedtestbest )); then
if (( $speedtestbest > 0 )); then
/bin/sed -i~ '/speedtestserver/d' /usr/local/share/nems/nems.conf
echo "speedtestserver=$speedtestbest" >> /usr/local/share/nems/nems.conf
echo " done."
else
echo " couldn't detect server."
fi
else
echo " no change."
fi

@@ -40,7 +40,7 @@
echo "Done."

# Update apt here so we don't have to do it below
apt update
apt update --allow-releaseinfo-change

# using hard file location rather than symlink as symlink may not exist yet on older versions
platform=$(/usr/local/share/nems/nems-scripts/info.sh platform)
@@ -300,7 +300,12 @@ fi

if (( $(awk 'BEGIN {print ("'$ver'" >= "'1.5'")}') )); then

# Add nems-install command
# Upgrade check_speedtest
if ! grep -q "NEMS00001" /usr/local/nagios/libexec/check_speedtest-cli.sh; then
cp /root/nems/nems-migrator/data/1.5/nagios/plugins/check_speedtest-cli.sh /usr/local/nagios/libexec/
fi

# Add nems-install command
if [[ ! -e /usr/local/bin/nems-install ]]; then
ln -s /usr/local/share/nems/nems-scripts/installers/install-vim3.sh /usr/local/bin/nems-install
fi
@@ -0,0 +1,22 @@
#!/bin/bash

printf "Setting Internet speedtest server..."
# Detect current first since this will create the conf if missing
speedtestcurrent=`/usr/local/bin/nems-info speedtest`
# Detect the best server
speedtestbest=`/usr/local/bin/nems-info speedtest best`
# Overwrite the conf
if (( $speedtestcurrent != $speedtestbest )); then
if (( $speedtestbest > 0 )); then
/bin/sed -i~ '/speedtestserver/d' /usr/local/share/nems/nems.conf
echo "speedtestserver=$speedtestbest" >> /usr/local/share/nems/nems.conf
echo " done."
else
echo " couldn't detect server."
fi
else
echo " no change."
fi



0 comments on commit 7eb87be

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