daily 150.clean-hoststat: suppress error when using dma
dma(8) does not have hoststat or purgestat, so this script produces an error from the daily script. We could disable this script, but that would mean yet another change to switch back to sendmail. Check for purgestat in mailer.conf before attempting either hoststat or purgestat. Reviewed by: pstef, bapt Differential Revision: https://reviews.freebsd.org/D37712
This commit is contained in:
parent
b939fe5ff1
commit
c934f2a574
@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# $FreeBSD$
|
# $FreeBSD$
|
||||||
#
|
#
|
||||||
# Remove stale persistent host status files
|
# Remove stale persistent host status files if the mailer supports it.
|
||||||
#
|
#
|
||||||
|
|
||||||
# If there is a global system configuration file, suck it in.
|
# If there is a global system configuration file, suck it in.
|
||||||
@ -14,7 +14,9 @@ fi
|
|||||||
|
|
||||||
case "$daily_clean_hoststat_enable" in
|
case "$daily_clean_hoststat_enable" in
|
||||||
[Yy][Ee][Ss])
|
[Yy][Ee][Ss])
|
||||||
if [ -z "$(hoststat 2>&1)" ]; then
|
if ! grep -q '^purgestat' /etc/mail/mailer.conf; then
|
||||||
|
rc=3
|
||||||
|
elif [ -z "$(hoststat 2>&1)" ]; then
|
||||||
rc=2
|
rc=2
|
||||||
else
|
else
|
||||||
echo ""
|
echo ""
|
||||||
|
Loading…
Reference in New Issue
Block a user