summaryrefslogtreecommitdiff
path: root/etc/rc.d/nsd
blob: 015f92042937fa46471d971ff5af18fa5c38a1db (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
#!/bin/ksh
#
# $OpenBSD: nsd,v 1.12 2022/05/21 12:42:21 ajacoutot Exp $

daemon="/usr/sbin/nsd-control"
daemon_flags="-c /var/nsd/etc/nsd.conf"

. /etc/rc.d/rc.subr

rc_usercheck=NO

rc_start() {
	rc_exec "${daemon} ${daemon_flags} start"
}

rc_check() {
	${daemon} ${daemon_flags} status || return 1
}

rc_reload() {
	${daemon} ${daemon_flags} reconfig && ${daemon} ${daemon_flags} reload
}

rc_stop() {
	${daemon} ${daemon_flags} stop
}

rc_cmd $1