Allow this script to be used for Postfix:
- Use sendmail_foo variables after load_rc_config so that they actually work. - Utilize sendmail_procname. - Check sendmail_submit_enable instead of sendmail_enable when dealing with mail submission MTA.
This commit is contained in:
parent
934c5da9c4
commit
299b2a180b
@ -18,10 +18,11 @@
|
||||
name="sendmail"
|
||||
rcvar=`set_rcvar`
|
||||
required_files="/etc/mail/${name}.cf"
|
||||
command=${sendmail_program:-/usr/sbin/sendmail}
|
||||
pidfile=${sendmail_pidfile:-/var/run/sendmail.pid}
|
||||
|
||||
load_rc_config $name
|
||||
command=${sendmail_program:-/usr/sbin/sendmail}
|
||||
pidfile=${sendmail_pidfile:-/var/run/sendmail.pid}
|
||||
procname=${sendmail_procname:-/usr/sbin/sendmail}
|
||||
|
||||
case ${sendmail_enable} in
|
||||
[Nn][Oo][Nn][Ee])
|
||||
@ -73,7 +74,7 @@ run_rc_command "$1"
|
||||
|
||||
required_files=
|
||||
|
||||
if ! checkyesno sendmail_enable; then
|
||||
if ! checkyesno sendmail_submit_enable; then
|
||||
name="sendmail_submit"
|
||||
rcvar=`set_rcvar`
|
||||
start_cmd="${command} ${sendmail_submit_flags}"
|
||||
|
Loading…
Reference in New Issue
Block a user