mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-09-13 20:04:45 +08:00
29 lines
759 B
Bash
29 lines
759 B
Bash
#!/bin/sh
|
|
[ ! -f "/usr/share/ucitrack/luci-app-miaplus.json" ] && {
|
|
cat > /usr/share/ucitrack/luci-app-miaplus.json << EEOF
|
|
{
|
|
"config": "miaplus",
|
|
"init": "miaplus"
|
|
}
|
|
EEOF
|
|
}
|
|
|
|
# fw4 与 fw3 共用 /etc/config/firewall 的 config include 机制;fw4_compatible
|
|
# 让 fw4 在 reload 时执行用户脚本,fw3 忽略此未知 option(安全)
|
|
uci -q batch <<-EOF >/dev/null
|
|
delete ucitrack.@miaplus[-1]
|
|
add ucitrack miaplus
|
|
set ucitrack.@miaplus[-1].init=miaplus
|
|
commit ucitrack
|
|
delete firewall.miaplus
|
|
set firewall.miaplus=include
|
|
set firewall.miaplus.type=script
|
|
set firewall.miaplus.path=/etc/miaplus.include
|
|
set firewall.miaplus.reload=1
|
|
set firewall.miaplus.fw4_compatible=1
|
|
commit firewall
|
|
EOF
|
|
|
|
rm -f /tmp/luci-indexcache
|
|
exit 0
|