1999-03-30 15:30:44 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
1999-08-27 23:37:10 +00:00
|
|
|
# $FreeBSD$
|
1999-03-30 15:30:44 +00:00
|
|
|
#
|
2004-01-02 18:50:22 +00:00
|
|
|
# Remove stale persistent host status files
|
2000-06-23 01:18:31 +00:00
|
|
|
#
|
1999-03-30 15:30:44 +00:00
|
|
|
|
2000-06-23 01:18:31 +00:00
|
|
|
# If there is a global system configuration file, suck it in.
|
|
|
|
#
|
2002-08-12 11:09:01 +00:00
|
|
|
if [ -r /etc/defaults/periodic.conf ]; then
|
2000-06-23 01:18:31 +00:00
|
|
|
. /etc/defaults/periodic.conf
|
|
|
|
source_periodic_confs
|
1999-03-30 15:30:44 +00:00
|
|
|
fi
|
2000-06-23 01:18:31 +00:00
|
|
|
|
|
|
|
case "$daily_clean_hoststat_enable" in
|
|
|
|
[Yy][Ee][Ss])
|
2004-01-02 18:50:22 +00:00
|
|
|
if [ -z "$(hoststat 2>&1)" ]; then
|
2000-09-14 17:19:15 +00:00
|
|
|
rc=2
|
|
|
|
else
|
2000-06-23 01:18:31 +00:00
|
|
|
echo ""
|
2003-01-08 18:51:45 +00:00
|
|
|
echo "Removing stale entries from sendmail host status cache:"
|
|
|
|
rc=0
|
2004-01-02 18:50:22 +00:00
|
|
|
purgestat || rc=1
|
2000-06-23 01:18:31 +00:00
|
|
|
fi;;
|
2000-09-14 17:19:15 +00:00
|
|
|
|
|
|
|
*) rc=0;;
|
2000-06-23 01:18:31 +00:00
|
|
|
esac
|
2000-09-14 17:19:15 +00:00
|
|
|
|
|
|
|
exit $rc
|