From e84643e09686272fd25bf5cb711eae75a071247a Mon Sep 17 00:00:00 2001 From: Phil Date: Sat, 22 Jul 2023 19:41:32 +0100 Subject: [PATCH] Updated some of the output messages on the iperf3 script --- Linux/README.md | 6 +++--- Linux/iPerf/speedtest.sh | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Linux/README.md b/Linux/README.md index e46b80c..79b2212 100644 --- a/Linux/README.md +++ b/Linux/README.md @@ -8,11 +8,11 @@ Within this folder there is 2 different versions of the speedtest script. ## speedtest-cli This script uses the speedtest-cli test and requires the following dependencies. #### Dependencies -Speedtest CLI: https://www.speedtest.net/apps/cli +1) Speedtest CLI: https://www.speedtest.net/apps/cli ## iperf3 This script uses the iperf3 software and required a iperf3 server ip to be used to test. This version requires the following dependencies. #### Dependencies -iperf3: https://iperf.fr/iperf-download.php -jq (lightweight and flexible command-line JSON processor): https://github.com/jqlang/jq +1) iperf3: https://iperf.fr/iperf-download.php +2) jq (lightweight and flexible command-line JSON processor): https://github.com/jqlang/jq diff --git a/Linux/iPerf/speedtest.sh b/Linux/iPerf/speedtest.sh index ef7ec58..8fd40e1 100755 --- a/Linux/iPerf/speedtest.sh +++ b/Linux/iPerf/speedtest.sh @@ -8,13 +8,13 @@ WAN=SET_NUMBER log=SET_NUMBER # Set the path to the log file -LOG_FILE="speedtest.csv file" +LOG_FILE="./speedtest.csv" # Do you want the script to output to a Discord webhook? Set discord variable to 1 for yes, 0 for no discord=SET_NUMBER # Set your Discord webhook URL -WEBHOOK_URL="DISCORD WEBHOOK URL" +WEBHOOK_URL="https://DISCORD_WEBHOOK_URL" # Set the iPerf3 server IP that you wantr to use IPERF3_SERVER_IP=SERVER.IP.ADDRESS.HERE @@ -61,22 +61,22 @@ if [ -z "$DOWNLOAD_Mbps" ] || [ -z "$UPLOAD_Mbps" ]; then fi if [ "$log" -eq 1 ]; then - echo "Variable is set to 1. Running command A." + echo "Log Variable is set to 1. Writing to log." # Append the result to the log file echo "$(date +"%Y-%m-%d %H:%M:%S"),$ORG,$IP,$DOWNLOAD_Mbps Mbps,$UPLOAD_Mbps Mbps" >> "$LOG_FILE" # Check if the variable is set to 0 elif [ "$log" -eq 0 ]; then - echo "Skipping log to file" + echo "Log Variable is set to 0. Skipping log to file" # Variable is not set to 1 or 0 else - echo "Variable is not set to a valid value." + echo "Discord Variable is not set to a valid value." fi if [ "$discord" -eq 1 ]; then - echo "Variable is set to 1." + echo "Discord Variable is set to 1. Sending to Discord" # Prepare the payload for the Discord webhook curl -H "Content-Type: application/json" -X POST --data @- "$WEBHOOK_URL" <