periodic.conf revision 123498
186333Sdillon#!/bin/sh
2139803Simp#
386333Sdillon# This is defaults/periodic.conf - a file full of useful variables that
4139803Simp# you can set to change the default behaviour of periodic jobs on your
5139803Simp# system.  You should not edit this file!  Put any overrides into one of the
6139803Simp# $periodic_conf_files instead and you will be able to update these defaults
7139803Simp# later without spamming your local configuration information.
8139803Simp#
9139803Simp# The $periodic_conf_files files should only contain values which override
10139803Simp# values set in this file.  This eases the upgrade path when defaults
11139803Simp# are changed and new features are added.
12139803Simp#
13139803Simp# $FreeBSD: head/etc/defaults/periodic.conf 123498 2003-12-12 21:23:27Z jesper $
14139803Simp#
15139803Simp
16139803Simp# What files override these defaults ?
17139803Simpperiodic_conf_files="/etc/periodic.conf /etc/periodic.conf.local"
18139803Simp
19139803Simp# periodic script dirs
20139803Simplocal_periodic="/usr/local/etc/periodic /usr/X11R6/etc/periodic"
21139803Simp
22139803Simp
23139803Simp# Daily options
24139803Simp
25139803Simp# These options are used by periodic(8) itself to determine what to do
26139803Simp# with the output of the sub-programs that are run, and where to send
27170035Srwatson# that output.  $daily_output might be set to /var/log/daily.log if you
2886333Sdillon# wish to log the daily output and have the files rotated by newsyslog(8)
2986333Sdillon#
3086333Sdillondaily_output="root"					# user or /file
3186333Sdillondaily_show_success="YES"				# scripts returning 0
3286333Sdillondaily_show_info="YES"					# scripts returning 1
3386333Sdillondaily_show_badconfig="NO"				# scripts returning 2
3486333Sdillon
3586333Sdillon# 100.clean-disks
3686333Sdillondaily_clean_disks_enable="NO"				# Delete files daily
37116305Smuxdaily_clean_disks_files="[#,]* .#* a.out *.core *.CKP .emacs_[0-9]*"
3886333Sdillondaily_clean_disks_days=3				# If older than this
3986333Sdillondaily_clean_disks_verbose="YES"				# Mention files deleted
4086333Sdillon
41116305Smux# 110.clean-tmps
4286333Sdillondaily_clean_tmps_enable="NO"				# Delete stuff daily
43116305Smuxdaily_clean_tmps_dirs="/tmp"				# Delete under here
4486333Sdillondaily_clean_tmps_days="3"				# If not accessed for
4586333Sdillondaily_clean_tmps_ignore=".X*-lock quota.user quota.group" # Don't delete these
46116182Sobriendaily_clean_tmps_verbose="YES"				# Mention files deleted
47116182Sobrien
48116182Sobrien# 120.clean-preserve
4986333Sdillondaily_clean_preserve_enable="YES"			# Delete files daily
5086333Sdillondaily_clean_preserve_days=7				# If not modified for
5186333Sdillondaily_clean_preserve_verbose="YES"			# Mention files deleted
5286333Sdillon
5386333Sdillon# 130.clean-msgs
5486333Sdillondaily_clean_msgs_enable="YES"				# Delete msgs daily
5586333Sdillondaily_clean_msgs_days=					# If not modified for
5686333Sdillon
5786333Sdillon# 140.clean-rwho
58117494Struckmandaily_clean_rwho_enable="YES"				# Delete rwho daily
59141616Sphkdaily_clean_rwho_days=7					# If not modified for
60117494Struckmandaily_clean_rwho_verbose="YES"				# Mention files deleted
61117494Struckman
62117494Struckman# 150.clean-hoststat
63117494Struckmandaily_clean_hoststat_enable="YES"			# Purge sendmail host
6486333Sdillon							# status cache daily
65117494Struckman
66117494Struckman# 200.backup-passwd
67117494Struckmandaily_backup_passwd_enable="YES"			# Backup passwd & group
6886333Sdillon
69117494Struckman# 210.backup-aliases
70117494Struckmandaily_backup_aliases_enable="YES"			# Backup mail aliases
71117494Struckman
72117494Struckman# 300.calendar
73117494Struckmandaily_calendar_enable="NO"				# Run calendar -a
74117494Struckman
7586333Sdillon# 310.accounting
76117494Struckmandaily_accounting_enable="YES"				# Rotate acct files
77117494Struckmandaily_accounting_compress="NO"				# Gzip rotated files
78117494Struckmandaily_accounting_flags=-q				# Flags to /usr/sbin/sa
79117494Struckmandaily_accounting_save=3					# How many files to save
8086333Sdillon
81117494Struckman# 330.news
82117494Struckmandaily_news_expire_enable="YES"				# Run news.expire
83117494Struckman
84117494Struckman# 400.status-disks
85117494Struckmandaily_status_disks_enable="YES"				# Check disk status
86117494Struckmandaily_status_disks_df_flags="-k -t nonfs"		# df(1) flags for check
87117494Struckman
88117494Struckman# 405.status-ata_raid
89117494Struckmandaily_status_ata_raid_enable="NO"			# Check ATA raid status
90117494Struckman
91117494Struckman# 420.status-network
92117494Struckmandaily_status_network_enable="YES"			# Check network status
93117494Struckmandaily_status_network_usedns="YES"			# DNS lookups are ok
94117494Struckman
95117494Struckman# 430.status-rwho
96117494Struckmandaily_status_rwho_enable="YES"				# Check system status
97117494Struckman
98117494Struckman# 440.status-mailq
99117494Struckmandaily_status_mailq_enable="YES"				# Check mail status
100117494Struckmandaily_status_mailq_shorten="NO"				# Shorten output
101117494Struckmandaily_status_include_submit_mailq="YES"			# Also submit queue
10286333Sdillon
103117494Struckman# 450.status-security
104117494Struckmandaily_status_security_enable="YES"			# Security check
105117494Struckman# See "Security options" below for more options
106117494Struckman
10786333Sdillon# 460.status-mail-rejects
108117494Struckmandaily_status_mail_rejects_enable="YES"			# Check mail rejects
109117494Struckmandaily_status_mail_rejects_logs=3			# How many logs to check
11086333Sdillon
111117494Struckman# 470.status-named
11286476Speterdaily_status_named_enable="YES"
113117494Struckmandaily_status_named_usedns="YES"				# DNS lookups are ok
114117494Struckman
115117494Struckman# 500.queuerun
116117494Struckmandaily_queuerun_enable="YES"				# Run mail queue
117117494Struckmandaily_submit_queuerun="YES"				# Also submit queue
118117494Struckman
119117494Struckman# 999.local
120117494Struckmandaily_local="/etc/daily.local"				# Local scripts
12186333Sdillon
12286333Sdillon
12386333Sdillon# Security options
124117494Struckman
125117494Struckman# These options are used by the security periodic(8) scripts spawned in
12686333Sdillon# 450.status-security above.
127117494Struckmandaily_status_security_inline="NO"			# Run inline ?
12886333Sdillondaily_status_security_output="root"			# user or /file
129117494Struckmandaily_status_security_noamd="NO"			# Don't check amd mounts
130117494Struckmandaily_status_security_logdir="/var/log"			# Directory for logs
131117494Struckman
132117494Struckman# 100.chksetuid
133117494Struckmandaily_status_security_chksetuid_enable="YES"
134117494Struckman
135117494Struckman# 200.chkmounts
136117494Struckmandaily_status_security_chkmounts_enable="YES"
13786333Sdillon#daily_status_security_chkmounts_ignore="^amd:"		# Don't check matching
13886333Sdillon							# FS types
139117494Struckman
140117494Struckman# 300.chkuid0
14186333Sdillondaily_status_security_chkuid0_enable="YES"
142117494Struckman
143116305Smux# 400.passwdless
144117494Struckmandaily_status_security_passwdless_enable="YES"
145117494Struckman
146117494Struckman# 500.ipfwdenied
147117494Struckmandaily_status_security_ipfwdenied_enable="YES"
148117494Struckman
149184214Sdes# 510.ipfdenied
150184214Sdesdaily_status_security_ipfdenied_enable="YES"
151117494Struckman
152117494Struckman# 550.ipfwlimit
153117494Struckmandaily_status_security_ipfwlimit_enable="YES"
15486333Sdillon
15586333Sdillon# 600.ip6fwdenied
156117494Struckmandaily_status_security_ip6fwdenied_enable="YES"
157117494Struckman
15886333Sdillon# 650.ip6fwlimit
159117494Struckmandaily_status_security_ip6fwlimit_enable="YES"
160117494Struckman
161116305Smux# 700.kernelmsg
162117494Struckmandaily_status_security_kernelmsg_enable="YES"
163117494Struckman
164184205Sdes# 800.loginfail
165117494Struckmandaily_status_security_loginfail_enable="YES"
16686333Sdillon
16786333Sdillon# 900.tcpwrap
168117494Struckmandaily_status_security_tcpwrap_enable="YES"
169117494Struckman
17086333Sdillon
171117494Struckman# Weekly options
172117494Struckman
173117494Struckman# These options are used by periodic(8) itself to determine what to do
174117494Struckman# with the output of the sub-programs that are run, and where to send
175117494Struckman# that output.  $weekly_output might be set to /var/log/weekly.log if you
176116305Smux# wish to log the weekly output and have the files rotated by newsyslog(8)
177117494Struckman#
178117494Struckmanweekly_output="root"					# user or /file
179117494Struckmanweekly_show_success="YES"				# scripts returning 0
180117494Struckmanweekly_show_info="YES"					# scripts returning 1
181117494Struckmanweekly_show_badconfig="NO"				# scripts returning 2
18286333Sdillon
18386333Sdillon# 120.clean-kvmdb
18486333Sdillonweekly_clean_kvmdb_enable="YES"				# Clean kvmdb weekly
185117494Struckmanweekly_clean_kvmdb_days=7				# If not accessed for
186117494Struckmanweekly_clean_kvmdb_verbose="YES"			# Mention files deleted
187117494Struckman
18886333Sdillon# 310.locate
189117494Struckmanweekly_locate_enable="YES"				# Update locate weekly
190117494Struckman
19186333Sdillon# 320.whatis
192117494Struckmanweekly_whatis_enable="YES"				# Update whatis weekly
193116305Smux
194117494Struckman# 330.catman
195117494Struckmanweekly_catman_enable="NO"				# Preformat man pages
196117494Struckman
197117494Struckman# 340.noid
198117494Struckmanweekly_noid_enable="NO"					# Find unowned files
199117494Struckmanweekly_noid_dirs="/"					# Look here
200117494Struckman
201117494Struckman# 400.status-pkg
202117494Struckmanweekly_status_pkg_enable="NO"				# Find out-of-date pkgs
20386333Sdillonpkg_version=pkg_version					# Use this program
20486333Sdillon
205117494Struckman# 999.local
206117494Struckmanweekly_local="/etc/weekly.local"			# Local scripts
207117494Struckman
208117494Struckman
209117660Struckman# Monthly options
210117494Struckman
211184205Sdes# These options are used by periodic(8) itself to determine what to do
212117494Struckman# with the output of the sub-programs that are run, and where to send
213117494Struckman# that output.  $monthly_output might be set to /var/log/monthly.log if you
214117494Struckman# wish to log the monthly output and have the files rotated by newsyslog(8)
215117494Struckman#
216117494Struckmanmonthly_output="root"					# user or /file
217117494Struckmanmonthly_show_success="YES"				# scripts returning 0
218117494Struckmanmonthly_show_info="YES"					# scripts returning 1
219monthly_show_badconfig="NO"				# scripts returning 2
220
221# 200.accounting
222monthly_accounting_enable="YES"				# Login accounting
223
224# 999.local
225monthly_local="/etc/monthly.local"			# Local scripts
226
227
228# Define source_periodic_confs, the mechanism used by /etc/periodic/*/*
229# scripts to source defaults/periodic.conf overrides safely.
230
231if [ -z "${source_periodic_confs_defined}" ]; then
232        source_periodic_confs_defined=yes
233        source_periodic_confs () {
234                local i sourced_files
235
236                for i in ${periodic_conf_files}; do
237                        case ${sourced_files} in
238                        *:$i:*)
239                                ;;
240                        *)
241                                sourced_files="${sourced_files}:$i:"
242                                [ -r $i ] && . $i
243                                ;;
244                        esac
245                done
246        }
247fi
248