forked from shihaam/starlink_status
added cf, google and valo ping
This commit is contained in:
parent
e2ecf2c0f5
commit
41b0ef8a45
22
bot.sh
22
bot.sh
@ -13,6 +13,16 @@ speedtest_fast=data/speedtest_fast_$date.json
|
||||
weather_file=data/weather_$date.json
|
||||
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
|
||||
# Capture a frame from RTSP stream
|
||||
@ -83,6 +93,14 @@ fast_total=$(echo $fast_downloaded+$fast_uploaded | bc)
|
||||
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
|
||||
# Make the API request
|
||||
@ -110,6 +128,10 @@ total_wasted=$(echo $ookla_total+$libre_total+$fast_total | bc)
|
||||
caption="
|
||||
$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*:
|
||||
🌐 *Server*: $ookla_server, $ookla_city, $ookla_country
|
||||
🏓 *Latency*: $ookla_ping ms
|
||||
|
Loading…
x
Reference in New Issue
Block a user