I'm already doing that with adguard, they are not accessible outside my network.
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.
Show posts Menu#!/bin/sh
#
# PROVIDE: beszel_agent
# REQUIRE: DAEMON
# KEYWORD: shutdown
#
# This script starts bezel-agent at system boot.
#
. /etc/rc.subr
name="beszel_agent"
rcvar=beszel_agent_enable
command="/usr/local/bin/beszel-agent"
command_args=""
pidfile="/var/run/${name}.pid"
load_rc_config $name
: ${beszel_agent_enable:="NO"}
# Ensure required environment variables are set.
if [ -z "${beszel_agent_key}" ] || [ -z "${beszel_agent_port}" ]; then
echo "ERROR: beszel_agent_key and beszel_agent_port must be set in /etc/rc.conf.d/beszel_agent"
exit 1
fi
beszel_agent_start() {
echo "Starting beszel-agent..."
# Launch the command with the required environment variables.
env KEY="${beszel_agent_key}" PORT="${beszel_agent_port}" ${command} ${command_args} &
echo $! > ${pidfile}
}
beszel_agent_stop() {
echo "Stopping beszel-agent..."
if [ -f ${pidfile} ]; then
kill "$(cat ${pidfile})" && rm -f ${pidfile}
fi
}
beszel_agent_status() {
if [ -f "${pidfile}" ]; then
pid=$(cat "${pidfile}")
if kill -0 "${pid}" 2>/dev/null; then
echo "beszel-agent is running (pid: ${pid})."
return 0
else
echo "beszel-agent is not running (stale pid file)."
return 1
fi
else
echo "beszel-agent is not running."
return 1
fi
}
start_cmd="beszel_agent_start"
stop_cmd="beszel_agent_stop"
status_cmd="beszel_agent_status"
run_rc_command "$1"
beszel_agent_enable="YES"
beszel_agent_key=""
beszel_agent_port=""
QuoteYou have not said anything about the environment or the number and type of clientsThis is a homelab setup so not many clients:
Total
Recursion time (average): 0.107628
Recursion time (median): 0.077739
TCP usage: 0
IP ratelimited queries: 0
Recursive replies: 13412
Cache misses: 13412
Cache hits: 1275
Serve expired: 0
Prefetch: 1200
Queries: 14687
Request queue avg: 0.238434
Request queue max: 23
Request queue overwritten: 0
Request queue exceeded: 0
Request queue size (all): 0
Request queue size (client): 0
Times
Now: 1739705201.337157
Uptime: 40561.484009
Elapsed: 40561.484009
Prefetch Support: ON
Message Cache Size: 20m
Number of Hosts to cache: 50000