Before trying to restart/stop the MTA or MSP queue runner, make sure

we are configured to use an MTA or MSP queue runner.  Otherwise the
script used to complain about the missing PID file.

PR:		conf/57075
Submitted by:	Jonathan Chen <jonc@chen.org.nz>
MFC after:	2 weeks
This commit is contained in:
Gregory Neil Shapiro 2003-10-19 00:31:50 +00:00
parent 1f9b7c9633
commit 93227805ff
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=121234

View File

@ -84,6 +84,30 @@ start_mta()
stop_mta()
{
# Check to make sure we are configured to start an MTA
case ${sendmail_enable} in
[Nn][Oo][Nn][Ee])
return
;;
[Yy][Ee][Ss])
;;
*)
case ${sendmail_submit_enable} in
[Yy][Ee][Ss])
;;
*)
case ${sendmail_outbound_enable} in
[Yy][Ee][Ss])
;;
*)
return
;;
esac
;;
esac
;;
esac
if [ -r ${sendmail_pidfile} ]; then
echo -n ' sendmail'
kill -TERM `head -1 ${sendmail_pidfile}`
@ -94,6 +118,29 @@ stop_mta()
restart_mta()
{
# Check to make sure we are configured to start an MTA
case ${sendmail_enable} in
[Nn][Oo][Nn][Ee])
return
;;
[Yy][Ee][Ss])
;;
*)
case ${sendmail_submit_enable} in
[Yy][Ee][Ss])
;;
*)
case ${sendmail_outbound_enable} in
[Yy][Ee][Ss])
;;
*)
return
;;
esac
;;
esac
;;
esac
if [ -r ${sendmail_pidfile} ]; then
echo -n ' sendmail'
kill -HUP `head -1 ${sendmail_pidfile}`
@ -122,6 +169,24 @@ start_mspq()
stop_mspq()
{
# Check to make sure we are configured to start an MSP queue runner
case ${sendmail_enable} in
[Nn][Oo][Nn][Ee])
return
;;
*)
if [ -r /etc/mail/submit.cf ]; then
case ${sendmail_msp_queue_enable} in
[Yy][Ee][Ss])
;;
*)
return
;;
esac
fi
;;
esac
if [ -r ${sendmail_mspq_pidfile} ]; then
echo -n ' sendmail-clientmqueue'
kill -TERM `head -1 ${sendmail_mspq_pidfile}`
@ -132,6 +197,24 @@ stop_mspq()
restart_mspq()
{
# Check to make sure we are configured to start an MSP queue runner
case ${sendmail_enable} in
[Nn][Oo][Nn][Ee])
return
;;
*)
if [ -r /etc/mail/submit.cf ]; then
case ${sendmail_msp_queue_enable} in
[Yy][Ee][Ss])
;;
*)
return
;;
esac
fi
;;
esac
if [ -r ${sendmail_mspq_pidfile} ]; then
echo -n ' sendmail-clientmqueue'
kill -HUP `head -1 ${sendmail_mspq_pidfile}`