summaryrefslogtreecommitdiffstats
path: root/etc/rc.sendmail
diff options
context:
space:
mode:
authorgshapiro <gshapiro@FreeBSD.org>2003-10-19 00:31:50 +0000
committergshapiro <gshapiro@FreeBSD.org>2003-10-19 00:31:50 +0000
commitb767de36df1b4c64c0594d55a1fed8878b1e820b (patch)
tree3f0c1c0b79ab1af4fefe3919a99b704b29fbc287 /etc/rc.sendmail
parent7d4f685f3e78681b75df269cc3a586acd73757f8 (diff)
downloadFreeBSD-src-b767de36df1b4c64c0594d55a1fed8878b1e820b.zip
FreeBSD-src-b767de36df1b4c64c0594d55a1fed8878b1e820b.tar.gz
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
Diffstat (limited to 'etc/rc.sendmail')
-rw-r--r--etc/rc.sendmail83
1 files changed, 83 insertions, 0 deletions
diff --git a/etc/rc.sendmail b/etc/rc.sendmail
index 74dde31..b025bc0 100644
--- a/etc/rc.sendmail
+++ b/etc/rc.sendmail
@@ -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}`
OpenPOWER on IntegriCloud