3 # $FreeBSD: src/etc/periodic/daily/150.clean-hoststat,v 1.3.2.2 2000/09/20 02:46:15 jkh Exp $
4 # $DragonFly: src/etc/periodic/daily/150.clean-hoststat,v 1.2 2003/06/17 04:24:48 dillon Exp $
6 # Remove stale files in /var/spool/.hoststat
9 # If there is a global system configuration file, suck it in.
11 if [ -r /etc/defaults/periodic.conf ]
13 . /etc/defaults/periodic.conf
17 case "$daily_clean_hoststat_enable" in
19 if [ -z "$daily_clean_hoststat_days" ]
21 echo '$daily_clean_hoststat_enable is enabled but' \
22 '$daily_clean_hoststat_days is not set'
24 elif [ ! -d /var/spool/.hoststat ]
26 echo '$daily_clean_hoststat_enable is enabled but' \
27 "/var/spool/.hoststat doesn't exist"
31 echo "Removing stale files from /var/spool/.hoststat:"
33 case "$daily_clean_hoststat_verbose" in
42 rc=$(find . ! -name . -mtime +$daily_clean_hoststat_days \
43 -delete $print | tee /dev/stderr | wc -l)
44 [ -z "$print" ] && rc=0