Move config files to luci package
This commit is contained in:
parent
8007c8fffc
commit
765b725701
@ -63,18 +63,6 @@ config ALIST_COMPRESS_UPX
|
|||||||
default n
|
default n
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/$(PKG_NAME)/conffiles
|
|
||||||
/etc/alist/
|
|
||||||
/etc/config/alist
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/$(PKG_NAME)/postinst
|
|
||||||
#!/bin/sh
|
|
||||||
if [ -z "$${IPKG_INSTROOT}" ]; then
|
|
||||||
[ -f /etc/uci-defaults/alist ] && /etc/uci-defaults/alist && rm -f /etc/uci-defaults/alist
|
|
||||||
fi
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Build/Prepare
|
define Build/Prepare
|
||||||
$(call Build/Prepare/Default)
|
$(call Build/Prepare/Default)
|
||||||
$(eval $(call Download,$(PKG_NAME)-web))
|
$(eval $(call Download,$(PKG_NAME)-web))
|
||||||
@ -90,12 +78,8 @@ endif
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/$(PKG_NAME)/install
|
define Package/$(PKG_NAME)/install
|
||||||
$(INSTALL_DIR) $(1)/etc/alist $(1)/etc/config $(1)/etc/init.d $(1)/etc/uci-defaults $(1)/usr/bin
|
$(INSTALL_DIR) $(1)/usr/bin
|
||||||
$(INSTALL_BIN) $(GO_PKG_BUILD_BIN_DIR)/alist $(1)/usr/bin
|
$(INSTALL_BIN) $(GO_PKG_BUILD_BIN_DIR)/alist $(1)/usr/bin
|
||||||
$(INSTALL_CONF) ./files/alist.config $(1)/etc/config/alist
|
|
||||||
$(INSTALL_BIN) ./files/alist.init $(1)/etc/init.d/alist
|
|
||||||
$(INSTALL_BIN) ./files/alist.uci-default $(1)/etc/uci-defaults/alist
|
|
||||||
$(INSTALL_CONF) ./files/data.db $(1)/etc/alist/data.db
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call GoBinPackage,$(PKG_NAME)))
|
$(eval $(call GoBinPackage,$(PKG_NAME)))
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
uci -q batch <<-EOF >/dev/null
|
|
||||||
delete ucitrack.@alist[-1]
|
|
||||||
add ucitrack alist
|
|
||||||
set ucitrack.@alist[-1].init=alist
|
|
||||||
commit ucitrack
|
|
||||||
|
|
||||||
delete firewall.alist
|
|
||||||
set firewall.alist=rule
|
|
||||||
set firewall.alist.name="alist"
|
|
||||||
set firewall.alist.target="ACCEPT"
|
|
||||||
set firewall.alist.src="wan"
|
|
||||||
set firewall.alist.proto="tcp"
|
|
||||||
set firewall.alist.dest_port="5244"
|
|
||||||
set firewall.alist.enabled="0"
|
|
||||||
commit firewall
|
|
||||||
EOF
|
|
||||||
|
|
||||||
exit 0
|
|
@ -6,14 +6,24 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=luci-app-alist
|
PKG_NAME:=luci-app-alist
|
||||||
PKG_VERSION:=1.0.3
|
PKG_VERSION:=1.0.4
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
LUCI_TITLE:=LuCI support for alist
|
LUCI_TITLE:=LuCI support for alist
|
||||||
LUCI_DEPENDS:=+alist
|
LUCI_DEPENDS:=+alist
|
||||||
LUCI_PKGARCH:=all
|
|
||||||
|
define Package/$(PKG_NAME)/conffiles
|
||||||
|
/etc/alist
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/$(PKG_NAME)/postinst
|
||||||
|
#!/bin/sh
|
||||||
|
[ -n "${IPKG_INSTROOT}" ] || {
|
||||||
|
( . /etc/uci-defaults/luci-alist ) && rm -f /etc/uci-defaults/luci-alist
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
endef
|
||||||
|
|
||||||
include $(TOPDIR)/feeds/luci/luci.mk
|
include $(TOPDIR)/feeds/luci/luci.mk
|
||||||
|
|
||||||
# call BuildPackage - OpenWrt buildroot signature
|
# call BuildPackage - OpenWrt buildroot signature
|
||||||
|
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
rm -f /tmp/luci-indexcache*
|
|
||||||
exit 0
|
|
11
luci-app-alist/root/etc/uci-defaults/luci-alist
Executable file
11
luci-app-alist/root/etc/uci-defaults/luci-alist
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
uci -q batch <<-EOF >/dev/null
|
||||||
|
delete ucitrack.@alist[-1]
|
||||||
|
add ucitrack alist
|
||||||
|
set ucitrack.@alist[-1].init=alist
|
||||||
|
commit ucitrack
|
||||||
|
EOF
|
||||||
|
|
||||||
|
rm -rf /tmp/luci-*
|
||||||
|
exit 0
|
11
luci-app-alist/root/usr/share/rpcd/acl.d/luci-app-alist.json
Normal file
11
luci-app-alist/root/usr/share/rpcd/acl.d/luci-app-alist.json
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"luci-app-alist": {
|
||||||
|
"description": "Grant UCI access for luci-app-alist",
|
||||||
|
"read": {
|
||||||
|
"uci": [ "alist" ]
|
||||||
|
},
|
||||||
|
"write": {
|
||||||
|
"uci": [ "alist" ]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user