summaryrefslogtreecommitdiffstats
path: root/mail/postfix-policyd-sf/files/policyd.sh.in
blob: cd3b346732f32aedc1ec5ef1c84eb23a86e7e6ca (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
34
35
36
37
38
39
40
#!/bin/sh
#
# $FreeBSD$
#

# PROVIDE: postfix-policyd-sf
# REQUIRE: LOGIN mysql
# BEFORE: mail postfix
# KEYWORD: shutdown

#
# Add the following lines to /etc/rc.conf to enable policyd:
#
# postfix_policyd_sf_enable="YES"
#

. /etc/rc.subr

name=postfix_policyd_sf
rcvar=`set_rcvar`

command=%%PREFIX%%/sbin/%%REALNAME%%

stop_postcmd=stop_postcmd

stop_postcmd()
{
  rm -f $pidfile
}

# set defaults

postfix_policyd_sf_enable=${postfix_policyd_sf_enable:-"NO"}
postfix_policyd_sf_pidfile=${postfix_policyd_sf_pidfile:-"/var/run/%%REALNAME%%.pid"}
postfix_policyd_sf_flags=${postfix_policyd_sf_flags:-"-c %%PREFIX%%/etc/%%REALNAME%%.conf"}

pidfile="${postfix_policyd_sf_pidfile}"

load_rc_config $name
run_rc_command "$1"
OpenPOWER on IntegriCloud