2004-09-02 00:11:21 +02:00
|
|
|
#!/bin/sh
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
# PROVIDE: postgrey
|
|
|
|
# REQUIRE: LOGIN
|
|
|
|
# BEFORE: mail
|
2006-02-20 21:47:50 +01:00
|
|
|
# KEYWORD: shutdown
|
2004-09-02 00:11:21 +02:00
|
|
|
|
|
|
|
#
|
|
|
|
# Add the following lines to /etc/rc.conf to enable postgrey:
|
|
|
|
#
|
|
|
|
# postgrey_enable="YES"
|
|
|
|
#
|
|
|
|
# See perldoc postgrey for flags
|
|
|
|
#
|
|
|
|
|
|
|
|
. %%RC_SUBR%%
|
|
|
|
|
|
|
|
name=postgrey
|
|
|
|
rcvar=`set_rcvar`
|
|
|
|
|
|
|
|
command=%%PREFIX%%/sbin/postgrey
|
|
|
|
required_dirs=/var/db/postgrey
|
2004-09-23 04:07:36 +02:00
|
|
|
extra_commands=reload
|
2004-09-02 00:11:21 +02:00
|
|
|
|
|
|
|
stop_postcmd=stop_postcmd
|
|
|
|
|
|
|
|
stop_postcmd()
|
|
|
|
{
|
|
|
|
rm -f $pidfile
|
|
|
|
}
|
|
|
|
|
|
|
|
# set defaults
|
|
|
|
|
2010-01-18 01:14:21 +01:00
|
|
|
load_rc_config $name
|
|
|
|
|
2004-09-02 00:11:21 +02:00
|
|
|
postgrey_enable=${postgrey_enable:-"NO"}
|
|
|
|
postgrey_pidfile=${postgrey_pidfile:-"/var/run/postgrey.pid"}
|
|
|
|
postgrey_flags=${postgrey_flags:-"--pidfile=${postgrey_pidfile} \
|
2007-10-27 13:49:41 +02:00
|
|
|
--inet=10023 -d --user=%%USER%% --group=%%GROUP%% --dbdir=/var/db/postgrey"}
|
2004-09-02 00:11:21 +02:00
|
|
|
|
|
|
|
pidfile="${postgrey_pidfile}"
|
|
|
|
|
|
|
|
run_rc_command "$1"
|