1.\"- 2.\" Copyright (c) 2000 Brian Somers <brian@Awfulhak.org> 3.\" All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright 9.\" notice, this list of conditions and the following disclaimer. 10.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" notice, this list of conditions and the following disclaimer in the 12.\" documentation and/or other materials provided with the distribution. 13.\" 14.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24.\" SUCH DAMAGE. 25.\" 26.\" $FreeBSD$ 27.\" 28.Dd June 22, 2000 29.Dt PERIODIC.CONF 5 30.Os FreeBSD 31.Sh NAME 32.Nm periodic.conf 33.Nd periodic job configuration information 34.Sh DESCRIPTION 35The file 36.Nm 37contains a description of how daily, weekly and montly system maintenance 38jobs should run. 39It resides in the 40.Pa /etc/defaults 41directory and parts may be overridden by a file of the same name in 42.Pa /etc , 43which itself may be overridden by the 44.Pa /etc/periodic.conf.local 45file. 46.Pp 47.Nm 48is actually sourced as a shell script from each of the periodic scripts 49and is intended to simply provide default configuration variables. 50.Pp 51The following variables are used by 52.Xr periodic 8 53itself: 54.Bl -tag -offset 4n -width 2n 55.It Va local_periodic 56.Pq Vt str 57List of directories to search for periodic scripts. 58This list is always prefixed with 59.Pa /etc/periodic , 60and is only used when an argument to 61.Xr periodic 8 62is not an absolute directory name. 63.It Va dir Ns No _output 64.Pq Vt path No or Vt list 65What to do with the output of the scripts envoked from 66the directory 67.Ar dir . 68If this variable is set to an absolute path name, output is logged to 69that file, otherwise it is taken as one or more space separated email 70addresses and mailed to those users. 71If this variable is not set or is empty, output is sent to standard output. 72.Pp 73For an unattended machine, suitable values for 74.Va daily_output , 75.Va weekly_output , 76and 77.Va monthly_output 78might be 79.Dq /var/log/daily.log , 80.Dq /var/log/weekly.log , 81and 82.Dq /var/log/monthly.log 83respectively, as 84.Xr newsyslog 8 85will rotate these files (if they exists) at the appropriate times. 86.It Va dir Ns No _show_success 87.It Va dir Ns No _show_info 88.It Va dir Ns No _show_badconfig 89.Pq Vt bool 90These variables control whether 91.Xr periodic 8 92will mask the output of the envoked scripts based on their return code 93(where 94.Ar dir 95is the base directory name in which each script resides). 96If the return code of a script is 97.Sq 0 98and 99.Va dir Ns No _show_success 100is set to 101.Dq NO , 102.Xr periodic 8 103will mask the script's output. 104If the return code of a script is 105.Sq 1 106and 107.Va dir Ns No _show_info 108is set to 109.Dq NO , 110.Xr periodic 8 111will mask the script's output. 112If the return code of a script is 113.Sq 2 114and 115.Va dir Ns No _show_badconfig 116is set to 117.Dq NO , 118.Xr periodic 8 119will mask the script's output. 120If these variables are set to neither 121.Dq YES 122nor 123.Dq NO , 124the default to 125.Dq YES , 126.Dq YES 127and 128.Dq NO 129respectively. 130.Pp 131Refer to the 132.Xr periodic 8 133man page for how script return codes are interpreted. 134.El 135.Pp 136The following variables are used by the standard scripts that reside in 137.Pa /etc/periodic/daily : 138.Bl -tag -offset 4n -width 2n 139.It Va daily_clean_disks_enable 140.Pq Vt bool 141Set to 142.Dq YES 143if you want to remove all files matching 144.Va daily_clean_disks_files 145daily. 146.It Va daily_clean_disks_files 147.Pq Vt str 148Set to a list of file names to match. 149Wild cards are permitted. 150.It Va daily_clean_disks_days 151.Pq Vt num 152When 153.Va daily_clean_disks_enable 154is set to 155.Dq YES , 156this must also be set to the number of days old that a file's access 157and modification times must be before it's deleted. 158.It Va daily_clean_disks_verbose 159.Pq Vt bool 160Set to 161.Dq YES 162if you want the removed files to be reported in your daily output. 163.It Va daily_clean_tmps_enable 164.Pq Vt bool 165Set to 166.Dq YES 167if you want to clear temporary directories daily. 168.It Va daily_clean_tmps_dirs 169.Pq Vt str 170Set to the list of directories to clear if 171.Va daily_clean_tmps_enable 172is set to 173.Dq YES . 174.It Va daily_clean_tmps_days 175.Pq Vt num 176When 177.Va daily_clean_tmps_enable 178is set, this must also be set to the number of days old that a file's access 179and modification times must be before it's deleted. 180.It Va daily_clean_tmps_ignore 181.Pq Vt str 182Set to the list of files that should not be deleted when 183.Va daily_clean_tmps_enable 184is set to 185.Dq YES . 186Wild card characters are permitted. 187.It Va daily_clean_tmps_verbose 188.Pq Vt bool 189Set to 190.Dq YES 191if you want the removed files to be reported in your daily output. 192.It Va daily_clean_preserve_enable 193.Pq Vt bool 194Set to 195.Dq YES 196if you wish to remove old files from 197.Pa /var/preserve . 198.It Va daily_clean_preserve_days 199.Pq Vt num 200Set to the number of days that files must not have been modified before 201they are deleted. 202.It Va daily_clean_preserve_verbose 203.Pq Vt bool 204Set to 205.Dq YES 206if you want the removed files to be reported in your daily output. 207.It Va daily_clean_msgs_enable 208.Pq Vt bool 209Set to 210.Dq YES 211if you old system messages to be purged. 212.It Va daily_clean_msgs_days 213.Pq Vt num 214Set to the number of days that files must not have been modified before 215they are deleted. 216If this variable is left blank, the 217.Xr msgs 1 218default is used. 219.It Va daily_clean_rwho_enable 220.Pq Vt bool 221Set to 222.Dq YES 223if you wish old files in 224.Pa /var/who 225to be purged. 226.It Va daily_clean_rwho_days 227.Pq Vt num 228Set to the number of days that files must not have been modified before 229they are deleted. 230.It Va daily_clean_rwho_verbose 231.Pq Vt bool 232Set to 233.Dq YES 234if you want the removed files to be reported in your daily output. 235.It Va daily_clean_hoststat_enable 236.Pq Vt bool 237Set to 238.Dq YES 239if you wish old files in 240.Pa /var/spool/.hoststat 241to be purged. 242.It Va daily_clean_hoststat_days 243.Pq Vt num 244Set to the number of days that files must not have been modified before 245they are deleted. 246.It Va daily_clean_hoststat_verbose 247.Pq Vt bool 248Set to 249.Dq YES 250if you want the removed files to be reported in your daily output. 251.It Va daily_backup_passwd_enable 252.Pq Vt bool 253Set to 254.Dq YES 255if you want the 256.Pa /etc/master.passwd 257and 258.Pa /etc/group 259files backed up and reported on. 260Reporting consists of checking both files for modifications and running 261.Xr chkgrp 8 262on the 263.Pa group 264file. 265.It Va daily_backup_aliases_enable 266.Pq Vt bool 267Set to 268.Dq YES 269if you want the 270.Pa /etc/mail/aliases 271file backed up and modifications to be displayed in your daily output. 272.It Va daily_backup_distfile_enable 273.Pq Vt bool 274Set to 275.Dq YES 276if you want the 277.Pa /etc/Distfile 278file backed up and modifications to be displayed in your daily output. 279.It Va daily_calendar_enable 280.Pq Vt bool 281Set to 282.Dq YES 283if you want to run 284.Ic calendar -a 285daily. 286.It Va daily_accounting_enable 287.Pq Vt bool 288Set to 289.Dq YES 290if you want to rotate your daily accounting files. 291No rotations are necessary unless 292.Va accounting_enable 293is enabled in 294.Xr rc.conf 5 . 295.It Va daily_accounting_compress 296.Pq Vt bool 297Set to 298.Dq YES 299if you want your daily accounting files to be compressed using 300.Xr gzip 1 . 301.It Ar daily_accounting_save 302.Pq num 303When 304.Ar daily_accounting_enable 305is set, this may also be set to the number of daily accounting files that are 306to be saved. 307The default is 308.Dq 3 . 309.It Ar daily_accounting_flags 310.Pq Vt str 311Set to the arguments to pass to the 312.Xr sa 1 313utility (in addition to 314.Fl s ) 315when 316.Ar daily_accounting_enable 317is set to 318.Dq YES . 319The default is 320.Fl q . 321.It Va daily_distfile_enable 322.Pq Vt bool 323Set to 324.Dq YES 325if you want to run 326.Xr rdist 1 327daily. 328The 329.Pa /etc/Distfile 330file must also exist. 331.It Pa daily_news_expire_enable 332.Pq Vt bool 333Set to 334.Dq YES 335if you want to run 336.Pa /etc/news.expire . 337.It Pa daily_uuclean_enable 338.Pq Vt bool 339Set to 340.Dq YES 341if you want to run 342.Pa /etc/uuclean.daily . 343.It Va daily_status_disks_enable 344.Pq Vt bool 345Set to 346.Dq YES 347if you want to run 348.Xr df 1 349.Po 350with the arguments supplied in 351.Va daily_status_disks_df_flags 352.Pc 353and 354.Ic dump -W . 355.It Va daily_status_disks_df_flags 356.Pq Vt str 357Set to the arguments for the 358.Xr df 1 359utility when 360.Va daily_status_disks_enable 361is set to 362.Dq YES . 363.It Va daily_status_uucp_enable 364.Pq Vt bool 365Set to 366.Dq YES 367if you want to run 368.Ic uustat -a . 369.It Va daily_status_network_enable 370.Pq Vt bool 371Set to 372.Dq YES 373if you want to run 374.Ic netstat -i . 375.It Va daily_status_network_usedns 376.Pq Vt bool 377Set to 378.Dq YES 379if you want to run 380.Xr netstat 1 381without the 382.Fl n 383option (to do DNS lookups). 384.It Va daily_status_rwho_enable 385.Pq Vt bool 386Set to 387.Dq YES 388if you want to run 389.Xr uptime 1 390(or 391.Xr ruptime 1 392if 393.Va rwhod_enable 394is set to 395.Dq YES 396in 397.Pa /etc/rc.conf ) . 398.It Va daily_status_mailq_enable 399.Pq Vt bool 400Set to 401.Dq YES 402if you want to run 403.Xr mailq 1 . 404.It Va daily_status_mailq_shorten 405.Pq Vt bool 406Set to 407.Dq YES 408if you want to shorten the 409.Nm mailq 410output when 411.Va daily_status_mailq_enable 412is set to 413.Dq YES . 414.It Va daily_status_security_enable 415.Pq Vt bool 416Set to 417.Dq YES 418if you want to run 419.Pa /etc/security . 420.It Va daily_status_security_inline 421.Pq Vt bool 422Set to 423.Dq YES 424if you want to run 425.Pa /etc/security 426inline. 427The default is to either mail or log the output according to the value of 428.Va daily_status_security_output . 429.It Va daily_status_security_output 430.Pq Vt str 431Where to send the output of 432.Pa /etc/security 433if 434.Va daily_status_security_inline 435is set to 436.Dq NO . 437This variable behaves in the same way as the 438.Va *_output 439variables above, namely it can be set either to one or more email addresses 440or to an absolute file name. 441.It Va daily_status_security_noamd 442.Pq Vt bool 443Set to 444.Dq YES 445if you want to ignore 446.Xr amd 8 447mounts when comparing against yesterdays filesystem mounts. 448.It Va daily_status_mail_rejects_enable 449.Pq Vt bool 450Set to 451.Dq YES 452if you want to summarise mail rejections logged to 453.Pa /var/log/maillog 454for the previous day. 455.It Va daily_status_mail_rejects_logs 456.Pq Vt num 457Set to the number of maillog files that should be checked 458for yesterday's mail rejects. 459.It Va daily_status_named_enable 460.Pq Vt bool 461Set to 462.Dq YES 463if you want to summarise denied zone transfers (AXFR and IXFR) 464for the previious day. 465.It Va daily_status_named_logs 466.Pq Vt num 467Set to the number of log files that should be checked for 468yesterday's rejected zone transfers. 469.It Va daily_status_named_usedns 470.Pq Vt bool 471Set to 472.Dq YES 473if you want to enable reverse DNS lookups. 474.It Va daily_queuerun_enable 475.Pq Vt bool 476Set to 477.Dq YES 478if you want to manually run the mail queue at least once a day. 479.It Va daily_local 480.Pq Vt str 481Set to a list of extra scripts that should be run after all other 482daily scripts. 483All scripts must be absolute path names. 484.El 485.Pp 486The following variables are used by the standard scripts that reside in 487.Pa /etc/periodic/weekly : 488.Bl -tag -offset 4n -width 2n 489.It Va weekly_clean_kvmdb_enable 490.Pq Vt bool 491Set to 492.Dq YES 493if you want to purge old 494.Pa /var/db/kvm_*.db 495files. 496The kvm file for the current kernel will not be purged. 497.It Va weekly_clean_kvmdb_days 498.Pq Vt num 499Set to the number of days that the file must not have been accessed 500before being deleted. 501.It Va weekly_clean_kvmdb_verbose 502.Pq Vt bool 503Set to 504.Dq YES 505if you want the removed files to be reported in your weekly output. 506.It Va weekly_uucp_enable 507.Pq Vt bool 508Set to 509.Dq YES 510if you want to run 511.Pa /usr/libexec/uucp/clean.weekly . 512.It Va weekly_locate_enable 513.Pq Vt bool 514Set to 515.Dq YES 516if you want to run 517.Pa /usr/libexec/locate.updatedb . 518This script is run using 519.Ic nice -5 520as user 521.An nobody , 522and generates the table used by the 523.Xr locate 1 524command. 525.It Va weekly_whatis_enable 526.Pq Vt bool 527Set to 528.Dq YES 529if you want to run 530.Pa /usr/libexec/makewhatis.local . 531This script regenerates the database used by the 532.Xr apropos 1 533command. 534.It Va weekly_catman_enable 535.Pq Vt bool 536Set to 537.Dq YES 538if you want to run 539.Pa /usr/libexec/catman.local . 540This script processes all out of date man pages, speeding up the 541.Xr man 1 542command at the expense of disk space. 543.It Va weekly_noid_enable 544.Pq Vt bool 545Set to 546.Dq YES 547if you want to locate orphaned files on the system. 548An orphaned file is one with an invalid owner or group. 549.It Va weekly_noid_dirs 550.Pq Vt str 551A list of directories under which orphaned files are searched for. 552This would usually be set to 553.Pa / . 554.It Va weekly_status_pkg_enable 555.Pq Vt bool 556Set to 557.Dq YES 558if you want to use 559.Xr pkg_version 1 560to list installed packages which are out of date. 561.It Va weekly_local 562.Pq Vt str 563Set to a list of extra scripts that should be run after all other 564weekly scripts. 565All scripts must be absolute path names. 566.El 567.Pp 568The following variables are used by the standard scripts that reside in 569.Pa /etc/periodic/monthly : 570.Bl -tag -offset 4n -width 2n 571.It Va monthly_accounting_enable 572.Pq Vt bool 573Set to 574.Dq YES 575if you want to do login accounting using the 576.Xr ac 8 577command. 578.It Va monthly_local 579.Pq Vt str 580Set to a list of extra scripts that should be run after all other 581monthly scripts. 582All scripts must be absolute path names. 583.El 584.Sh FILES 585.Bl -tag -width /etc/defaults/periodic.conf 586.It Pa /etc/defaults/periodic.conf 587The default configuration file. 588This file contains all default variables and values. 589.It Pa /etc/periodic.conf 590The usual system specific variable override file. 591.It Pa /etc/periodic.conf.local 592An additional override file, useful when 593.Pa /etc/periodic.conf 594is shared or distributed. 595.El 596.Sh SEE ALSO 597.Xr apropos 1 , 598.Xr calendar 1 , 599.Xr df 1 , 600.Xr gzip 1 , 601.Xr locate 1 , 602.Xr man 1 , 603.Xr msgs 1 , 604.Xr netstat 1 , 605.Xr nice 1 , 606.Xr pkg_version 1 , 607.Xr rdist 1 , 608.Xr rc.conf 5 , 609.Xr ac 8 , 610.Xr chkgrp 8 , 611.Xr dump 8 , 612.Xr newsyslog 8 , 613.Xr periodic 8 614.Sh HISTORY 615The 616.Nm 617file appeared in 618.Fx 4.1 . 619.Sh AUTHORS 620.An Brian Somers Aq brian@Awfulhak.org . 621