From 3c43cf2d3dbf18e0aec1fc2ed84f093c003fb69e Mon Sep 17 00:00:00 2001 From: Siddhu Date: Sat, 15 Jul 2017 16:23:38 +0530 Subject: [PATCH] Commandline speedtest added --- advanced/Scripts/webpage.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/advanced/Scripts/webpage.sh b/advanced/Scripts/webpage.sh index 07903389..3af3e400 100755 --- a/advanced/Scripts/webpage.sh +++ b/advanced/Scripts/webpage.sh @@ -30,7 +30,7 @@ Options: -i, interface Specify dnsmasq's interface listening behavior Add '-h' for more info on interface usage -s, speedtest Set speedtest intevel , user 0 to disable Speedtests - " + add -n to prevent logging to results list" exit 0 } @@ -326,6 +326,16 @@ ChageSpeedTestSchedule(){ fi } +RunSpeedtestNow(){ + if [[ "${args[2]}" == "-n" ]]; then + speedtest-cli + else + echo "Testing Speed" + result=`$speedtestfile` + echo $result + fi +} + SetCronTab() { # Remove OLD @@ -486,6 +496,7 @@ main() { "-t" | "teleporter" ) Teleporter;; "adlist" ) CustomizeAdLists;; "-s" | "speedtest" ) ChageSpeedTestSchedule;; + "-sn" ) RunSpeedtestNow;; * ) helpFunc;; esac