Files
quectel-rgmii-toolkit/ipk-source/sdxpinn-quecmanager-beta/root/www/cgi-bin/settings/get-ip.sh
2025-01-17 14:57:15 +08:00

11 lines
287 B
Bash

#!/bin/sh
# Set the content type to JSON
echo "Content-Type: application/json"
echo ""
# Get the IP address of the br-lan interface
brlan_ip=$(ip route | grep 'dev br-lan proto kernel scope link' | awk '{print $9}')
# Output the IP in JSON format
echo "{\"br_lan_ip\": \"$brlan_ip\"}"