periodic.conf revision 72677
161981Sbrian#!/bin/sh
261981Sbrian#
361981Sbrian# This is defaults/periodic.conf - a file full of useful variables that
461981Sbrian# you can set to change the default behaviour of periodic jobs on your
561981Sbrian# system.  You should not edit this file!  Put any overrides into one of the
661981Sbrian# $periodic_conf_files instead and you will be able to update these defaults
761981Sbrian# later without spamming your local configuration information.
861981Sbrian#
961981Sbrian# The $periodic_conf_files files should only contain values which override
1061981Sbrian# values set in this file.  This eases the upgrade path when defaults
1161981Sbrian# are changed and new features are added.
1261981Sbrian#
1361981Sbrian# $FreeBSD: head/etc/defaults/periodic.conf 72677 2001-02-19 02:47:42Z peter $
1461981Sbrian#
1561981Sbrian
1661981Sbrian# What files override these defaults ?
1761981Sbrianperiodic_conf_files="/etc/periodic.conf /etc/periodic.conf.local"
1861981Sbrian
1961981Sbrian# periodic script dirs
2061981Sbrianlocal_periodic="/usr/local/etc/periodic /usr/X11R6/etc/periodic"
2161981Sbrian
2261981Sbrian
2361981Sbrian# Daily options
2461981Sbrian
2565843Sbrian# These options are used by periodic(8) itself to determine what to do
2665843Sbrian# with the output of the sub-programs that are run, and where to send
2765843Sbrian# that output.  $daily_output might be set to /var/log/daily.log if you
2865843Sbrian# wish to log the daily output and have the files rotated by newsyslog(8)
2965843Sbrian#
3065843Sbriandaily_output="root"					# user or /file
3165843Sbriandaily_show_success="YES"				# scripts returning 0
3265843Sbriandaily_show_info="YES"					# scripts returning 1
3365843Sbriandaily_show_badconfig="NO"				# scripts returning 2
3465843Sbrian
3561981Sbrian# 100.clean-disks
3661981Sbriandaily_clean_disks_enable="NO"				# Delete files daily
3761981Sbriandaily_clean_disks_files="[#,]* .#* a.out *.core *.CKP .emacs_[0-9]*"
3861981Sbriandaily_clean_disks_days=3				# If older than this
3961981Sbriandaily_clean_disks_verbose="YES"				# Mention files deleted
4061981Sbrian
4161981Sbrian# 110.clean-tmps
4261981Sbriandaily_clean_tmps_enable="NO"				# Delete stuff daily
4361981Sbriandaily_clean_tmps_dirs="/tmp"				# Delete under here
4461981Sbriandaily_clean_tmps_days="3"				# If not accessed for
4561981Sbriandaily_clean_tmps_ignore=".X*-lock quota.user quota.group" # Don't delete these
4661981Sbriandaily_clean_tmps_verbose="YES"				# Mention files deleted
4761981Sbrian
4861981Sbrian# 120.clean-preserve
4961981Sbriandaily_clean_preserve_enable="YES"			# Delete files daily
5061981Sbriandaily_clean_preserve_days=7				# If not modified for
5161981Sbriandaily_clean_preserve_verbose="YES"			# Mention files deleted
5261981Sbrian
5361981Sbrian# 130.clean-msgs
5461981Sbriandaily_clean_msgs_enable="YES"				# Delete msgs daily
5561981Sbriandaily_clean_msgs_days=					# If not modified for
5661981Sbrian
5761981Sbrian# 140.clean-rwho
5861981Sbriandaily_clean_rwho_enable="YES"				# Delete rwho daily
5961981Sbriandaily_clean_rwho_days=7					# If not modified for
6061981Sbriandaily_clean_rwho_verbose="YES"				# Mention files deleted
6161981Sbrian
6261981Sbrian# 150.clean-hoststat
6361981Sbriandaily_clean_hoststat_enable="YES"			# Delete .hoststat daily
6461981Sbriandaily_clean_hoststat_days=3				# If not modified for
6561981Sbriandaily_clean_hoststat_verbose="YES"			# Mention files deleted
6661981Sbrian
6761981Sbrian# 200.backup-passwd
6861981Sbriandaily_backup_passwd_enable="YES"			# Backup passwd & group
6961981Sbrian
7061981Sbrian# 210.backup-aliases
7161981Sbriandaily_backup_aliases_enable="YES"			# Backup mail aliases
7261981Sbrian
7361981Sbrian# 220.backup-distfile
7465843Sbriandaily_backup_distfile_enable="YES"			# rdist /etc/Distfile
7561981Sbrian
7661981Sbrian# 300.calendar
7761981Sbriandaily_calendar_enable="NO"				# Run calendar -a
7861981Sbrian
7961981Sbrian# 310.accounting
8061981Sbriandaily_accounting_enable="YES"				# Rotate acct files
8162054Sbriandaily_accounting_compress="NO"				# Gzip rotated files
8261981Sbrian
8361981Sbrian# 320.distfile
8461981Sbriandaily_distfile_enable="YES"				# Run rdist daily
8561981Sbrian
8661981Sbrian# 330.news
8761981Sbriandaily_news_expire_enable="YES"				# Run news.expire
8861981Sbrian
8961981Sbrian# 340.uucp
9061981Sbriandaily_uuclean_enable="YES"				# Run uuclean.daily
9161981Sbrian
9261981Sbrian# 400.status-disks
9361981Sbriandaily_status_disks_enable="YES"				# Check disk status
9462644Ssheldonhdaily_status_disks_df_flags="-k -t nonfs"		# df(1) flags for check
9561981Sbrian
9661981Sbrian# 410.status-uucp
9761981Sbriandaily_status_uucp_enable="YES"				# Check uucp status
9861981Sbrian
9961981Sbrian# 420.status-network
10061981Sbriandaily_status_network_enable="YES"			# Check network status
10161981Sbriandaily_status_network_usedns="YES"			# DNS lookups are ok
10261981Sbrian
10361981Sbrian# 430.status-rwho
10461981Sbriandaily_status_rwho_enable="YES"				# Check system status
10561981Sbrian
10661981Sbrian# 440.status-mailq
10761981Sbriandaily_status_mailq_enable="YES"				# Check mail status
10861981Sbriandaily_status_mailq_shorten="NO"				# Shorten output
10961981Sbrian
11061981Sbrian# 450.status-security
11161981Sbriandaily_status_security_enable="YES"			# Security check
11261981Sbriandaily_status_security_inline="NO"			# Run inline ?
11371834Sbriandaily_status_security_output="root"			# user or /file
11461981Sbriandaily_status_security_noamd="NO"			# Don't check amd mounts
11561981Sbriandaily_status_security_nomfs="NO"			# Don't check mfs mounts
11661981Sbrian
11761981Sbrian# 460.status-mail-rejects
11861981Sbriandaily_status_mail_rejects_enable="YES"			# Check mail rejects
11962274Sbriandaily_status_mail_rejects_logs=3			# How many logs to check
12061981Sbrian
12172677Speter# 500.queuerun
12272677Speterdaily_queuerun_enable="YES"				# Run mail queue
12372677Speter
12461981Sbrian# 999.local
12561981Sbriandaily_local="/etc/daily.local"				# Local scripts
12661981Sbrian
12761981Sbrian
12861981Sbrian# Weekly options
12961981Sbrian
13065843Sbrian# These options are used by periodic(8) itself to determine what to do
13165843Sbrian# with the output of the sub-programs that are run, and where to send
13265843Sbrian# that output.  $weekly_output might be set to /var/log/weekly.log if you
13365843Sbrian# wish to log the weekly output and have the files rotated by newsyslog(8)
13465843Sbrian#
13565843Sbrianweekly_output="root"					# user or /file
13665843Sbrianweekly_show_success="YES"				# scripts returning 0
13765843Sbrianweekly_show_info="YES"					# scripts returning 1
13865843Sbrianweekly_show_badconfig="NO"				# scripts returning 2
13965843Sbrian
14061981Sbrian# 120.clean-kvmdb
14161981Sbrianweekly_clean_kvmdb_enable="YES"				# Clean kvmdb weekly
14261981Sbrianweekly_clean_kvmdb_days=7				# If not accessed for
14361981Sbrianweekly_clean_kvmdb_verbose="YES"			# Mention files deleted
14461981Sbrian
14561981Sbrian# 300.uucp
14661981Sbrianweekly_uucp_enable="YES"				# Clean uucp weekly
14761981Sbrian
14861981Sbrian# 310.locate
14961981Sbrianweekly_locate_enable="YES"				# Update locate weekly
15061981Sbrian
15161981Sbrian# 320.whatis
15261981Sbrianweekly_whatis_enable="YES"				# Update whatis weekly
15361981Sbrian
15461981Sbrian# 330.catman
15561981Sbrianweekly_catman_enable="NO"				# Preformat man pages
15661981Sbrian
15761981Sbrian# 340.noid
15861981Sbrianweekly_noid_enable="NO"					# Find unowned files
15961981Sbrianweekly_noid_dirs="/"					# Look here
16061981Sbrian
16162206Sbrian# 400.status-pkg
16262155Sbrianweekly_status_pkg_enable="NO"				# Find out-of-date pkgs
16362155Sbrian
16461981Sbrian# 999.local
16561981Sbrianweekly_local="/etc/weekly.local"			# Local scripts
16661981Sbrian
16761981Sbrian
16861981Sbrian# Monthly options
16961981Sbrian
17065843Sbrian# These options are used by periodic(8) itself to determine what to do
17165843Sbrian# with the output of the sub-programs that are run, and where to send
17265843Sbrian# that output.  $monthly_output might be set to /var/log/monthly.log if you
17365843Sbrian# wish to log the monthly output and have the files rotated by newsyslog(8)
17465843Sbrian#
17565843Sbrianmonthly_output="root"					# user or /file
17665843Sbrianmonthly_show_success="YES"				# scripts returning 0
17765843Sbrianmonthly_show_info="YES"					# scripts returning 1
17865843Sbrianmonthly_show_badconfig="NO"				# scripts returning 2
17965843Sbrian
18061981Sbrian# 200.accounting
18161981Sbrianmonthly_accounting_enable="YES"				# Login accounting
18261981Sbrian
18361981Sbrian# 999.local
18461981Sbrianmonthly_local="/etc/monthly.local"			# Local scripts
18561981Sbrian
18661981Sbrian
18761981Sbrian# Define source_periodic_confs, the mechanism used by /etc/periodic/*/*
18861981Sbrian# scripts to source defaults/periodic.conf overrides safely.
18961981Sbrian
19061981Sbrianif [ -z "${source_periodic_confs_defined}" ]; then
19161981Sbrian        source_periodic_confs_defined=yes
19261981Sbrian        source_periodic_confs () {
19361981Sbrian                local i sourced_files
19461981Sbrian
19561981Sbrian                for i in ${periodic_conf_files}; do
19661981Sbrian                        case ${sourced_files} in
19761981Sbrian                        *:$i:*)
19861981Sbrian                                ;;
19961981Sbrian                        *)
20061981Sbrian                                sourced_files="${sourced_files}:$i:"
20161981Sbrian                                [ -r $i ] && . $i
20261981Sbrian                                ;;
20361981Sbrian                        esac
20461981Sbrian                done
20561981Sbrian        }
20661981Sbrianfi
207