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: src/share/man/man5/periodic.conf.5,v 1.8.2.22 2003/02/08 21:42:01 gshapiro Exp $ 27.\" $DragonFly: src/share/man/man5/periodic.conf.5,v 1.2 2003/06/17 04:37:00 dillon Exp $ 28.\" 29.Dd June 22, 2000 30.Dt PERIODIC.CONF 5 31.Os 32.Sh NAME 33.Nm periodic.conf 34.Nd periodic job configuration information 35.Sh DESCRIPTION 36The file 37.Nm 38contains a description of how daily, weekly and montly system maintenance 39jobs should run. 40It resides in the 41.Pa /etc/defaults 42directory and parts may be overridden by a file of the same name in 43.Pa /etc , 44which itself may be overridden by the 45.Pa /etc/periodic.conf.local 46file. 47.Pp 48.Nm 49is actually sourced as a shell script from each of the periodic scripts 50and is intended to simply provide default configuration variables. 51.Pp 52The following variables are used by 53.Xr periodic 8 54itself: 55.Bl -tag -offset 4n -width 2n 56.It Va local_periodic 57.Pq Vt str 58List of directories to search for periodic scripts. 59This list is always prefixed with 60.Pa /etc/periodic , 61and is only used when an argument to 62.Xr periodic 8 63is not an absolute directory name. 64.It Va dir Ns No _output 65.Pq Vt path No or Vt list 66What to do with the output of the scripts envoked from 67the directory 68.Ar dir . 69If this variable is set to an absolute path name, output is logged to 70that file, otherwise it is taken as one or more space separated email 71addresses and mailed to those users. 72If this variable is not set or is empty, output is sent to standard output. 73.Pp 74For an unattended machine, suitable values for 75.Va daily_output , 76.Va weekly_output , 77and 78.Va monthly_output 79might be 80.Dq /var/log/daily.log , 81.Dq /var/log/weekly.log , 82and 83.Dq /var/log/monthly.log 84respectively, as 85.Xr newsyslog 8 86will rotate these files (if they exists) at the appropriate times. 87.It Va dir Ns No _show_success 88.It Va dir Ns No _show_info 89.It Va dir Ns No _show_badconfig 90.Pq Vt bool 91These variables control whether 92.Xr periodic 8 93will mask the output of the envoked scripts based on their return code 94(where 95.Ar dir 96is the base directory name in which each script resides). 97If the return code of a script is 98.Sq 0 99and 100.Va dir Ns No _show_success 101is set to 102.Dq NO , 103.Xr periodic 8 104will mask the script's output. 105If the return code of a script is 106.Sq 1 107and 108.Va dir Ns No _show_info 109is set to 110.Dq NO , 111.Xr periodic 8 112will mask the script's output. 113If the return code of a script is 114.Sq 2 115and 116.Va dir Ns No _show_badconfig 117is set to 118.Dq NO , 119.Xr periodic 8 120will mask the script's output. 121If these variables are set to neither 122.Dq YES 123nor 124.Dq NO , 125they default to 126.Dq YES , 127.Dq YES 128and 129.Dq NO 130respectively. 131.Pp 132Refer to the 133.Xr periodic 8 134man page for how script return codes are interpreted. 135.El 136.Pp 137The following variables are used by the standard scripts that reside in 138.Pa /etc/periodic/daily : 139.Bl -tag -offset 4n -width 2n 140.It Va daily_clean_disks_enable 141.Pq Vt bool 142Set to 143.Dq YES 144if you want to remove all files matching 145.Va daily_clean_disks_files 146daily. 147.It Va daily_clean_disks_files 148.Pq Vt str 149Set to a list of file names to match. 150Wild cards are permitted. 151.It Va daily_clean_disks_days 152.Pq Vt num 153When 154.Va daily_clean_disks_enable 155is set to 156.Dq YES , 157this must also be set to the number of days old that a file's access 158and modification times must be before it's deleted. 159.It Va daily_clean_disks_verbose 160.Pq Vt bool 161Set to 162.Dq YES 163if you want the removed files to be reported in your daily output. 164.It Va daily_clean_tmps_enable 165.Pq Vt bool 166Set to 167.Dq YES 168if you want to clear temporary directories daily. 169.It Va daily_clean_tmps_dirs 170.Pq Vt str 171Set to the list of directories to clear if 172.Va daily_clean_tmps_enable 173is set to 174.Dq YES . 175.It Va daily_clean_tmps_days 176.Pq Vt num 177When 178.Va daily_clean_tmps_enable 179is set, this must also be set to the number of days old that a file's access 180and modification times must be before it's deleted. 181.It Va daily_clean_tmps_ignore 182.Pq Vt str 183Set to the list of files that should not be deleted when 184.Va daily_clean_tmps_enable 185is set to 186.Dq YES . 187Wild card characters are permitted. 188.It Va daily_clean_tmps_verbose 189.Pq Vt bool 190Set to 191.Dq YES 192if you want the removed files to be reported in your daily output. 193.It Va daily_clean_preserve_enable 194.Pq Vt bool 195Set to 196.Dq YES 197if you wish to remove old files from 198.Pa /var/preserve . 199.It Va daily_clean_preserve_days 200.Pq Vt num 201Set to the number of days that files must not have been modified before 202they are deleted. 203.It Va daily_clean_preserve_verbose 204.Pq Vt bool 205Set to 206.Dq YES 207if you want the removed files to be reported in your daily output. 208.It Va daily_clean_msgs_enable 209.Pq Vt bool 210Set to 211.Dq YES 212if you wish old system messages to be purged. 213.It Va daily_clean_msgs_days 214.Pq Vt num 215Set to the number of days that files must not have been modified before 216they are deleted. 217If this variable is left blank, the 218.Xr msgs 1 219default is used. 220.It Va daily_clean_rwho_enable 221.Pq Vt bool 222Set to 223.Dq YES 224if you wish old files in 225.Pa /var/who 226to be purged. 227.It Va daily_clean_rwho_days 228.Pq Vt num 229Set to the number of days that files must not have been modified before 230they are deleted. 231.It Va daily_clean_rwho_verbose 232.Pq Vt bool 233Set to 234.Dq YES 235if you want the removed files to be reported in your daily output. 236.It Va daily_clean_hoststat_enable 237.Pq Vt bool 238Set to 239.Dq YES 240if you wish old files in 241.Pa /var/spool/.hoststat 242to be purged. 243.It Va daily_clean_hoststat_days 244.Pq Vt num 245Set to the number of days that files must not have been modified before 246they are deleted. 247.It Va daily_clean_hoststat_verbose 248.Pq Vt bool 249Set to 250.Dq YES 251if you want the removed files to be reported in your daily output. 252.It Va daily_backup_passwd_enable 253.Pq Vt bool 254Set to 255.Dq YES 256if you want the 257.Pa /etc/master.passwd 258and 259.Pa /etc/group 260files backed up and reported on. 261Reporting consists of checking both files for modifications and running 262.Xr chkgrp 8 263on the 264.Pa group 265file. 266.It Va daily_backup_aliases_enable 267.Pq Vt bool 268Set to 269.Dq YES 270if you want the 271.Pa /etc/mail/aliases 272file backed up and modifications to be displayed in your daily output. 273.It Va daily_backup_distfile_enable 274.Pq Vt bool 275Set to 276.Dq YES 277if you want the 278.Pa /etc/Distfile 279file backed up and modifications to be displayed in your daily output. 280.It Va daily_calendar_enable 281.Pq Vt bool 282Set to 283.Dq YES 284if you want to run 285.Ic calendar -a 286daily. 287.It Va daily_accounting_enable 288.Pq Vt bool 289Set to 290.Dq YES 291if you want to rotate your daily accounting files. 292No rotations are necessary unless 293.Va accounting_enable 294is enabled in 295.Xr rc.conf 5 . 296.It Va daily_accounting_compress 297.Pq Vt bool 298Set to 299.Dq YES 300if you want your daily accounting files to be compressed using 301.Xr gzip 1 . 302.It Va daily_accounting_save 303.Pq Vt num 304When 305.Va daily_accounting_enable 306is set, this may also be set to the number of daily accounting files that are 307to be saved. 308The default is 309.Dq 3 . 310.It Va daily_accounting_flags 311.Pq Vt str 312Set to the arguments to pass to the 313.Xr sa 8 314utility (in addition to 315.Fl s ) 316when 317.Va daily_accounting_enable 318is set to 319.Dq YES . 320The default is 321.Fl q . 322.It Va daily_distfile_enable 323.Pq Vt bool 324Set to 325.Dq YES 326if you want to run 327.Xr rdist 1 328daily. 329The 330.Pa /etc/Distfile 331file must also exist. 332.It Va daily_news_expire_enable 333.Pq Vt bool 334Set to 335.Dq YES 336if you want to run 337.Pa /etc/news.expire . 338.It Pa daily_uuclean_enable 339.Pq Vt bool 340Set to 341.Dq YES 342if you want to run 343.Pa /etc/uuclean.daily . 344.It Va daily_status_disks_enable 345.Pq Vt bool 346Set to 347.Dq YES 348if you want to run 349.Xr df 1 350(with the arguments supplied in 351.Va daily_status_disks_df_flags ) 352and 353.Ic dump -W . 354.It Va daily_status_disks_df_flags 355.Pq Vt str 356Set to the arguments for the 357.Xr df 1 358utility when 359.Va daily_status_disks_enable 360is set to 361.Dq YES . 362.It Va daily_status_uucp_enable 363.Pq Vt bool 364Set to 365.Dq YES 366if you want to run 367.Ic uustat -a . 368.It Va daily_status_network_enable 369.Pq Vt bool 370Set to 371.Dq YES 372if you want to run 373.Ic netstat -i . 374.It Va daily_status_network_usedns 375.Pq Vt bool 376Set to 377.Dq YES 378if you want to run 379.Xr netstat 1 380without the 381.Fl n 382option (to do DNS lookups). 383.It Va daily_status_rwho_enable 384.Pq Vt bool 385Set to 386.Dq YES 387if you want to run 388.Xr uptime 1 389(or 390.Xr ruptime 1 391if 392.Va rwhod_enable 393is set to 394.Dq YES 395in 396.Pa /etc/rc.conf ) . 397.It Va daily_status_mailq_enable 398.Pq Vt bool 399Set to 400.Dq YES 401if you want to run 402.Xr mailq 1 . 403.It Va daily_status_mailq_shorten 404.Pq Vt bool 405Set to 406.Dq YES 407if you want to shorten the 408.Nm mailq 409output when 410.Va daily_status_mailq_enable 411is set to 412.Dq YES . 413.It Va daily_status_include_submit_mailq 414.Pq Vt bool 415Set to 416.Dq YES 417if you also want to run 418.Xr mailq 1 419on the submit mail queue when 420.Va daily_status_mailq_enable 421is set to 422.Dq YES . 423This may not work with MTAs other than 424.Xr sendmail 8 . 425.It Va daily_status_security_enable 426.Pq Vt bool 427Set to 428.Dq YES 429if you want to run the security check. 430The security check is another set of 431.Xr periodic 8 432scripts. 433The system defaults are in 434.Pa /etc/periodic/security . 435Local scripts should be placed in 436.Pa /usr/local/etc/periodic/security . 437See the 438.Xr periodic 8 439manual page for more information. 440.It Va daily_status_security_inline 441.Pq Vt bool 442Set to 443.Dq YES 444if you want the security check output inline. 445The default is to either mail or log the output according to the value of 446.Va daily_status_security_output . 447.It Va daily_status_security_output 448.Pq Vt str 449Where to send the output of the security check if 450.Va daily_status_security_inline 451is set to 452.Dq NO . 453This variable behaves in the same way as the 454.Va *_output 455variables above, namely it can be set either to one or more email addresses 456or to an absolute file name. 457.It Va daily_status_security_chksetuid_enable 458.Pq Vt bool 459Set to 460.Dq YES 461to compare the modes and modification times of setuid executables with 462the previous day's values. 463.It Va daily_status_security_chkmounts_enable 464.Pq Vt bool 465Set to 466.Dq YES 467to check for changes mounted filesystems to the previous day's values. 468.It Va daily_status_security_noamd 469.Pq Vt bool 470Set to 471.Dq YES 472if you want to ignore 473.Xr amd 8 474mounts when comparing against yesterdays filesystem mounts in the 475.Va daily_status_security_chkmounts_enable 476check. 477.It Va daily_status_security_nomfs 478.Pq Vt bool 479Set to 480.Dq YES 481if you want to ignore 482.Xr mfs 8 483mounts when comparing against yesterdays filesystem mounts in the 484.Va daily_status_security_chkmounts_enable 485check. 486.It Va daily_status_security_chkuid0_enable 487.Pq Vt bool 488Set to 489.Dq YES 490to check 491.Pa /etc/master.passwd 492for accounts with uid 0. 493.It Va daily_status_security_passwdless_enable 494.Pq Vt bool 495Set to 496.Dq YES 497to check 498.Pa /etc/master.passwd 499for accounts with empty passwords. 500.It Va daily_status_security_ipfwdenied_enable 501.Pq Vt bool 502Set to 503.Dq YES 504to show log entries for packets denied by 505.Xr ipfw 8 506since yesterday's check. 507.It Va daily_status_security_ipfdenied_enable 508.Pq Vt bool 509Set to 510.Dq YES 511to show log entries for packets denied by 512.Xr ipf 8 513since yesterday's check. 514.It Va daily_status_security_ipfwlimit_enable 515.Pq Vt bool 516Set to 517.Dq YES 518to display 519.Xr ipfw 8 520rules that have reached their verbosity limit. 521.It Va daily_status_security_ip6fwdenied_enable 522.Pq Vt bool 523Set to 524.Dq YES 525to show log entries for packets denied by 526.Xr ip6fw 8 527since yesterday's check. 528.It Va daily_status_security_ip6fwlimit_enable 529.Pq Vt bool 530Set to 531.Dq YES 532to display 533.Xr ip6fw 8 534rules that have reached their verbosity limit. 535.It Va daily_status_security_kernelmsg_enable 536.Pq Vt bool 537Set to 538.Dq YES 539to show new 540.Xr dmesg 8 541entries since yesterday's check. 542.It Va daily_status_security_loginfail_enable 543.Pq Vt bool 544Set to 545.Dq YES 546to display failed logins from 547.Pa /var/log/messages 548in the previous day. 549.It Va daily_status_security_tcpwrap_enable 550.Pq Vt bool 551Set to 552.Dq YES 553to display connections denied by tcpwrappers (see 554.Xr hosts_access 5 ) 555from 556.Pa /var/log/messages 557during the previous day. 558.It Va daily_status_mail_rejects_enable 559.Pq Vt bool 560Set to 561.Dq YES 562if you want to summarise mail rejections logged to 563.Pa /var/log/maillog 564for the previous day. 565.It Va daily_status_mail_rejects_logs 566.Pq Vt num 567Set to the number of maillog files that should be checked 568for yesterday's mail rejects. 569.It Va daily_status_named_enable 570.Pq Vt bool 571Set to 572.Dq YES 573if you want to summarise denied zone transfers (AXFR and IXFR) 574for the previious day. 575.It Va daily_status_named_usedns 576.Pq Vt bool 577Set to 578.Dq YES 579if you want to enable reverse DNS lookups. 580.It Va daily_queuerun_enable 581.Pq Vt bool 582Set to 583.Dq YES 584if you want to manually run the mail queue at least once a day. 585.It Va daily_submit_queuerun 586.Pq Vt bool 587Set to 588.Dq YES 589if you also want to manually run the submit mail queue at least once a day 590when 591.Va daily_queuerun_enable 592is set to 593.Dq YES . 594.It Va daily_local 595.Pq Vt str 596Set to a list of extra scripts that should be run after all other 597daily scripts. 598All scripts must be absolute path names. 599.El 600.Pp 601The following variables are used by the standard scripts that reside in 602.Pa /etc/periodic/weekly : 603.Bl -tag -offset 4n -width 2n 604.It Va weekly_clean_kvmdb_enable 605.Pq Vt bool 606Set to 607.Dq YES 608if you want to purge old 609.Pa /var/db/kvm_*.db 610files. 611The kvm file for the current kernel will not be purged. 612.It Va weekly_clean_kvmdb_days 613.Pq Vt num 614Set to the number of days that the file must not have been accessed 615before being deleted. 616.It Va weekly_clean_kvmdb_verbose 617.Pq Vt bool 618Set to 619.Dq YES 620if you want the removed files to be reported in your weekly output. 621.It Va weekly_uucp_enable 622.Pq Vt bool 623Set to 624.Dq YES 625if you want to run 626.Pa /usr/libexec/uucp/clean.weekly . 627.It Va weekly_locate_enable 628.Pq Vt bool 629Set to 630.Dq YES 631if you want to run 632.Pa /usr/libexec/locate.updatedb . 633This script is run using 634.Ic nice -5 635as user 636.An nobody , 637and generates the table used by the 638.Xr locate 1 639command. 640.It Va weekly_whatis_enable 641.Pq Vt bool 642Set to 643.Dq YES 644if you want to run 645.Pa /usr/libexec/makewhatis.local . 646This script regenerates the database used by the 647.Xr apropos 1 648command. 649.It Va weekly_catman_enable 650.Pq Vt bool 651Set to 652.Dq YES 653if you want to run 654.Pa /usr/libexec/catman.local . 655This script processes all out of date man pages, speeding up the 656.Xr man 1 657command at the expense of disk space. 658.It Va weekly_noid_enable 659.Pq Vt bool 660Set to 661.Dq YES 662if you want to locate orphaned files on the system. 663An orphaned file is one with an invalid owner or group. 664.It Va weekly_noid_dirs 665.Pq Vt str 666A list of directories under which orphaned files are searched for. 667This would usually be set to 668.Pa / . 669.It Va weekly_status_pkg_enable 670.Pq Vt bool 671Set to 672.Dq YES 673if you want to use 674.Xr pkg_version 1 675to list installed packages which are out of date. 676.It Va weekly_local 677.Pq Vt str 678Set to a list of extra scripts that should be run after all other 679weekly scripts. 680All scripts must be absolute path names. 681.El 682.Pp 683The following variables are used by the standard scripts that reside in 684.Pa /etc/periodic/monthly : 685.Bl -tag -offset 4n -width 2n 686.It Va monthly_accounting_enable 687.Pq Vt bool 688Set to 689.Dq YES 690if you want to do login accounting using the 691.Xr ac 8 692command. 693.It Va monthly_local 694.Pq Vt str 695Set to a list of extra scripts that should be run after all other 696monthly scripts. 697All scripts must be absolute path names. 698.El 699.Sh FILES 700.Bl -tag -width /etc/defaults/periodic.conf 701.It Pa /etc/defaults/periodic.conf 702The default configuration file. 703This file contains all default variables and values. 704.It Pa /etc/periodic.conf 705The usual system specific variable override file. 706.It Pa /etc/periodic.conf.local 707An additional override file, useful when 708.Pa /etc/periodic.conf 709is shared or distributed. 710.El 711.Sh SEE ALSO 712.Xr apropos 1 , 713.Xr calendar 1 , 714.Xr df 1 , 715.Xr gzip 1 , 716.Xr locate 1 , 717.Xr man 1 , 718.Xr msgs 1 , 719.Xr netstat 1 , 720.Xr nice 1 , 721.Xr pkg_version 1 , 722.Xr rdist 1 , 723.Xr rc.conf 5 , 724.Xr ac 8 , 725.Xr amd 8 , 726.Xr chkgrp 8 , 727.Xr dump 8 , 728.Xr mfs 8 , 729.Xr newsyslog 8 , 730.Xr periodic 8 731.Sh HISTORY 732The 733.Nm 734file appeared in 735.Fx 4.1 . 736.Sh AUTHORS 737.An Brian Somers Aq brian@Awfulhak.org . 738