Sync with development-SDXPINN

This commit is contained in:
iamromulan
2024-10-06 02:56:50 -04:00
parent 8ac1dda904
commit 624a74be0d
234 changed files with 107827 additions and 277 deletions

View File

@@ -0,0 +1,16 @@
#!/bin/sh
echo "Content-type: application/json"
echo ""
# Get RX and TX bytes from ifconfig eth0
data=$(ifconfig eth0 | grep "RX bytes")
# Extract download (RX) and upload (TX) values using awk
download=$(echo $data | awk '{print $2}' | cut -d':' -f2)
upload=$(echo $data | awk '{print $6}' | cut -d':' -f2)
# Return JSON response
echo "{"
echo " \"download\": \"$download\","
echo " \"upload\": \"$upload\""
echo "}"