mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-04-05 15:10:15 +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
|
-i, interface Specify dnsmasq's interface listening behavior
|
||||||
Add '-h' for more info on interface usage
|
Add '-h' for more info on interface usage
|
||||||
-s, speedtest Set speedtest intevel , user 0 to disable Speedtests
|
-s, speedtest Set speedtest intevel , user 0 to disable Speedtests
|
||||||
"
|
add -n to prevent logging to results list"
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -326,6 +326,16 @@ ChageSpeedTestSchedule(){
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RunSpeedtestNow(){
|
||||||
|
if [[ "${args[2]}" == "-n" ]]; then
|
||||||
|
speedtest-cli
|
||||||
|
else
|
||||||
|
echo "Testing Speed"
|
||||||
|
result=`$speedtestfile`
|
||||||
|
echo $result
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
SetCronTab()
|
SetCronTab()
|
||||||
{
|
{
|
||||||
# Remove OLD
|
# Remove OLD
|
||||||
|
@ -486,6 +496,7 @@ main() {
|
||||||
"-t" | "teleporter" ) Teleporter;;
|
"-t" | "teleporter" ) Teleporter;;
|
||||||
"adlist" ) CustomizeAdLists;;
|
"adlist" ) CustomizeAdLists;;
|
||||||
"-s" | "speedtest" ) ChageSpeedTestSchedule;;
|
"-s" | "speedtest" ) ChageSpeedTestSchedule;;
|
||||||
|
"-sn" ) RunSpeedtestNow;;
|
||||||
* ) helpFunc;;
|
* ) helpFunc;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue