periodic.conf revision 238416
15992SN/A#!/bin/sh
25992SN/A#
35992SN/A# This is defaults/periodic.conf - a file full of useful variables that
45992SN/A# you can set to change the default behaviour of periodic jobs on your
55992SN/A# system.  You should not edit this file!  Put any overrides into one of the
65992SN/A# $periodic_conf_files instead and you will be able to update these defaults
75992SN/A# later without spamming your local configuration information.
85992SN/A#
95992SN/A# The $periodic_conf_files files should only contain values which override
105992SN/A# values set in this file.  This eases the upgrade path when defaults
115992SN/A# are changed and new features are added.
125992SN/A#
135992SN/A# For a more detailed explanation of all the periodic.conf variables, please
145992SN/A# refer to the periodic.conf(5) manual page.
155992SN/A#
165992SN/A# $FreeBSD: head/etc/defaults/periodic.conf 238416 2012-07-13 06:46:09Z kevlo $
175992SN/A#
185992SN/A
195992SN/A# What files override these defaults ?
205992SN/Aperiodic_conf_files="/etc/periodic.conf /etc/periodic.conf.local"
215992SN/A
225992SN/A# periodic script dirs
235992SN/Alocal_periodic="/usr/local/etc/periodic"
245992SN/A
255992SN/A
265992SN/A# Daily options
275992SN/A
285992SN/A# These options are used by periodic(8) itself to determine what to do
295992SN/A# with the output of the sub-programs that are run, and where to send
305992SN/A# that output.  $daily_output might be set to /var/log/daily.log if you
315992SN/A# wish to log the daily output and have the files rotated by newsyslog(8)
325992SN/A#
335992SN/Adaily_output="root"					# user or /file
345992SN/Adaily_show_success="YES"				# scripts returning 0
355992SN/Adaily_show_info="YES"					# scripts returning 1
365992SN/Adaily_show_badconfig="NO"				# scripts returning 2
375992SN/A
385992SN/A# 100.clean-disks
395992SN/Adaily_clean_disks_enable="NO"				# Delete files daily
405992SN/Adaily_clean_disks_files="[#,]* .#* a.out *.core *.CKP .emacs_[0-9]*"
415992SN/Adaily_clean_disks_days=3				# If older than this
425992SN/Adaily_clean_disks_verbose="YES"				# Mention files deleted
435992SN/A
445992SN/A# 110.clean-tmps
455992SN/Adaily_clean_tmps_enable="NO"				# Delete stuff daily
465992SN/Adaily_clean_tmps_dirs="/tmp"				# Delete under here
475992SN/Adaily_clean_tmps_days="3"				# If not accessed for
485992SN/Adaily_clean_tmps_ignore=".X*-lock .X11-unix .ICE-unix .font-unix .XIM-unix"
495992SN/Adaily_clean_tmps_ignore="$daily_clean_tmps_ignore quota.user quota.group .snap"
505992SN/Adaily_clean_tmps_ignore="$daily_clean_tmps_ignore .sujournal"
515992SN/A							# Don't delete these
525992SN/Adaily_clean_tmps_verbose="YES"				# Mention files deleted
535992SN/A
545992SN/A# 120.clean-preserve
555992SN/Adaily_clean_preserve_enable="YES"			# Delete files daily
565992SN/Adaily_clean_preserve_days=7				# If not modified for
575992SN/Adaily_clean_preserve_verbose="YES"			# Mention files deleted
585992SN/A
595992SN/A# 130.clean-msgs
605992SN/Adaily_clean_msgs_enable="YES"				# Delete msgs daily
615992SN/Adaily_clean_msgs_days=					# If not modified for
625992SN/A
635992SN/A# 140.clean-rwho
645992SN/Adaily_clean_rwho_enable="YES"				# Delete rwho daily
655992SN/Adaily_clean_rwho_days=7					# If not modified for
665992SN/Adaily_clean_rwho_verbose="YES"				# Mention files deleted
675992SN/A
685992SN/A# 150.clean-hoststat
695992SN/Adaily_clean_hoststat_enable="YES"			# Purge sendmail host
705992SN/A							# status cache daily
715992SN/A
725992SN/A# 200.backup-passwd
7314193Ssmarksdaily_backup_passwd_enable="YES"			# Backup passwd & group
745992SN/A
755992SN/A# 210.backup-aliases
765992SN/Adaily_backup_aliases_enable="YES"			# Backup mail aliases
775992SN/A
785992SN/A# 220.backup-pkgdb
797084SN/Adaily_backup_pkgdb_enable="YES"				# Backup /var/db/pkg
805992SN/Adaily_backup_pkgdb_dir="/var/backups"
815992SN/A
825992SN/A# 300.calendar
835992SN/Adaily_calendar_enable="NO"				# Run calendar -a
845992SN/A
855992SN/A# 310.accounting
865992SN/Adaily_accounting_enable="YES"				# Rotate acct files
875992SN/Adaily_accounting_compress="NO"				# Gzip rotated files
885992SN/Adaily_accounting_flags=-q				# Flags to /usr/sbin/sa
895992SN/Adaily_accounting_save=3					# How many files to save
907084SN/A
9113918Sksrini# 330.news
925992SN/Adaily_news_expire_enable="YES"				# Run news.expire
935992SN/A
945992SN/A# 400.status-disks
955992SN/Adaily_status_disks_enable="YES"				# Check disk status
965992SN/Adaily_status_disks_df_flags="-l -h"		# df(1) flags for check
975992SN/A
985992SN/A# 404.status-zfs
997084SN/Adaily_status_zfs_enable="NO"				# Check ZFS
1005992SN/Adaily_status_zfs_zpool_list_enable="YES"		# List ZFS pools
1015992SN/A
1025992SN/A# 405.status-ata_raid
1035992SN/Adaily_status_ata_raid_enable="NO"			# Check ATA raid status
1045992SN/A
1055992SN/A# 406.status-gmirror
1065992SN/Adaily_status_gmirror_enable="NO"			# Check gmirror(8)
1075992SN/A
1085992SN/A# 407.status-graid3
1095992SN/Adaily_status_graid3_enable="NO" 			# Check graid3(8)
1107084SN/A
1115992SN/A# 408.status-gstripe
1125992SN/Adaily_status_gstripe_enable="NO"			# Check gstripe(8)
1137084SN/A
1145992SN/A# 409.status-gconcat
1155992SN/Adaily_status_gconcat_enable="NO"			# Check gconcat(8)
1165992SN/A
1175992SN/A# 420.status-network
1185992SN/Adaily_status_network_enable="YES"			# Check network status
1195992SN/Adaily_status_network_usedns="YES"			# DNS lookups are ok
1205992SN/A
1215992SN/A# 430.status-rwho
1225992SN/Adaily_status_rwho_enable="YES"				# Check system status
1235992SN/A
1245992SN/A# 440.status-mailq
1255992SN/Adaily_status_mailq_enable="YES"				# Check mail status
1265992SN/Adaily_status_mailq_shorten="NO"				# Shorten output
1275992SN/Adaily_status_include_submit_mailq="YES"			# Also submit queue
1285992SN/A
1295992SN/A# 450.status-security
1305992SN/Adaily_status_security_enable="YES"			# Security check
1315992SN/A# See "Security options" below for more options
1325992SN/A
1335992SN/A# 460.status-mail-rejects
1345992SN/Adaily_status_mail_rejects_enable="YES"			# Check mail rejects
1355992SN/Adaily_status_mail_rejects_logs=3			# How many logs to check
1365992SN/Adaily_status_mail_rejects_shorten="NO"			# Shorten output
1375992SN/A
1385992SN/A# 470.status-named
1395992SN/Adaily_status_named_enable="YES"
1405992SN/Adaily_status_named_usedns="YES"				# DNS lookups are ok
1415992SN/A
1425992SN/A# 480.status-ntpd
1435992SN/Adaily_status_ntpd_enable="NO"				# Check NTP status
1445992SN/A
1455992SN/A# 490.status-pkg-changes
1465992SN/Adaily_status_pkg_changes_enable="NO"			# Show package changes
1475992SN/A
1485992SN/A# 500.queuerun
1495992SN/Adaily_queuerun_enable="YES"				# Run mail queue
1505992SN/Adaily_submit_queuerun="YES"				# Also submit queue
1515992SN/A
1525992SN/A# 800.scrub-zfs
1535992SN/Adaily_scrub_zfs_enable="NO"
1545992SN/Adaily_scrub_zfs_pools=""			# empty string selects all pools
1555992SN/Adaily_scrub_zfs_default_threshold="35"		# days between scrubs
1565992SN/A#daily_scrub_zfs_${poolname}_threshold="35"	# pool specific threshold
1575992SN/A
1585992SN/A# 999.local
1595992SN/Adaily_local="/etc/daily.local"				# Local scripts
1605992SN/A
1615992SN/A
1625992SN/A# Security options
1635992SN/A
1645992SN/A# These options are used by the security periodic(8) scripts spawned in
1655992SN/A# 450.status-security above.
1665992SN/Adaily_status_security_inline="NO"			# Run inline ?
1675992SN/Adaily_status_security_output="root"			# user or /file
1685992SN/Adaily_status_security_noamd="NO"			# Don't check amd mounts
1695992SN/Adaily_status_security_logdir="/var/log"			# Directory for logs
1705992SN/Adaily_status_security_diff_flags="-b -u"		# flags for diff output
1715992SN/A
1725992SN/A# 100.chksetuid
1735992SN/Adaily_status_security_chksetuid_enable="YES"
1745992SN/A
1755992SN/A# 110.neggrpperm
1765992SN/Adaily_status_security_neggrpperm_enable="YES"
1775992SN/A
1785992SN/A# 200.chkmounts
1795992SN/Adaily_status_security_chkmounts_enable="YES"
18014193Ssmarks#daily_status_security_chkmounts_ignore="^amd:"		# Don't check matching
18114193Ssmarks							# FS types
1825992SN/A
1835992SN/A# 300.chkuid0
1845992SN/Adaily_status_security_chkuid0_enable="YES"
1855992SN/A
1865992SN/A# 400.passwdless
1875992SN/Adaily_status_security_passwdless_enable="YES"
1885992SN/A
1895992SN/A# 410.logincheck
1905992SN/Adaily_status_security_logincheck_enable="YES"
1915992SN/A
1925992SN/A# 460.chkportsum
1935992SN/Adaily_status_security_chkportsum_enable="NO"	# Check ports w/ wrong checksum
1945992SN/A
1955992SN/A# 500.ipfwdenied
1965992SN/Adaily_status_security_ipfwdenied_enable="YES"
1975992SN/A
1985992SN/A# 510.ipfdenied
1995992SN/Adaily_status_security_ipfdenied_enable="YES"
2005992SN/A
2015992SN/A# 520.pfdenied
2025992SN/Adaily_status_security_pfdenied_enable="YES"
2035992SN/A
2045992SN/A# 550.ipfwlimit
2055992SN/Adaily_status_security_ipfwlimit_enable="YES"
2065992SN/A
2075992SN/A# 610.ipf6denied
2085992SN/Adaily_status_security_ipf6denied_enable="YES"
2095992SN/A
2105992SN/A# 700.kernelmsg
2115992SN/Adaily_status_security_kernelmsg_enable="YES"
2125992SN/A
2135992SN/A# 800.loginfail
2145992SN/Adaily_status_security_loginfail_enable="YES"
2155992SN/A
2165992SN/A# 900.tcpwrap
2175992SN/Adaily_status_security_tcpwrap_enable="YES"
2185992SN/A
2195992SN/A
2205992SN/A# Weekly options
2215992SN/A
2225992SN/A# These options are used by periodic(8) itself to determine what to do
2235992SN/A# with the output of the sub-programs that are run, and where to send
2245992SN/A# that output.  $weekly_output might be set to /var/log/weekly.log if you
2255992SN/A# wish to log the weekly output and have the files rotated by newsyslog(8)
2265992SN/A#
2275992SN/Aweekly_output="root"					# user or /file
2285992SN/Aweekly_show_success="YES"				# scripts returning 0
2295992SN/Aweekly_show_info="YES"					# scripts returning 1
2305992SN/Aweekly_show_badconfig="NO"				# scripts returning 2
2315992SN/A
2325992SN/A# 310.locate
2335992SN/Aweekly_locate_enable="YES"				# Update locate weekly
2345992SN/A
2355992SN/A# 320.whatis
2365992SN/Aweekly_whatis_enable="YES"				# Update whatis weekly
2375992SN/A
2385992SN/A# 330.catman
2395992SN/Aweekly_catman_enable="NO"				# Preformat man pages
2405992SN/A
2415992SN/A# 340.noid
2425992SN/Aweekly_noid_enable="NO"					# Find unowned files
2435992SN/Aweekly_noid_dirs="/"					# Look here
2445992SN/A
2455992SN/A# 400.status-pkg
2465992SN/Aweekly_status_pkg_enable="NO"				# Find out-of-date pkgs
2475992SN/Apkg_version=pkg_version					# Use this program
2485992SN/Apkg_version_index=/usr/ports/INDEX-9			# Use this index file
2495992SN/A
2505992SN/A# 999.local
2515992SN/Aweekly_local="/etc/weekly.local"			# Local scripts
2525992SN/A
2535992SN/A
2545992SN/A# Monthly options
2555992SN/A
2565992SN/A# These options are used by periodic(8) itself to determine what to do
2575992SN/A# with the output of the sub-programs that are run, and where to send
2585992SN/A# that output.  $monthly_output might be set to /var/log/monthly.log if you
2595992SN/A# wish to log the monthly output and have the files rotated by newsyslog(8)
2605992SN/A#
2615992SN/Amonthly_output="root"					# user or /file
2625992SN/Amonthly_show_success="YES"				# scripts returning 0
2635992SN/Amonthly_show_info="YES"					# scripts returning 1
2645992SN/Amonthly_show_badconfig="NO"				# scripts returning 2
2655992SN/A
2665992SN/A# 200.accounting
2675992SN/Amonthly_accounting_enable="YES"				# Login accounting
2685992SN/A
2695992SN/A# 999.local
2705992SN/Amonthly_local="/etc/monthly.local"			# Local scripts
2715992SN/A
2725992SN/A
2735992SN/A# Define source_periodic_confs, the mechanism used by /etc/periodic/*/*
2745992SN/A# scripts to source defaults/periodic.conf overrides safely.
2755992SN/A
2765992SN/Aif [ -z "${source_periodic_confs_defined}" ]; then
2775992SN/A        source_periodic_confs_defined=yes
2785992SN/A        source_periodic_confs() {
2795992SN/A                local i sourced_files
2805992SN/A
2815992SN/A                for i in ${periodic_conf_files}; do
2825992SN/A                        case ${sourced_files} in
2835992SN/A                        *:$i:*)
2845992SN/A                                ;;
2855992SN/A                        *)
2865992SN/A                                sourced_files="${sourced_files}:$i:"
2875992SN/A                                [ -r $i ] && . $i
2885992SN/A                                ;;
2895992SN/A                        esac
2905992SN/A                done
2915992SN/A        }
2925992SN/Afi
2935992SN/A