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 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 monthly 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 executed 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 executed 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 , 124they 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 wish 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 Va daily_accounting_save 302.Pq Vt num 303When 304.Va 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 Va daily_accounting_flags 310.Pq Vt str 311Set to the arguments to pass to the 312.Xr sa 8 313utility (in addition to 314.Fl s ) 315when 316.Va 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 Va 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 Va daily_status_disks_enable 338.Pq Vt bool 339Set to 340.Dq YES 341if you want to run 342.Xr df 1 343(with the arguments supplied in 344.Va daily_status_disks_df_flags ) 345and 346.Ic dump -W . 347.It Va daily_status_disks_df_flags 348.Pq Vt str 349Set to the arguments for the 350.Xr df 1 351utility when 352.Va daily_status_disks_enable 353is set to 354.Dq YES . 355.It Va daily_status_network_enable 356.Pq Vt bool 357Set to 358.Dq YES 359if you want to run 360.Ic netstat -i . 361.It Va daily_status_network_usedns 362.Pq Vt bool 363Set to 364.Dq YES 365if you want to run 366.Xr netstat 1 367without the 368.Fl n 369option (to do DNS lookups). 370.It Va daily_status_rwho_enable 371.Pq Vt bool 372Set to 373.Dq YES 374if you want to run 375.Xr uptime 1 376(or 377.Xr ruptime 1 378if 379.Va rwhod_enable 380is set to 381.Dq YES 382in 383.Pa /etc/rc.conf ) . 384.It Va daily_status_mailq_enable 385.Pq Vt bool 386Set to 387.Dq YES 388if you want to run 389.Xr mailq 1 . 390.It Va daily_status_mailq_shorten 391.Pq Vt bool 392Set to 393.Dq YES 394if you want to shorten the 395.Nm mailq 396output when 397.Va daily_status_mailq_enable 398is set to 399.Dq YES . 400.It Va daily_status_security_enable 401.Pq Vt bool 402Set to 403.Dq YES 404if you want to run the security check. 405The security check is another set of 406.Xr periodic 8 407scripts. 408The system defaults are in 409.Pa /etc/periodic/security . 410Local scripts should be placed in 411.Pa /usr/local/etc/periodic/security . 412See the 413.Xr periodic 8 414manual page for more information. 415.It Va daily_status_security_inline 416.Pq Vt bool 417Set to 418.Dq YES 419if you want the security check output inline. 420The default is to either mail or log the output according to the value of 421.Va daily_status_security_output . 422.It Va daily_status_security_output 423.Pq Vt str 424Where to send the output of the security check if 425.Va daily_status_security_inline 426is set to 427.Dq NO . 428This variable behaves in the same way as the 429.Va *_output 430variables above, namely it can be set either to one or more email addresses 431or to an absolute file name. 432.It Va daily_status_security_chksetuid_enable 433.Pq Vt bool 434Set to 435.Dq YES 436to compare the modes and modification times of setuid executables with 437the previous day's values. 438.It Va daily_status_security_chkmounts_enable 439.Pq Vt bool 440Set to 441.Dq YES 442to check for changes mounted filesystems to the previous day's values. 443.It Va daily_status_security_noamd 444.Pq Vt bool 445Set to 446.Dq YES 447if you want to ignore 448.Xr amd 8 449mounts when comparing against yesterdays filesystem mounts in the 450.Va daily_status_security_chkmounts_enable 451check. 452.It Va daily_status_security_chkuid0_enable 453.Pq Vt bool 454Set to 455.Dq YES 456to check 457.Pa /etc/master.passwd 458for accounts with uid 0. 459.It Va daily_status_security_passwdless_enable 460.Pq Vt bool 461Set to 462.Dq YES 463to check 464.Pa /etc/master.passwd 465for accounts with empty passwords. 466.It Va daily_status_security_ipfwdenied_enable 467.Pq Vt bool 468Set to 469.Dq YES 470to show log entries for packets denied by 471.Xr ipfw 8 472since yesterday's check. 473.It Va daily_status_security_ipfwlimit_enable 474.Pq Vt bool 475Set to 476.Dq YES 477to display 478.Xr ipfw 8 479rules that have reached their verbosity limit. 480.It Va daily_status_security_ip6fwdenied_enable 481.Pq Vt bool 482Set to 483.Dq YES 484to show log entries for packets denied by 485.Xr ip6fw 8 486since yesterday's check. 487.It Va daily_status_security_ip6fwlimit_enable 488.Pq Vt bool 489Set to 490.Dq YES 491to display 492.Xr ip6fw 8 493rules that have reached their verbosity limit. 494.It Va daily_status_security_kernelmsg_enable 495.Pq Vt bool 496Set to 497.Dq YES 498to show new 499.Xr dmesg 8 500entries since yesterday's check. 501.It Va daily_status_security_loginfail_enable 502.Pq Vt bool 503Set to 504.Dq YES 505to display failed logins from 506.Pa /var/log/messages 507in the previous day. 508.It Va daily_status_security_tcpwrap_enable 509.Pq Vt bool 510Set to 511.Dq YES 512to display connections denied by tcpwrappers (see 513.Xr hosts_access 5 ) 514from 515.Pa /var/log/messages 516during the previous day. 517.It Va daily_status_mail_rejects_enable 518.Pq Vt bool 519Set to 520.Dq YES 521if you want to summarise mail rejections logged to 522.Pa /var/log/maillog 523for the previous day. 524.It Va daily_status_mail_rejects_logs 525.Pq Vt num 526Set to the number of maillog files that should be checked 527for yesterday's mail rejects. 528.It Va daily_status_named_enable 529.Pq Vt bool 530Set to 531.Dq YES 532if you want to summarise denied zone transfers (AXFR and IXFR) 533for the previous day. 534.It Va daily_status_named_usedns 535.Pq Vt bool 536Set to 537.Dq YES 538if you want to enable reverse DNS lookups. 539.It Va daily_queuerun_enable 540.Pq Vt bool 541Set to 542.Dq YES 543if you want to manually run the mail queue at least once a day. 544.It Va daily_local 545.Pq Vt str 546Set to a list of extra scripts that should be run after all other 547daily scripts. 548All scripts must be absolute path names. 549.El 550.Pp 551The following variables are used by the standard scripts that reside in 552.Pa /etc/periodic/weekly : 553.Bl -tag -offset 4n -width 2n 554.It Va weekly_clean_kvmdb_enable 555.Pq Vt bool 556Set to 557.Dq YES 558if you want to purge old 559.Pa /var/db/kvm_*.db 560files. 561The kvm file for the current kernel will not be purged. 562.It Va weekly_clean_kvmdb_days 563.Pq Vt num 564Set to the number of days that the file must not have been accessed 565before being deleted. 566.It Va weekly_clean_kvmdb_verbose 567.Pq Vt bool 568Set to 569.Dq YES 570if you want the removed files to be reported in your weekly output. 571.It Va weekly_locate_enable 572.Pq Vt bool 573Set to 574.Dq YES 575if you want to run 576.Pa /usr/libexec/locate.updatedb . 577This script is run using 578.Ic nice -5 579as user 580.An nobody , 581and generates the table used by the 582.Xr locate 1 583command. 584.It Va weekly_whatis_enable 585.Pq Vt bool 586Set to 587.Dq YES 588if you want to run 589.Pa /usr/libexec/makewhatis.local . 590This script regenerates the database used by the 591.Xr apropos 1 592command. 593.It Va weekly_catman_enable 594.Pq Vt bool 595Set to 596.Dq YES 597if you want to run 598.Pa /usr/libexec/catman.local . 599This script processes all out of date man pages, speeding up the 600.Xr man 1 601command at the expense of disk space. 602.It Va weekly_noid_enable 603.Pq Vt bool 604Set to 605.Dq YES 606if you want to locate orphaned files on the system. 607An orphaned file is one with an invalid owner or group. 608.It Va weekly_noid_dirs 609.Pq Vt str 610A list of directories under which orphaned files are searched for. 611This would usually be set to 612.Pa / . 613.It Va weekly_status_pkg_enable 614.Pq Vt bool 615Set to 616.Dq YES 617if you want to use 618.Xr pkg_version 1 619to list installed packages which are out of date. 620.It Va weekly_local 621.Pq Vt str 622Set to a list of extra scripts that should be run after all other 623weekly scripts. 624All scripts must be absolute path names. 625.El 626.Pp 627The following variables are used by the standard scripts that reside in 628.Pa /etc/periodic/monthly : 629.Bl -tag -offset 4n -width 2n 630.It Va monthly_accounting_enable 631.Pq Vt bool 632Set to 633.Dq YES 634if you want to do login accounting using the 635.Xr ac 8 636command. 637.It Va monthly_local 638.Pq Vt str 639Set to a list of extra scripts that should be run after all other 640monthly scripts. 641All scripts must be absolute path names. 642.El 643.Sh FILES 644.Bl -tag -width /etc/defaults/periodic.conf 645.It Pa /etc/defaults/periodic.conf 646The default configuration file. 647This file contains all default variables and values. 648.It Pa /etc/periodic.conf 649The usual system specific variable override file. 650.It Pa /etc/periodic.conf.local 651An additional override file, useful when 652.Pa /etc/periodic.conf 653is shared or distributed. 654.El 655.Sh SEE ALSO 656.Xr apropos 1 , 657.Xr calendar 1 , 658.Xr df 1 , 659.Xr gzip 1 , 660.Xr locate 1 , 661.Xr man 1 , 662.Xr msgs 1 , 663.Xr netstat 1 , 664.Xr nice 1 , 665.Xr pkg_version 1 , 666.Xr rdist 1 , 667.Xr rc.conf 5 , 668.Xr ac 8 , 669.Xr chkgrp 8 , 670.Xr dump 8 , 671.Xr newsyslog 8 , 672.Xr periodic 8 673.Sh HISTORY 674The 675.Nm 676file appeared in 677.Fx 4.1 . 678.Sh AUTHORS 679.An Brian Somers Aq brian@Awfulhak.org . 680