freebsd-ports/security/doorman/files/doorman.in
Doug Barton 9aac569eaa Move the rc.d scripts of the form *.sh.in to *.in
Where necessary add $FreeBSD$ to the file

No PORTREVISION bump necessary because this is a no-op
2012-08-05 23:19:36 +00:00

29 lines
740 B
Bash

#!/bin/sh
# $FreeBSD$
#
# PROVIDE: doorman
# REQUIRE: LOGIN
#
# Add the following lines to /etc/rc.conf to enable doorman:
# doorman_enable (bool): Set to "NO" by default.
# Set it to "YES" to enable doorman
# doorman_config (path): Set to "%%PREFIX%%/etc/doormand/doormand.cf" by default.
. /etc/rc.subr
name="doorman"
rcvar=doorman_enable
[ -z "$doorman_enable" ] && doorman_enable="NO"
[ -z "$doorman_config" ] && doorman_config="%%PREFIX%%/etc/doormand/doormand.cf"
[ -f "$doorman_config" ] || (echo "$doorman_config" does not exist.; exit)
command=%%PREFIX%%/sbin/doormand
pidfile=/var/run/doormand.pid
command_args="-p $pidfile -f $doorman_config"
load_rc_config $name
run_rc_command "$1"