summaryrefslogtreecommitdiff
path: root/etc/rc.d/spamd
blob: caee8043583d05366235ee7af2357cf3c5a08df6 (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
#!/bin/sh
#
# $OpenBSD: spamd,v 1.4 2013/12/17 09:19:45 halex Exp $

daemon="/usr/libexec/spamd"

. /etc/rc.d/rc.subr

pexp="spamd: \[priv\]"
rc_reload=NO

rc_pre() {
	[ X"${spamd_black}" != X"NO" ] && \
		daemon_flags="-b ${daemon_flags}"
	return 0
}

rc_start() {
	${rcexec} "${daemon} ${daemon_flags} ${_bg}"
	spamd_setup_flags="-D"
	[ X"${spamd_black}" != X"NO" ] && \
		spamd_setup_flags="-b ${spamd_setup_flags}"
	rc_do rc_wait start && /usr/libexec/spamd-setup ${spamd_setup_flags}
}

rc_cmd $1