From bff67d1a4f90fc3260352c9f2435cbe763ae013f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 30 Dec 2021 10:15:33 +0800 Subject: [PATCH] update-12.30 --- adguardhome/Makefile | 7 +++++-- adguardhome/files/adguardhome.config | 3 +++ adguardhome/files/adguardhome.init | 4 +++- luci-app-mosdns/Makefile | 2 +- 4 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 adguardhome/files/adguardhome.config diff --git a/adguardhome/Makefile b/adguardhome/Makefile index 74fd034f5..b1b0df18b 100644 --- a/adguardhome/Makefile +++ b/adguardhome/Makefile @@ -18,7 +18,7 @@ PKG_LICENSE:=GPL-3.0-only PKG_LICENSE_FILES:=LICENSE.txt PKG_MAINTAINER:=Dobroslaw Kijowski -PKG_BUILD_DEPENDS:=golang/host node/host node-yarn/host packr/host +PKG_BUILD_DEPENDS:=golang/host node/host node-yarn/host PKG_BUILD_PARALLEL:=1 PKG_USE_MIPS16:=0 @@ -48,6 +48,7 @@ endef define Package/adguardhome/conffiles /etc/adguardhome.yaml +/etc/config/adguardhome endef define Package/adguardhome/description @@ -69,7 +70,6 @@ define Build/Compile ( \ pushd $(PKG_BUILD_DIR) ; \ make js-deps js-build ; \ - packr -z -v -i internal ; \ popd ; \ $(call GoPackage/Build/Compile) ; \ ) @@ -79,6 +79,9 @@ endef # $(call GoPackage/Package/Install/Bin,$(1)) # $(INSTALL_DIR) $(1)/etc/init.d # $(INSTALL_BIN) ./files/adguardhome.init $(1)/etc/init.d/adguardhome +# +# $(INSTALL_DIR) $(1)/etc/config +# $(INSTALL_DATA) ./files/adguardhome.config $(1)/etc/config/adguardhome #endef $(eval $(call GoBinPackage,adguardhome)) diff --git a/adguardhome/files/adguardhome.config b/adguardhome/files/adguardhome.config new file mode 100644 index 000000000..9f4934875 --- /dev/null +++ b/adguardhome/files/adguardhome.config @@ -0,0 +1,3 @@ +config adguardhome config + # Where to store persistent data by AdGuard Home + option workdir /var/adguardhome diff --git a/adguardhome/files/adguardhome.init b/adguardhome/files/adguardhome.init index d9854f8bc..b26abbfbf 100644 --- a/adguardhome/files/adguardhome.init +++ b/adguardhome/files/adguardhome.init @@ -1,7 +1,6 @@ #!/bin/sh /etc/rc.common PROG=/usr/bin/AdGuardHome -WORK_DIR=/tmp/adguardhome USE_PROCD=1 @@ -11,6 +10,9 @@ START=21 STOP=89 start_service() { + config_load adguardhome + config_get WORK_DIR config workdir + [ -d "$WORK_DIR" ] || mkdir -m 0755 -p "$WORK_DIR" procd_open_instance diff --git a/luci-app-mosdns/Makefile b/luci-app-mosdns/Makefile index 288d94a07..d06a0732b 100644 --- a/luci-app-mosdns/Makefile +++ b/luci-app-mosdns/Makefile @@ -6,7 +6,7 @@ PKG_RELEASE:=5 LUCI_TITLE:=LuCI Support for mosdns LUCI_PKGARCH:=all -LUCI_DEPENDS:=+mosdns +jsonfilter +LUCI_DEPENDS:=+mosdns +jsonfilter +bash define Package/$(PKG_NAME)/conffiles /etc/mosdns/config.yaml