Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Jun 2005 06:32:22 +0200
From:      Lupe Christoph <lupe@lupe-christoph.de>
To:        fbsd_user <fbsd_user@a1poweruser.com>
Cc:        ports@freebsd.org
Subject:   Re: FreeBSD Port: doorman-0.8
Message-ID:  <20050623043222.GA26076@lupe-christoph.de>
In-Reply-To: <MIEPLLIBMLEEABPDBIEGIEGFHHAA.fbsd_user@a1poweruser.com>
References:  <MIEPLLIBMLEEABPDBIEGIEGFHHAA.fbsd_user@a1poweruser.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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@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.                                 |



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050623043222.GA26076>