aboutsummaryrefslogtreecommitdiff
path: root/mail/rabl_server/files/rabl_server.sh.in
blob: 3a92035977d28163995c61bc284558410a1a3378 (plain) (blame)
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
34
35
36
37
38
39
40
#!/bin/sh
# $FreeBSD$
# $Tecnik: ports/mail/rabl_server/files/rabl_server.sh.in,v 1.4 2005/12/09 19:55:53 itetcu Exp $
#

# PROVIDE: rabl_server
# REQUIRE: DAEMON
# BEFORE: mail
# KEYWORD: shutdown

#
# Add the following lines to /etc/rc.conf[.local] to enable rabl_server:
#
# rabl_server_enable="YES"
# User variables:
# rabl_server_conf - conf file to use (default: %%PREFIX%%/etc/${name}.conf)
# rabl_server_user - user to run as (default: bind)
#

. %%RC_SUBR%%

name=rabl_server
rcvar=`set_rcvar`

command=%%PREFIX%%/bin/${name}
required_files=%%PREFIX%%/etc/${name}.conf

extra_commands=reload

# set defaults
rabl_server_enable=${rabl_server_enable:-"NO"}

load_rc_config $name

rabl_server_user=${rabl_server_user:-"bind"}
rabl_server_conf=${rabl_server_conf:-"%%PREFIX%%/etc/${name}.conf"}

rabl_server_flags="-c ${rabl_server_conf} -u ${rabl_server_user} &"

run_rc_command "$1"