aboutsummaryrefslogtreecommitdiff
path: root/mail/py-apolicy/files/apolicyd.in
blob: 377412b363f7ca3b7cfd3e383cfb20bce1bbc1c2 (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
#!/bin/sh

# Start or stop apolicyd
# $FreeBSD$

# PROVIDE: apolicyd
# REQUIRE: TWISTD
# KEYWORD: shutdown


# Define these apolicyd_* variables in one of these files:
#       /etc/rc.conf
#       /etc/rc.conf.local
#
# DO NOT CHANGE THESE DEFAULT VALUES HERE


. /etc/rc.subr

name="apolicyd"
rcvar=`set_rcvar`

command="%%PREFIX%%/bin/twistd"
pidfile="/var/run/apolicyd.pid"
logfile="/var/log/apolicyd.log"

load_rc_config $name

: ${apolicyd_enable="NO"}

command_args="--pidfile=${pidfile} -y %%PYTHON_SITELIBDIR%%/apolicy/server.py -q --logfile=${logfile} 2>&1 >/dev/null"
procname="%%PYTHON_CMD%%"

run_rc_command "$1"