Files
quectel-rgmii-toolkit/ipk-source/sdxpinn-quecmanager-beta/root/www/cgi-bin/settings/get-ip.sh
Cameron Thompson f24bfc0478 quecmanager-beta fixes
Co-Authored-By: Russel Yasol <73575327+dr-dolomite@users.noreply.github.com>
2024-11-13 02:50:34 +00:00

11 lines
287 B
Bash
Executable File

#!/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\"}"