diff --git a/README.md b/README.md index 1071a48..7de4fc7 100644 --- a/README.md +++ b/README.md @@ -29,11 +29,11 @@ Your ping is 6.223 ms. | `DB_USERNAME` | `admin` | InfluxDB Username | | `DB_PASSWORD` | `password` | InfluxDB Password | | `SPEEDTEST_SERVER_ID` | none | Specify a server from the server list using its ID | -| `SPEEDTEST_HOST` | none | Specify a server, from the server list, using its host's fully qualified domain name | +| `SPEEDTEST_HOSTNAME` | none | Specify a server, from the server list, using its host's fully qualified domain name | -To get the available Server IDs, sponsors, and hostnames from speedtest run: +To get the available Server IDs, sponsors, and hostnames from speedtest run: -``` +```bash curl -s https://cli.speedtest.net/api/cli/config | jq -r '.servers[] | "id: \(.id), sponsor: \(.sponsor), host: \(.host)"' ``` diff --git a/speedtest.sh b/speedtest.sh index 3962916..c8692e9 100755 --- a/speedtest.sh +++ b/speedtest.sh @@ -30,8 +30,8 @@ run_speedtest() DOWNLOAD="$(echo $JSON | jq -r '.download.bandwidth')" UPLOAD="$(echo $JSON | jq -r '.upload.bandwidth')" PING="$(echo $JSON | jq -r '.ping.latency')" - echo "Your download speed is $(($DOWNLOAD / 125000 )) Mbps ($DOWNLOAD Bytes/s)." - echo "Your upload speed is $(($UPLOAD / 125000 )) Mbps ($UPLOAD Bytes/s)." + echo "Your download speed is $(($DOWNLOAD / 125000 )) Mbps ($DOWNLOAD Bytes/s)." + echo "Your upload speed is $(($UPLOAD / 125000 )) Mbps ($UPLOAD Bytes/s)." echo "Your ping is $PING ms." # Save results in the database