3 # $FreeBSD: src/etc/periodic/daily/150.clean-hoststat,v 1.3.2.2 2000/09/20 02:46:15 jkh Exp $
5 # Remove stale files in /var/spool/.hoststat
8 # If there is a global system configuration file, suck it in.
10 if [ -r /etc/defaults/periodic.conf ]
12 . /etc/defaults/periodic.conf
16 case "$daily_clean_hoststat_enable" in
18 if [ -z "$daily_clean_hoststat_days" ]
20 echo '$daily_clean_hoststat_enable is enabled but' \
21 '$daily_clean_hoststat_days is not set'
23 elif [ ! -d /var/spool/.hoststat ]
25 echo '$daily_clean_hoststat_enable is enabled but' \
26 "/var/spool/.hoststat doesn't exist"
30 echo "Removing stale files from /var/spool/.hoststat:"
32 case "$daily_clean_hoststat_verbose" in
41 rc=$(find . ! -name . -mtime +$daily_clean_hoststat_days \
42 -delete $print | tee /dev/stderr | wc -l)
43 [ -z "$print" ] && rc=0