mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-07-27 18:41:15 +08:00
31 lines
651 B
Bash
31 lines
651 B
Bash
#!/bin/sh
|
|
[ ! -f "/usr/share/ucitrack/luci-app-fastnet.json" ] && {
|
|
cat > /usr/share/ucitrack/luci-app-fastnet.json << EEOF
|
|
{
|
|
"config": "fastnet",
|
|
"init": "fastnet"
|
|
}
|
|
EEOF
|
|
}
|
|
|
|
uci -q batch <<-EOF_UCI >/dev/null
|
|
delete ucitrack.@fastnet[-1]
|
|
add ucitrack fastnet
|
|
set ucitrack.@fastnet[-1].init=fastnet
|
|
commit ucitrack
|
|
|
|
delete firewall.fastnet
|
|
set firewall.fastnet=rule
|
|
set firewall.fastnet.name="fastnet"
|
|
set firewall.fastnet.target="ACCEPT"
|
|
set firewall.fastnet.src="wan"
|
|
set firewall.fastnet.proto="tcp"
|
|
set firewall.fastnet.dest_port="3200"
|
|
commit firewall
|
|
EOF_UCI
|
|
|
|
/etc/init.d/fastnet enable
|
|
/etc/init.d/fastnet start
|
|
|
|
exit 0
|