1
German - Deutsch / Re: DrayTek Vigor 167: Uhrzeit aktualisieren
« on: May 06, 2024, 09:07:19 am »
Werde ich das nächste mal beherzigen.
Vielen Dank trotzdem!
Vielen Dank trotzdem!
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
root@OPNsense:/usr/local/etc/rc.d # cat AdGuardHome
#!/bin/sh
# PROVIDE: AdGuardHome
# REQUIRE: networking
# KEYWORD: shutdown
. /etc/rc.subr
name="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.subr
name="adguardhome"
rcvar=adguardhome_enable
pidfile=/var/run/${name}.pid
command=/usr/sbin/daemon
command_args="-f -P /var/run/adguardhome.pid /usr/local/AdGuardHome/AdGuardHome -s run &"
stop_cmd=adguardhome_stop
status_cmd=adguardhome_status
load_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
root@OPNsense:/etc/rc.conf.d # cat adguardhome
adguardhome_enable="YES"
root@OPNsense:/etc/rc.conf.d # ps aux | grep Ad
root 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 Ad
root@OPNsense:/etc/rc.conf.d # /usr/local/AdGuardHome/./AdGuardHome -s status
2024/04/24 22:07:37 [info] AdGuard Home, version v0.107.48
2024/04/24 22:07:37 [info] service: control action: status
2024/04/24 22:07:37 [info] service: stopped
2024/04/24 22:07:37 [info] service: action status has been done successfully on freebsd
./AdGuardHome -s install
2024/04/24 11:49:04 [info] service: action install has been done successfully on freebsd
root@OPNsense:/var/log # /usr/local/AdGuardHome/./AdGuardHome -s status
2024/04/24 10:55:03 [info] AdGuard Home, version v0.107.48
2024/04/24 10:55:03 [info] service: control action: status
2024/04/24 10:55:03 [fatal] service: failed to get service status: the service is not installed
ps awwux | grep python
root 232 0.5 1.0 85640 40196 - S 10:07 0:54.93 /usr/local/bin/python3 /usr/local/opnsense/service/configd.py console (python3.9)
root 228 0.0 0.3 24152 12720 - Is 10:07 0:03.05 /usr/local/bin/python3 /usr/local/opnsense/service/configd.py (python3.9)
root 36821 0.0 0.4 25732 15168 - Ss 10:09 0:03.91 /usr/local/bin/python3 /usr/local/opnsense/scripts/dhcp/unbound_watcher.py --domain xyz.de (python3.9)
root 39496 0.0 0.3 23708 12180 - S 10:17 0:00.79 /usr/local/bin/python3 /usr/local/sbin/configctl -e -t 0.5 system event config_changed (python3.9)
root 48034 0.0 0.3 23944 12212 - S 10:17 0:01.67 /usr/local/bin/python3 /usr/local/opnsense/scripts/syslog/lockout_handler (python3.9)
root 50629 0.0 0.2 18096 7708 - R 10:31 0:00.07 /usr/local/bin/python3 /usr/local/opnsense/scripts/filter/read_log.py /limit 100 /digest f7eeedca17d8a5e2cd1ae98b690c7cab (python3.9)
root 51729 0.0 0.9 85640 35712 - R 10:31 0:00.00 /usr/local/bin/python3 /usr/local/opnsense/service/configd.py console (python3.9)
root 51327 0.0 0.0 436 252 0 R+ 10:31 0:00.00 grep python