Updated Linuxscript so it logs the WAN number to the csv file. This is so if you combine multiple files it you can tell logs appart.

This commit is contained in:
Phil 2023-09-16 12:14:04 +01:00
parent ea5494c700
commit e1ad84e6a9

View File

@ -105,7 +105,7 @@ if [ "$log" -eq 1 ]; then
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"),iperf3,$ORG,$IP,$DOWNLOAD_Mbps Mbps,$UPLOAD_Mbps Mbps" >> "$LOG_FILE"
echo "$(date +"%Y-%m-%d %H:%M:%S"),$WAN,iperf3,$ORG,$IP,$DOWNLOAD_Mbps Mbps,$UPLOAD_Mbps Mbps" >> "$LOG_FILE"
# Check if the variable is set to 0
elif [ "$log" -eq 0 ]; then
@ -222,7 +222,7 @@ if [ "$log" -eq 1 ]; then
echo "Variable is set to 1. Running command A."
# Append the result to the log file
echo "$(date +"%Y-%m-%d %H:%M:%S"),Speedtest.net,$ORG,$IP,$DOWNLOAD_Mbps Mbps,$UPLOAD_Mbps Mbps" >> "$LOG_FILE"
echo "$(date +"%Y-%m-%d %H:%M:%S"),,Speedtest.net,$ORG,$IP,$DOWNLOAD_Mbps Mbps,$UPLOAD_Mbps Mbps" >> "$LOG_FILE"
# Check if the variable is set to 0
elif [ "$log" -eq 0 ]; then