From: xiaobo tian Date: Sat, 3 Aug 2024 04:42:58 +0000 (+0800) Subject: adguardhome: add option config X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=c51679d4985dad6d316476d616da7bb9c391dd66;p=openwrt-packages.git adguardhome: add option config Signed-off-by: xiaobo tian --- diff --git a/net/adguardhome/Makefile b/net/adguardhome/Makefile index 2d38d223d..220a1a266 100644 --- a/net/adguardhome/Makefile +++ b/net/adguardhome/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=adguardhome PKG_VERSION:=0.107.52 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_VERSION:=v$(PKG_VERSION) diff --git a/net/adguardhome/files/adguardhome.config b/net/adguardhome/files/adguardhome.config index 9f4934875..0c2aeac0a 100644 --- a/net/adguardhome/files/adguardhome.config +++ b/net/adguardhome/files/adguardhome.config @@ -1,3 +1,4 @@ config adguardhome config # Where to store persistent data by AdGuard Home option workdir /var/adguardhome + option config /etc/adguardhome.yaml diff --git a/net/adguardhome/files/adguardhome.init b/net/adguardhome/files/adguardhome.init index 6a29c4e4a..ffdae9c43 100644 --- a/net/adguardhome/files/adguardhome.init +++ b/net/adguardhome/files/adguardhome.init @@ -22,11 +22,12 @@ start_service() { config_load adguardhome config_get WORK_DIR config workdir + config_get CONFIG_FILE config config "/etc/adguardhome.yaml" [ -d "$WORK_DIR" ] || mkdir -m 0755 -p "$WORK_DIR" procd_open_instance - procd_set_param command "$PROG" -c /etc/adguardhome.yaml -w "$WORK_DIR" --no-check-update + procd_set_param command "$PROG" -c "$CONFIG_FILE" -w "$WORK_DIR" --no-check-update procd_set_param stdout 1 procd_set_param stderr 1 procd_close_instance