Skip to content

Commit

Permalink
fix: SPEEDTEST_HOSTNAME variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
robinmanuelthiel committed Jun 17, 2024
1 parent b03a1e8 commit b1153d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)"'
```

Expand Down
4 changes: 2 additions & 2 deletions speedtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b1153d3

Please sign in to comment.