Skip to content

Instantly share code, notes, and snippets.

@NghiaMaster
Created December 29, 2020 03:44
Show Gist options
  • Save NghiaMaster/d4487479708418f85b1c1c90fdaa0185 to your computer and use it in GitHub Desktop.
Save NghiaMaster/d4487479708418f85b1c1c90fdaa0185 to your computer and use it in GitHub Desktop.
AdguardHome rc.d script, OPNsense - FREEBSD
#!/bin/sh
. /etc/rc.subr
name="adguardhome"
rcvar="adguardhome_enable"
adguardhome_user="root"
adguardhome_command="/root/AdGuardHome/AdGuardHome"
pidfile="/var/run/${name}.pid"
command="/usr/sbin/daemon"
command_args="-P ${pidfile} -r -f ${adguardhome_command}"
load_rc_config $name
: ${adguardhome_enable:=no}
run_rc_command "$1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment