adguardhome: add option config
authorxiaobo tian <peterwillcn@gmail.com>
Sat, 3 Aug 2024 04:42:58 +0000 (12:42 +0800)
committerTianling Shen <cnsztl@gmail.com>
Sun, 4 Aug 2024 05:09:23 +0000 (13:09 +0800)
Signed-off-by: xiaobo tian <peterwillcn@gmail.com>
net/adguardhome/Makefile
net/adguardhome/files/adguardhome.config
net/adguardhome/files/adguardhome.init

index 2d38d223d4b8d903e611f888b3c48b26ea3a0e33..220a1a2660a1a88647b3708b2c701bd8a407932f 100644 (file)
@@ -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)
index 9f49348750de644203332fe816f6c6f3ff76b4cc..0c2aeac0ab207bbdea2c83c38ab4157f2ac9b866 100644 (file)
@@ -1,3 +1,4 @@
 config adguardhome config
        # Where to store persistent data by AdGuard Home
        option workdir /var/adguardhome
+       option config /etc/adguardhome.yaml
index 6a29c4e4a368b53c3c83ce1e9cdab9cb91b0b5c7..ffdae9c43d87d868031a74bfcc56dcc57a4f899a 100644 (file)
@@ -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