Skip to content
Permalink
Browse files

Automate speedtest server daily

  • Loading branch information...
NEMS Linux
NEMS Linux committed Mar 28, 2019
1 parent 55a3cc5 commit 257578d2f7d0b007751087d4cc80f330662e3d69
Showing with 19 additions and 0 deletions.
  1. +19 −0 quickfix.sh
@@ -27,6 +27,25 @@ allowupdate=`/usr/local/bin/nems-info allowupdate`
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


# 1 = Not allowed
# 2 = Allowed monthly
# 3 = Allowed semi-weekly

0 comments on commit 257578d

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