Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Choose test server #5

Open
moo-im-a-cow opened this issue Apr 11, 2018 · 0 comments
Open

Choose test server #5

moo-im-a-cow opened this issue Apr 11, 2018 · 0 comments

Comments

@moo-im-a-cow
Copy link

moo-im-a-cow commented Apr 11, 2018

Hi
in capture.sh on line 7:
speedtest-cli --server 4135 --simple > /tmp/speedtest-results
the server is hard coded to 4135 which is in auckland.
this causes slow results for anyone who is not in auckland
(even here in sydney the results were slow)
i would suggest adding the ability to set an environment variable to set this.
for consistent results, i wouldnt remove the --server argument altogether - i want to use one server that is close to me.

if the variable is set, use the value given, otherwise automatically choose.

i submitted a pull request (#4 ), but then closed it because there were problems with it that i am too busy to fix,
here is the code from that:

if [ $server -ne 0 ]; then 
  echo "Server has been set to $server"
  srv="--server $server"
else
  echo "Automatically selecting server"
  srv=""
fi

speedtest-cli $srv --simple > /tmp/speedtest-results

dont use this code directly, the if statement needs to be replaced with a check that returns true if $server is a number above or equal to 1. ($server is the environment variable)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant