FreeBSD Port: doorman-0.8

Lupe Christoph lupe at lupe-christoph.de
Thu Jun 23 04:32:54 GMT 2005


On Wednesday, 2005-06-22 at 14:28:19 -0400, fbsd_user wrote:
> There needs to be a /usr/local/etc/rc.d doormand.sh file to auto start
> doorman at boot time.
> I think this should be made part of the port distribution.

I think you're right. And I'm glad I anticipated this request. Do you
like the following?

Lupe Christoph
------------------------------------------------------------------------
#!/bin/sh
#

# PROVIDE: doorman
# REQUIRE: LOGIN
# KEYWORD: FreeBSD

#
# 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 "/usr/local/etc/doormand/doormand.cf" by default.
#

. /usr/local/etc/rc.subr

name="doorman"
rcvar=`set_rcvar`

[ -z "$doorman_enable" ] && doorman_enable="NO"
[ -z "$doorman_config" ] && doorman_config="/usr/local/etc/doormand/doormand.cf"

[ -f "$doorman_config" ] || (echo "$doorman_config" does not exist.; exit)

command=/usr/local/sbin/doormand
pidfile=/var/run/doormand.pid
command_args="-p $pidfile -f $doorman_config"

load_rc_config $name
run_rc_command "$1"
-- 
| lupe at lupe-christoph.de       |           http://www.lupe-christoph.de/ |
| Ask not what your computer can do for you                              |
| ask what you can do for your computer.                                 |


More information about the freebsd-ports mailing list