1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-17 08:01:36 +00:00
freebsd-ports/mail/opensmtpd-devel/files/smtpd.in
Ashish SHUKLA ab8dff2e80 - Fix rc.d script so it can distinguish between smtpd processes
running between host and jail

Submitted by:	Creaky <whatexercise at gmail.com> (via private email)
2014-08-31 04:13:16 +00:00

41 lines
873 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: smtpd mail
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable smtpd:
# smtpd_enable (bool): Set it to "YES" to enable OpenSMTPD.
# Default is "NO".
# smtpd_config (string): Path to OpenSMTPD configuration file.
# Default is "%%PREFIX%%/etc/mail/smtpd.conf"
# smtpd_flags (string): Additional flags to be passed to smtpd.
# Default is "".
#
#
. /etc/rc.subr
check_process()
{
/bin/pgrep -j none -f 'smtpd: \[priv\]'
}
name="smtpd"
rcvar=smtpd_enable
load_rc_config $name
: ${smtpd_enable:="NO"}
: ${smtpd_config:="%%PREFIX%%/etc/mail/smtpd.conf"}
: ${smtpd_procname:="%%PREFIX%%/sbin/smtpd"}
: ${smtpd_flags:=""}
command=${smtpd_procname}
procname=${smtpd_procname}
run_rc_command "$1"