mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-10 07:04:03 +00:00
55c1140415
replacement for FreeBSD: * Use an rc.subr start/stop script. * Include contributed periodic scripts. * Replace $PREFIX with the build-time value of PREFIX. * Generate a default configure file if it doesn't exist at install-time. * Remove the default configure file if it hasn't been modified at deinstall-time. * Install additional documentation. * Move creation and removal of /var/log/exim to pkg-plist. Bump PORTREVISION accordingly. This paves the way for ports/56458, which teaches sysinstall about Exim. Bug trhodes about that PR. :-) PR: ports/56450 Submitted by: Oliver Eikemeier <eikemeier@fillmore-labs.com>
65 lines
1.1 KiB
Bash
65 lines
1.1 KiB
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
# PROVIDE: mail
|
|
# REQUIRE: LOGIN
|
|
# KEYWORD: FreeBSD shutdown
|
|
# we make mail start late, so that things like .forward's are not
|
|
# processed until the system is fully operational
|
|
|
|
#
|
|
# Add the following lines to /etc/rc.conf to enable exim:
|
|
#
|
|
#exim_enable="YES"
|
|
#
|
|
# See exim(8) for flags
|
|
#
|
|
|
|
. %%RC_SUBR%%
|
|
|
|
name=exim
|
|
rcvar=`set_rcvar`
|
|
|
|
command=%%PREFIX%%/sbin/exim
|
|
pidfile=/var/run/exim.pid
|
|
required_dirs=/var/log/exim
|
|
required_files=%%PREFIX%%/etc/exim/configure
|
|
|
|
start_precmd=start_precmd
|
|
stop_postcmd=stop_postcmd
|
|
|
|
extra_commands="reload"
|
|
|
|
start_precmd()
|
|
{
|
|
case $sendmail_enable in
|
|
[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
|
|
warn "sendmail_enable should be set to NONE"
|
|
;;
|
|
[Nn][Oo]|[Ff][Aa][Ll][Ss][Ee]|[Oo][Ff][Ff]|0)
|
|
case $sendmail_submit_enable in
|
|
[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
|
|
warn "sendmail_submit_enable should be set to NO"
|
|
;;
|
|
esac
|
|
;;
|
|
[Nn][Oo][Nn][Ee])
|
|
;;
|
|
esac
|
|
}
|
|
|
|
stop_postcmd()
|
|
{
|
|
rm -f $pidfile
|
|
}
|
|
|
|
# set defaults
|
|
|
|
exim_enable=${exim_enable:-"NO"}
|
|
exim_flags=${exim_flags:-"-bd -q30m"}
|
|
|
|
load_rc_config $name
|
|
run_rc_command "$1"
|