Use hoststat/purgestat instead of sendmail -bh/-bH so the calls can
be properly mailwrapper'ed. PR: conf/60676 Submitted by: Colin Percival <cperciva@daemonology.net>, maxim MFC after: 4 days
This commit is contained in:
parent
3f0bd14bcb
commit
d8ce65fca7
@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# $FreeBSD$
|
# $FreeBSD$
|
||||||
#
|
#
|
||||||
# Remove stale files in /var/spool/.hoststat
|
# Remove stale persistent host status files
|
||||||
#
|
#
|
||||||
|
|
||||||
# If there is a global system configuration file, suck it in.
|
# If there is a global system configuration file, suck it in.
|
||||||
@ -14,13 +14,13 @@ fi
|
|||||||
|
|
||||||
case "$daily_clean_hoststat_enable" in
|
case "$daily_clean_hoststat_enable" in
|
||||||
[Yy][Ee][Ss])
|
[Yy][Ee][Ss])
|
||||||
if [ -z "$(sendmail -bh 2>&1)" ]; then
|
if [ -z "$(hoststat 2>&1)" ]; then
|
||||||
rc=2
|
rc=2
|
||||||
else
|
else
|
||||||
echo ""
|
echo ""
|
||||||
echo "Removing stale entries from sendmail host status cache:"
|
echo "Removing stale entries from sendmail host status cache:"
|
||||||
rc=0
|
rc=0
|
||||||
sendmail -bH || rc=1
|
purgestat || rc=1
|
||||||
fi;;
|
fi;;
|
||||||
|
|
||||||
*) rc=0;;
|
*) rc=0;;
|
||||||
|
Loading…
Reference in New Issue
Block a user