fix: take first LAN IP address and strip CIDR suffix

This commit is contained in:
Andrey Petelin
2025-12-03 10:21:51 +05:00
parent 7fc1f39dd6
commit 7c7e1c6244

View File

@@ -1512,7 +1512,7 @@ get_service_listen_address() {
return 0
fi
service_listen_address="$(uci_get "network" "lan" "ipaddr")"
service_listen_address="$(uci_get "network" "lan" "ipaddr" | awk '{print $1}' | cut -d'/' -f1)"
if [ -z "$service_listen_address" ]; then
log "Failed to determine the listening IP address. Please open an issue to report this problem: https://github.com/itdoginfo/podkop/issues" "error"