ready for PR

This commit is contained in:
Russel Yasol
2024-10-02 19:22:00 +08:00
parent 39907e983a
commit b70ada6b9c
227 changed files with 102724 additions and 11540 deletions

14
www/cgi-bin/check_net.sh Normal file
View File

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