Files
small-package/floatip/files/floatip.uci-default

20 lines
425 B
Plaintext
Raw Permalink Normal View History

2024-12-06 16:27:41 +08:00
uci -q batch <<-EOF >/dev/null
delete ucitrack.@floatip[-1]
add ucitrack floatip
set ucitrack.@floatip[-1].init=floatip
commit ucitrack
EOF
2025-12-03 00:33:29 +08:00
# don't change role if enabled
[[ "`uci -q get floatip.main.enabled`" = "1" ]] && exit 0
2024-12-06 16:27:41 +08:00
[[ "`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
2025-12-01 20:51:52 +08:00
exit 0