Files
openwrt_packages/floatip/files/floatip.uci-default
2025-12-03 00:14:03 +08:00

20 lines
425 B
Plaintext

uci -q batch <<-EOF >/dev/null
delete ucitrack.@floatip[-1]
add ucitrack floatip
set ucitrack.@floatip[-1].init=floatip
commit ucitrack
EOF
# don't change role if enabled
[[ "`uci -q get floatip.main.enabled`" = "1" ]] && exit 0
[[ "`uci -q get network.lan.proto`" = "static" && -n "`uci -q get network.lan.gateway`" ]] || exit 0
uci -q batch <<-EOF >/dev/null
set floatip.main.role=main
commit floatip
EOF
exit 0