mirror of
https://github.com/openwrt/packages.git
synced 2025-12-21 21:24:31 +04:00
adguardhome: Update init files
Move working directory from `/var/adguardhome` to `/var/lib/adguardhome`, according to Linux FHS. Add option to store PID file, defaulting to `/run/adguardhome.pid`. Signed-off-by: Ryan Keane <the.ra2.ifv@gmail.com>
This commit is contained in:
committed by
Tianling Shen
parent
62c7581238
commit
c3a33e10a5
@@ -1,4 +1,5 @@
|
||||
config adguardhome config
|
||||
# Where to store persistent data by AdGuard Home
|
||||
option workdir /var/adguardhome
|
||||
option config /etc/adguardhome.yaml
|
||||
# Where to store persistent data by AdGuard Home
|
||||
option workdir /var/lib/adguardhome
|
||||
option pidfile /run/adguardhome.pid
|
||||
|
||||
@@ -21,13 +21,14 @@ start_service() {
|
||||
fi
|
||||
|
||||
config_load adguardhome
|
||||
config_get WORK_DIR config workdir
|
||||
config_get CONFIG_FILE config config "/etc/adguardhome.yaml"
|
||||
config_get PID_FILE config pidfile "/run/adguardhome.pid"
|
||||
config_get WORK_DIR config workdir "/var/lib/adguardhome"
|
||||
|
||||
[ -d "$WORK_DIR" ] || mkdir -m 0755 -p "$WORK_DIR"
|
||||
|
||||
procd_open_instance
|
||||
procd_set_param command "$PROG" -c "$CONFIG_FILE" -w "$WORK_DIR" --no-check-update
|
||||
procd_set_param command "$PROG" -c "$CONFIG_FILE" -w "$WORK_DIR" --pidfile "$PID_FILE" --no-check-update
|
||||
procd_set_param stdout 1
|
||||
procd_set_param stderr 1
|
||||
procd_close_instance
|
||||
|
||||
Reference in New Issue
Block a user