MFC: Use humanize_number(3) for -h and -H.
[dragonfly.git] / etc / periodic / daily / 150.clean-hoststat
blobc5091be73a00e5e9bf801419f561595cbe213e52
1 #!/bin/sh
3 # $FreeBSD: src/etc/periodic/daily/150.clean-hoststat,v 1.8 2004/01/02 18:50:22 gshapiro Exp $
4 # $DragonFly: src/etc/periodic/daily/150.clean-hoststat,v 1.3 2005/07/25 00:24:31 gshapiro Exp $
6 # Remove stale persistent host status files
9 # If there is a global system configuration file, suck it in.
11 if [ -r /etc/defaults/periodic.conf ]; then
12 . /etc/defaults/periodic.conf
13 source_periodic_confs
16 case "$daily_clean_hoststat_enable" in
17 [Yy][Ee][Ss])
18 if [ -z "$(hoststat 2>&1)" ]; then
19 rc=2
20 else
21 echo ""
22 echo "Removing stale entries from sendmail host status cache:"
23 rc=0
24 purgestat || rc=1
25 fi;;
27 *) rc=0;;
28 esac
30 exit $rc