Files
quectel-rgmii-toolkit/ipk-source/sdxpinn-quecmanager-beta/root/www/cgi-bin/home/check_net.sh
Cameron Thompson 6a0a41b8b9 Build ipk
- Had postinst copy login.html to index.html

-Made all files in cgi-bin +x

- Generated ipk
2024-11-12 00:33:51 +00:00

14 lines
311 B
Bash
Executable File

#!/bin/sh
# Set the content type to JSON
echo "Content-Type: application/json"
echo ""
# Ping 8.8.8.8 with 5 packets and capture the result
if ping -c 5 8.8.8.8 > /dev/null 2>&1; then
# Ping was successful
echo '{"connection": "ACTIVE"}'
else
# Ping failed
echo '{"connection": "INACTIVE"}'
fi