mirror of
https://github.com/SunBK201/UA3F.git
synced 2025-12-16 08:44:29 +00:00
fix: add uci-defaults script
This commit is contained in:
parent
113a55f94d
commit
4689d7074e
@ -55,6 +55,8 @@ define Package/ua3f/install
|
|||||||
$(INSTALL_BIN) ./files/ua3f.init $(1)/etc/init.d/ua3f
|
$(INSTALL_BIN) ./files/ua3f.init $(1)/etc/init.d/ua3f
|
||||||
$(INSTALL_DIR) $(1)/etc/config/
|
$(INSTALL_DIR) $(1)/etc/config/
|
||||||
$(INSTALL_CONF) ./files/ua3f.uci $(1)/etc/config/ua3f
|
$(INSTALL_CONF) ./files/ua3f.uci $(1)/etc/config/ua3f
|
||||||
|
$(INSTALL_DIR) $(1)/etc/uci-defaults/
|
||||||
|
$(INSTALL_BIN) ./files/uci-defaults $(1)/etc/uci-defaults/luci-ua3f
|
||||||
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/i18n/
|
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/i18n/
|
||||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/ua3f.zh-cn.lmo $(1)/usr/lib/lua/luci/i18n/ua3f.zh-cn.lmo
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/ua3f.zh-cn.lmo $(1)/usr/lib/lua/luci/i18n/ua3f.zh-cn.lmo
|
||||||
$(CP) $(PKG_BUILD_DIR)/files/luci/* $(1)/usr/lib/lua/luci/
|
$(CP) $(PKG_BUILD_DIR)/files/luci/* $(1)/usr/lib/lua/luci/
|
||||||
@ -62,8 +64,12 @@ endef
|
|||||||
|
|
||||||
define Package/ua3f/postrm
|
define Package/ua3f/postrm
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
uci set ua3f.enabled.enabled='0' > /dev/null 2>&1
|
uci -q set ua3f.enabled.enabled=0
|
||||||
uci commit ua3f > /dev/null 2>&1
|
uci -q commit ua3f
|
||||||
|
[ -f "/etc/config/ucitrack" ] && {
|
||||||
|
uci -q delete ucitrack.ua3f
|
||||||
|
uci -q commit ucitrack
|
||||||
|
}
|
||||||
rm -rf /var/log/ua3f >/dev/null 2>&1
|
rm -rf /var/log/ua3f >/dev/null 2>&1
|
||||||
rm -rf /usr/lib/lua/luci/model/cbi/ua3f >/dev/null 2>&1
|
rm -rf /usr/lib/lua/luci/model/cbi/ua3f >/dev/null 2>&1
|
||||||
rm -rf /usr/lib/lua/luci/model/cbi/ua3f.lua >/dev/null 2>&1
|
rm -rf /usr/lib/lua/luci/model/cbi/ua3f.lua >/dev/null 2>&1
|
||||||
|
|||||||
11
openwrt/files/uci-defaults
Normal file
11
openwrt/files/uci-defaults
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
[ -e "/etc/config/ucitrack" ] && {
|
||||||
|
uci -q delete ucitrack.@ua3f[-1]
|
||||||
|
uci -q add ucitrack ua3f
|
||||||
|
uci -q set ucitrack.@ua3f[-1].init=ua3f
|
||||||
|
uci -q commit ucitrack
|
||||||
|
}
|
||||||
|
|
||||||
|
rm -f /tmp/luci-indexcache* >/dev/null 2>&1
|
||||||
|
exit 0
|
||||||
@ -104,10 +104,12 @@ mkdir -p \
|
|||||||
$opkg_template/usr/lib/lua/luci/view/ua3f \
|
$opkg_template/usr/lib/lua/luci/view/ua3f \
|
||||||
$opkg_template/usr/lib/lua/luci/i18n \
|
$opkg_template/usr/lib/lua/luci/i18n \
|
||||||
$opkg_template/etc/init.d \
|
$opkg_template/etc/init.d \
|
||||||
$opkg_template/etc/config
|
$opkg_template/etc/config \
|
||||||
|
$opkg_template/etc/uci-defaults
|
||||||
|
|
||||||
cp openwrt/files/ua3f.init $opkg_template/etc/init.d/ua3f
|
cp openwrt/files/ua3f.init $opkg_template/etc/init.d/ua3f
|
||||||
cp openwrt/files/ua3f.uci $opkg_template/etc/config/ua3f
|
cp openwrt/files/ua3f.uci $opkg_template/etc/config/ua3f
|
||||||
|
cp openwrt/files/uci-defaults $opkg_template/etc/uci-defaults/luci-ua3f
|
||||||
cp -r openwrt/files/luci/* $opkg_template/usr/lib/lua/luci/
|
cp -r openwrt/files/luci/* $opkg_template/usr/lib/lua/luci/
|
||||||
po2lmo openwrt/po/zh_cn/ua3f.po $opkg_template/usr/lib/lua/luci/i18n/ua3f.zh-cn.lmo
|
po2lmo openwrt/po/zh_cn/ua3f.po $opkg_template/usr/lib/lua/luci/i18n/ua3f.zh-cn.lmo
|
||||||
|
|
||||||
|
|||||||
@ -1,8 +1,12 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
uci set ua3f.enabled.enabled='0' > /dev/null 2>&1
|
uci -q set ua3f.enabled.enabled=0
|
||||||
uci commit ua3f > /dev/null 2>&1
|
uci -q commit ua3f
|
||||||
|
[ -f "/etc/config/ucitrack" ] && {
|
||||||
|
uci -q delete ucitrack.ua3f
|
||||||
|
uci -q commit ucitrack
|
||||||
|
}
|
||||||
rm -rf /var/log/ua3f >/dev/null 2>&1
|
rm -rf /var/log/ua3f >/dev/null 2>&1
|
||||||
rm -rf /usr/lib/lua/luci/model/cbi/ua3f >/dev/null 2>&1
|
rm -rf /usr/lib/lua/luci/model/cbi/ua3f >/dev/null 2>&1
|
||||||
rm -rf /usr/lib/lua/luci/model/cbi/ua3f.lua >/dev/null 2>&1
|
rm -rf /usr/lib/lua/luci/model/cbi/ua3f.lua >/dev/null 2>&1
|
||||||
rm -rf /usr/lib/lua/luci/controller/ua3f.lua >/dev/null 2>&1
|
rm -rf /usr/lib/lua/luci/controller/ua3f.lua >/dev/null 2>&1
|
||||||
rm -rf /usr/lib/lua/luci/view/ua3f >/dev/null 2>&1
|
rm -rf /usr/lib/lua/luci/view/ua3f >/dev/null 2>&1
|
||||||
Loading…
Reference in New Issue
Block a user