mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-04-05 07:00:19 +00:00
Commandline speedtest added
This commit is contained in:
parent
8f9d4d04af
commit
3c43cf2d3d
1 changed files with 12 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue