packages/net/adguardhome/files/adguardhome.init
James White b44ed66975 adguardhome: Increase init start value to avoid network race conditions
Signed-off-by: James White <james@jmwhite.co.uk>
2022-11-10 16:38:26 +08:00

24 lines
518 B
Bash

#!/bin/sh /etc/rc.common
PROG=/usr/bin/AdGuardHome
USE_PROCD=1
# starts just after network starts to avoid some network race conditions
START=25
# stops before networking stops
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
procd_set_param command "$PROG" -c /etc/adguardhome.yaml -w "$WORK_DIR" --no-check-update
procd_set_param stdout 1
procd_set_param stderr 1
procd_close_instance
}