aboutsummaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorGregory Neil Shapiro <gshapiro@FreeBSD.org>2003-10-19 00:31:50 +0000
committerGregory Neil Shapiro <gshapiro@FreeBSD.org>2003-10-19 00:31:50 +0000
commit93227805ffb60f86a1f6149a38fbb193faca8004 (patch)
tree3f0c1c0b79ab1af4fefe3919a99b704b29fbc287 /etc
parent1f9b7c963373fe5b8127ca37fc23d25529d36d04 (diff)
downloadsrc-93227805ffb60f86a1f6149a38fbb193faca8004.tar.gz
src-93227805ffb60f86a1f6149a38fbb193faca8004.zip
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
Notes
Notes: svn path=/head/; revision=121234
Diffstat (limited to 'etc')
-rw-r--r--etc/rc.sendmail83
1 files changed, 83 insertions, 0 deletions
diff --git a/etc/rc.sendmail b/etc/rc.sendmail
index 74dde31883db..b025bc0bd62c 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}`