immortalwrt/package/ctcgfw/luci-app-frps/root/etc/uci-defaults/40_luci-frps
2020-02-16 01:03:39 +08:00

26 lines
433 B
Bash
Executable File

#!/bin/sh
uci -q batch <<-EOF >/dev/null
delete ucitrack.@frps[-1]
add ucitrack frps
set ucitrack.@frps[-1].init=frps
commit ucitrack
EOF
frps=$(uci -q get frps.@frps[-1])
if [ -z "$frps" ]; then
uci -q add frps frps
fi
if [ "x$frps" != "xmain" ]; then
uci -q batch <<-EOF >/dev/null
rename frps.@frps[-1]="main"
set frps.main.enabled="0"
commit frps
EOF
fi
rm -rf /tmp/luci-indexcache /tmp/luci-modulecache
exit 0