luci-app-frps: fix disable when upgrade

This commit is contained in:
coolsnowwolf 2020-05-09 15:03:44 +08:00
parent 2c37fa71f9
commit f231323db5
2 changed files with 1 additions and 15 deletions

View File

@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-frps
PKG_VERSION:=0.0.2
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE

View File

@ -7,19 +7,5 @@ uci -q batch <<-EOF >/dev/null
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