mirror of
https://git.freebsd.org/ports.git
synced 2025-05-04 15:37:40 -04:00
* Since 3.0.0 spf-engine uses flit-core as build backend. So switch to use 'USE_PYTHON=pep517'. * Add entry to UPDATING as default configuration file path of pyspf-milter has changed. ChangeLog: https://git.launchpad.net/spf-engine/tree/CHANGES?h=3.0.3
40 lines
1,009 B
Bash
40 lines
1,009 B
Bash
#!/bin/sh
|
|
|
|
# PROVIDE: pyspf_milter
|
|
# REQUIRE: LOGIN
|
|
# BEFORE: mail
|
|
# KEYWORD: shutdown
|
|
#
|
|
# Add the following lines to /etc/rc.conf to enable pyspf_milter:
|
|
#
|
|
# pyspf_milter_enable (bool) Set to 'YES' to enable.
|
|
# Default: NO
|
|
# pyspf_milter_conffile (path) Location of configuration file.
|
|
# Default: %%PREFIX%%/pyspf-milter/pyspf-milter.conf
|
|
|
|
. /etc/rc.subr
|
|
|
|
name=pyspf_milter
|
|
rcvar=pyspf_milter_enable
|
|
|
|
load_rc_config $name
|
|
|
|
: ${pyspf_milter_enable:=NO}
|
|
: ${pyspf_milter_conffile:=%%PREFIX%%/etc/pyspf-milter/pyspf-milter.conf}
|
|
|
|
command=/usr/sbin/daemon
|
|
command_interpreter=%%PYTHON_CMD%%
|
|
procname=%%PREFIX%%/bin/pyspf-milter
|
|
command_args="-c -f ${procname} ${pyspf_milter_conffile}"
|
|
pidfile=/var/run/pyspf-milter/pyspf-milter.pid
|
|
required_dirs=/var/run/pyspf-milter
|
|
required_files=${pyspf_milter_conffile}
|
|
start_precmd=pyspf_milter_cleanup
|
|
stop_postcmd=pyspf_milter_cleanup
|
|
|
|
pyspf_milter_cleanup ()
|
|
{
|
|
rm -f ${pidfile}
|
|
}
|
|
|
|
run_rc_command "$1"
|