added cf, google and valo ping

This commit is contained in:
Shihaam Abdul Rahman 2023-11-12 21:51:52 +05:00
parent e2ecf2c0f5
commit 41b0ef8a45
Signed by untrusted user: shihaam
GPG Key ID: 6DA2E87EBC227636

22
bot.sh
View File

@ -13,6 +13,16 @@ speedtest_fast=data/speedtest_fast_$date.json
weather_file=data/weather_$date.json weather_file=data/weather_$date.json
edited_image=data/edited_image_$date.png edited_image=data/edited_image_$date.png
#################################################################################
latency(){
echo $(ping -c 1 $1) | \
grep 'time=' | \
awk -F'time=' '{print $2}' | \
awk '{print $1}'
}
#################################################################################
################################################################################# #################################################################################
echo Grabbing Camara Image echo Grabbing Camara Image
# Capture a frame from RTSP stream # Capture a frame from RTSP stream
@ -83,6 +93,14 @@ fast_total=$(echo $fast_downloaded+$fast_uploaded | bc)
echo Speedtests complete echo Speedtests complete
################################################################################# #################################################################################
#################################################################################
valorant_ping=$(latency dynamodb.ap-southeast-1.amazonaws.com)
cfdns_ping=$(latency 1.1.1.1)
googledns_ping=$(latency 8.8.8.8)
#################################################################################
################################################################################# #################################################################################
echo Checking weather echo Checking weather
# Make the API request # Make the API request
@ -110,6 +128,10 @@ total_wasted=$(echo $ookla_total+$libre_total+$fast_total | bc)
caption=" caption="
$current_weather $current_weather
🔫 Valorant SEA ping: $valorant_ping ms
🌐 1.1.1.1 ping: $cfdns_ping ms
🌐 8.8.8.8 ping: $googledns_ping ms
*Speedtest by Ookla*: *Speedtest by Ookla*:
🌐 *Server*: $ookla_server, $ookla_city, $ookla_country 🌐 *Server*: $ookla_server, $ookla_city, $ookla_country
🏓 *Latency*: $ookla_ping ms 🏓 *Latency*: $ookla_ping ms