- Update to 1.7.1 - Convert the startup script to rcNG - Create a bogomilter user Moreover: - Use ${LOCALBASE}/bin/bogofilter rather than /usr/local/bin/bogofilter - Fix the configuration file path in bogom.8 - Fix the packing list when NOPORTDOCS is defined PR: ports/81417 [1] Submitted by: maintainer [1]
42 lines
951 B
Bash
42 lines
951 B
Bash
#!/bin/sh
|
|
|
|
# PROVIDE: milterbogom
|
|
# REQUIRE: LOGIN
|
|
# BEFORE: sendmail
|
|
# KEYWORD: milterbogom
|
|
|
|
milterbogom_enable=${milterbogom_enable-"NO"}
|
|
milterbogom_socket=${milterbogom_socket-"unix:/var/run/bogom/milter.sock"}
|
|
milterbogom_user=${milterbogom_user-"bogomilter"}
|
|
milterbogom_pid=${milterbogom_pid-"/var/run/bogom/bogom.pid"}
|
|
milterbogom_flags=${milterbogom_flags-"-u ${milterbogom_user} \
|
|
-s ${milterbogom_socket} -p ${milterbogom_pid}"}
|
|
|
|
|
|
. %%RC_SUBR%%
|
|
|
|
name=milterbogom
|
|
pidfile=${milterbogom_pid}
|
|
rcvar=`set_rcvar`
|
|
command=%%PREFIX%%/sbin/bogom
|
|
start_precmd="bogom_precmd"
|
|
stop_postcmd="bogom_postcmd"
|
|
|
|
load_rc_config $name
|
|
|
|
bogom_precmd()
|
|
{
|
|
if [ -d `dirname ${milterbogom_pid}` ]
|
|
then
|
|
return;
|
|
fi
|
|
mkdir -p `dirname ${milterbogom_pid}`
|
|
chown ${milterbogom_user} `dirname ${milterbogom_pid}`
|
|
}
|
|
|
|
bogom_postcmd()
|
|
{
|
|
# just if the directory is empty
|
|
rmdir `dirname ${milterbogom_pid}` > /dev/null 2>&1
|
|
}
|
|
run_rc_command "$1"
|