]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - etc/periodic/daily/150.clean-hoststat
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / etc / periodic / daily / 150.clean-hoststat
1 #!/bin/sh
2 #
3 # $FreeBSD$
4 #
5 # Remove stale persistent host status files
6 #
7
8 # If there is a global system configuration file, suck it in.
9 #
10 if [ -r /etc/defaults/periodic.conf ]; then
11     . /etc/defaults/periodic.conf
12     source_periodic_confs
13 fi
14
15 case "$daily_clean_hoststat_enable" in
16     [Yy][Ee][Ss])
17         if [ -z "$(hoststat 2>&1)" ]; then
18             rc=2
19         else
20             echo ""
21             echo "Removing stale entries from sendmail host status cache:"
22             rc=0
23             purgestat || rc=1
24         fi;;
25
26     *)  rc=0;;
27 esac
28
29 exit $rc