You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
475 B

  1. #!/bin/sh /etc/rc.common
  2. PROG=/usr/bin/AdGuardHome
  3. USE_PROCD=1
  4. # starts after network starts
  5. START=21
  6. # stops before networking stops
  7. STOP=89
  8. start_service() {
  9. config_load adguardhome
  10. config_get WORK_DIR config workdir
  11. [ -d "$WORK_DIR" ] || mkdir -m 0755 -p "$WORK_DIR"
  12. procd_open_instance
  13. procd_set_param command "$PROG" -c /etc/adguardhome.yaml -w "$WORK_DIR" --no-check-update
  14. procd_set_param stdout 1
  15. procd_set_param stderr 1
  16. procd_close_instance
  17. }