83eb2c3700
literal name_enable wherever possible, and ${name}_enable when it's not, to prepare for the demise of set_rcvar(). In cases where I had to hand-edit unusual instances also modify formatting slightly to be more uniform (and in some cases, correct). This includes adding some $FreeBSD$ tags, and most importantly moving rcvar= to right after name= so it's clear that one is derived from the other.
34 lines
629 B
Bash
34 lines
629 B
Bash
#!/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=apolicyd_enable
|
|
|
|
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"
|