ports/dns/encrypted-dns-server/files/encrypted_dns.in
Alexander Leidinger cec4e0f97b dns/encrypted-dns-server: make the rc script service jails aware
PR:		279629
Approved by:	maintainer timeout (1 month)
2024-07-10 15:48:17 +02:00

34 lines
870 B
Bash

#!/bin/sh
# PROVIDE: encrypted_dns
# REQUIRE: NETWORKING
# KEYWORD: shutdown
#
# Add these lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# encrypted_dns_enable (bool): Set to NO by default.
# Set it to YES to enable encrypted-dns.
# encrypted_dns_config (path): Set to %%PREFIX%%/etc/encrypted-dns.toml
# by default.
. /etc/rc.subr
name=encrypted_dns
desc="encrypted-dns startup script"
rcvar=encrypted_dns_enable
load_rc_config $name
: ${encrypted_dns_enable:=NO}
: ${encrypted_dns_svcj_options:="net_basic"}
: ${encrypted_dns_config="%%ETCDIR%%/encrypted-dns.toml"}
pidfile=/var/run/encrypted-dns.pid
command=/usr/sbin/daemon
procname=%%PREFIX%%/bin/encrypted-dns
encrypted_dns_args="-c $encrypted_dns_config"
command_args="-p ${pidfile} -s "info" -l "daemon" /usr/bin/env ${procname} ${encrypted_dns_args}"
run_rc_command "$1"