blob: 683e2ec9bdbd23cfa4465f8c0dc56caa115fbc1d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#!/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_config="%%PREFIX%%/etc/encrypted-dns/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"
|