mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-10-31 01:35:13 +08:00
🌴 Sync 2026-03-05 23:51:42
This commit is contained in:
1 parent
0d155c70be
commit
32600acc60
14258 files changed
+3954570
No files matched your search
@@ -0,0 +1,26 @@
|
||||
[ ! -f "/usr/share/ucitrack/luci-app-floatip.json" ] && {
|
||||
cat > /usr/share/ucitrack/luci-app-floatip.json << EEOF
|
||||
{
|
||||
"config": "floatip",
|
||||
"init": "floatip"
|
||||
}
|
||||
EEOF
|
||||
}
|
||||
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
|
||||
Reference in new issue
Block a user