blob: 19d91864bda51f02e79a8af55cc9e1ca04cb25d9 (
plain) (
tree)
|
|
#!/bin/sh
# PROVIDE: postfwd
# REQUIRE: LOGIN cleanvar
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# postfwd_enable (bool):
# Set to "NO" by default.
# Set it to "YES" to enable postfwd.
# postfwd_config (path): Set to %%PREFIX%%/etc/postfwd.conf
# by default.
#
. /etc/rc.subr
name=postfwd
rcvar=${name}_enable
command=%%PREFIX%%/bin/${name}
required_files=%%PREFIX%%/etc/${name}.conf
pidfile="/var/run/${name}.pid"
stop_postcmd=stop_postcmd
stop_postcmd()
{
rm -f $pidfile
}
load_rc_config "$name"
case "$postfwd_enable" in
[Yy][Ee][Ss] | 1 | [Oo][Nn] | [Tt][Rr][Uu][Ee]) ;;
*) echo "To make use of $name you must first set $rcvar=\"YES\" in /etc/rc.conf" ;;
esac
: ${postfwd_enable="NO"}
: ${postfwd_config="%%PREFIX%%/etc/${name}.conf"}
command_args="--shortlog --summary=600 --cache=600 --cache-rbl-timeout=3600 --cleanup-requests=1200 --cleanup-rbls=1800 --cleanup-rates=1200 -d -f ${required_files} -i 127.0.0.1 -p 10040 -u nobody -g nobody"
run_rc_command "$1"
|