root@OPNsense:/var/log # /usr/local/AdGuardHome/./AdGuardHome -s status2024/04/24 10:55:03 [info] AdGuard Home, version v0.107.482024/04/24 10:55:03 [info] service: control action: status2024/04/24 10:55:03 [fatal] service: failed to get service status: the service is not installed
./AdGuardHome -s install
2024/04/24 11:49:04 [info] service: action install has been done successfully on freebsd
root@OPNsense:/etc/rc.conf.d # cat adguardhomeadguardhome_enable="YES"
root@OPNsense:/etc/rc.conf.d # ps aux | grep Adroot 82809 0.0 0.2 12724 2152 - Ss 22:03 0:00.04 daemon: /opt/AdGuardHome/AdGuardHome[17040] (daemon)root 18630 0.0 0.2 12720 2272 0 S+ 22:07 0:00.00 grep Adroot@OPNsense:/etc/rc.conf.d # /usr/local/AdGuardHome/./AdGuardHome -s status2024/04/24 22:07:37 [info] AdGuard Home, version v0.107.482024/04/24 22:07:37 [info] service: control action: status2024/04/24 22:07:37 [info] service: stopped2024/04/24 22:07:37 [info] service: action status has been done successfully on freebsd
root@OPNsense:/usr/local/etc/rc.d # cat AdGuardHome#!/bin/sh# PROVIDE: AdGuardHome# REQUIRE: networking# KEYWORD: shutdown. /etc/rc.subrname="AdGuardHome"AdGuardHome_env="IS_DAEMON=1"AdGuardHome_user="root"pidfile_child="/var/run/${name}.pid"pidfile="/var/run/${name}_daemon.pid"command="/usr/sbin/daemon"command_args="-P ${pidfile} -p ${pidfile_child} -T ${name} -r /usr/local/AdGuardHome/AdGuardHome"run_rc_command "$1"root@OPNsense:/usr/local/etc/rc.d # cat adguardhome#!/bin/sh## $FreeBSD$## KEYWORD: shutdown. /etc/rc.subrname="adguardhome"rcvar=adguardhome_enablepidfile=/var/run/${name}.pidcommand=/usr/sbin/daemoncommand_args="-f -P /var/run/adguardhome.pid /usr/local/AdGuardHome/AdGuardHome -s run &"stop_cmd=adguardhome_stopstatus_cmd=adguardhome_statusload_rc_config adguardhome: ${adguardhome_enable="NO"}adguardhome_status(){ if [ -n "$rc_pid" ]; then echo "${name} is running as pid $rc_pid." return 0 else echo "${name} is not running." fi}adguardhome_stop(){ # wait for process to exit if [ -n "$rc_pid" ]; then echo "Stopping ${name}." kill $rc_pid echo "Waiting for PIDS: $rc_pid" wait_for_pids $rc_pid echo " done." else echo "${name} is not running." fi}run_rc_command $1