2 .\" Copyright (c) 2000 Brian Somers <brian@Awfulhak.org>
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
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.
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
33 .Nd periodic job configuration information
37 contains a description of how daily, weekly and monthly system maintenance
41 directory and parts may be overridden by a file of the same name in
43 which itself may be overridden by the
44 .Pa /etc/periodic.conf.local
48 is actually sourced as a shell script from each of the periodic scripts
49 and is intended to simply provide default configuration variables.
51 The following variables are used by
54 .Bl -tag -offset 4n -width 2n
57 List of directories to search for periodic scripts.
58 This list is always prefixed with
60 and is only used when an argument to
62 is not an absolute directory name.
63 .It Va dir Ns No _output
64 .Pq Vt path No or Vt list
65 What to do with the output of the scripts executed from
68 If this variable is set to an absolute path name, output is logged to
69 that file, otherwise it is taken as one or more space separated email
70 addresses and mailed to those users.
71 If this variable is not set or is empty, output is sent to standard output.
73 For an unattended machine, suitable values for
79 .Dq /var/log/daily.log ,
80 .Dq /var/log/weekly.log ,
82 .Dq /var/log/monthly.log
85 will 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
90 These variables control whether
92 will mask the output of the executed scripts based on their return code
95 is the base directory name in which each script resides).
96 If the return code of a script is
99 .Va dir Ns No _show_success
103 will mask the script's output.
104 If the return code of a script is
107 .Va dir Ns No _show_info
111 will mask the script's output.
112 If the return code of a script is
115 .Va dir Ns No _show_badconfig
119 will mask the script's output.
120 If these variables are set to neither
133 manual page for how script return codes are interpreted.
136 The 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
143 if you want to remove all files matching
144 .Va daily_clean_disks_files
146 .It Va daily_clean_disks_files
148 Set to a list of file names to match.
149 Wild cards are permitted.
150 .It Va daily_clean_disks_days
153 .Va daily_clean_disks_enable
156 this must also be set to the number of days old that a file's access
157 and modification times must be before it is deleted.
158 .It Va daily_clean_disks_verbose
162 if you want the removed files to be reported in your daily output.
163 .It Va daily_clean_tmps_enable
167 if you want to clear temporary directories daily.
168 .It Va daily_clean_tmps_dirs
170 Set to the list of directories to clear if
171 .Va daily_clean_tmps_enable
174 .It Va daily_clean_tmps_days
177 .Va daily_clean_tmps_enable
178 is set, this must also be set to the number of days old that a file's access
179 and modification times must be before it is deleted.
180 .It Va daily_clean_tmps_ignore
182 Set to the list of files that should not be deleted when
183 .Va daily_clean_tmps_enable
186 Wild card characters are permitted.
187 .It Va daily_clean_tmps_verbose
191 if you want the removed files to be reported in your daily output.
192 .It Va daily_clean_preserve_enable
196 if you wish to remove old files from
198 .It Va daily_clean_preserve_days
200 Set to the number of days that files must not have been modified before
202 .It Va daily_clean_preserve_verbose
206 if you want the removed files to be reported in your daily output.
207 .It Va daily_clean_msgs_enable
211 if you wish old system messages to be purged.
212 .It Va daily_clean_msgs_days
214 Set to the number of days that files must not have been modified before
216 If this variable is left blank, the
219 .It Va daily_clean_rwho_enable
223 if you wish old files in
226 .It Va daily_clean_rwho_days
228 Set to the number of days that files must not have been modified before
230 .It Va daily_clean_rwho_verbose
234 if you want the removed files to be reported in your daily output.
235 .It Va daily_clean_hoststat_enable
241 to automatically purge stale entries from
244 Files will be deleted using the same criteria as
246 would normally use when determining whether to believe the cached information,
248 .Pa /etc/mail/sendmail.cf .
249 .It Va daily_backup_passwd_enable
254 .Pa /etc/master.passwd
257 files backed up and reported on.
258 Reporting consists of checking both files for modifications and running
263 .It Va daily_backup_aliases_enable
268 .Pa /etc/mail/aliases
269 file backed up and modifications to be displayed in your daily output.
270 .It Va daily_calendar_enable
277 .It Va daily_accounting_enable
281 if you want to rotate your daily accounting files.
282 No rotations are necessary unless
283 .Va accounting_enable
286 .It Va daily_accounting_compress
290 if you want your daily accounting files to be compressed using
292 .It Va daily_accounting_save
295 .Va daily_accounting_enable
296 is set, this may also be set to the number of daily accounting files that are
300 .It Va daily_accounting_flags
302 Set to the arguments to pass to the
304 utility (in addition to
307 .Va daily_accounting_enable
312 .It Va daily_news_expire_enable
317 .Pa /etc/news.expire .
318 .It Va daily_status_disks_enable
324 (with the arguments supplied in
325 .Va daily_status_disks_df_flags )
328 .It Va daily_status_disks_df_flags
330 Set to the arguments for the
333 .Va daily_status_disks_enable
336 .It Va daily_status_network_enable
342 .It Va daily_status_network_usedns
350 option (to do DNS lookups).
351 .It Va daily_status_rwho_enable
365 .It Va daily_status_mailq_enable
371 .It Va daily_status_mailq_shorten
375 if you want to shorten the
378 .Va daily_status_mailq_enable
381 .It Va daily_status_include_submit_mailq
385 if you also want to run
387 on the submit mail queue when
388 .Va daily_status_mailq_enable
391 This may not work with MTAs other than
393 .It Va daily_status_security_enable
397 if you want to run the security check.
398 The security check is another set of
401 The system defaults are in
402 .Pa /etc/periodic/security .
403 Local scripts should be placed in
404 .Pa /usr/local/etc/periodic/security .
407 manual page for more information.
408 .It Va daily_status_security_inline
412 if you want the security check output inline.
413 The default is to either mail or log the output according to the value of
414 .Va daily_status_security_output .
415 .It Va daily_status_security_output
417 Where to send the output of the security check if
418 .Va daily_status_security_inline
421 This variable behaves in the same way as the
423 variables above, namely it can be set either to one or more email addresses
424 or to an absolute file name.
425 .It Va daily_status_security_diff_flags
427 Set to the arguments to pass to the
429 utility when generating differences.
432 .It Va daily_status_security_chksetuid_enable
436 to compare the modes and modification times of setuid executables with
437 the previous day's values.
438 .It Va daily_status_security_chkmounts_enable
442 to check for changes mounted file systems to the previous day's values.
443 .It Va daily_status_security_noamd
447 if you want to ignore
449 mounts when comparing against yesterday's file system mounts in the
450 .Va daily_status_security_chkmounts_enable
452 .It Va daily_status_security_chkuid0_enable
457 .Pa /etc/master.passwd
458 for accounts with uid 0.
459 .It Va daily_status_security_passwdless_enable
464 .Pa /etc/master.passwd
465 for accounts with empty passwords.
466 .It Va daily_status_security_ipfwdenied_enable
470 to show log entries for packets denied by
472 since yesterday's check.
473 .It Va daily_status_security_ipfdenied_enable
477 to show log entries for packets denied by
479 since yesterday's check.
480 .It Va daily_status_security_pfdenied_enable
484 to show log entries for packets denied by
486 since yesterday's check.
487 .It Va daily_status_security_ipfwlimit_enable
493 rules that have reached their verbosity limit.
494 .It Va daily_status_security_ip6fwdenied_enable
498 to show log entries for packets denied by
500 since yesterday's check.
501 .It Va daily_status_security_ip6fwlimit_enable
507 rules that have reached their verbosity limit.
508 .It Va daily_status_security_kernelmsg_enable
514 entries since yesterday's check.
515 .It Va daily_status_security_loginfail_enable
519 to display failed logins from
520 .Pa /var/log/messages
522 .It Va daily_status_security_tcpwrap_enable
526 to display connections denied by tcpwrappers (see
529 .Pa /var/log/messages
530 during the previous day.
531 .It Va daily_status_mail_rejects_enable
535 if you want to summarise mail rejections logged to
537 for the previous day.
538 .It Va daily_status_mail_rejects_logs
540 Set to the number of maillog files that should be checked
541 for yesterday's mail rejects.
542 .It Va daily_status_named_enable
546 if you want to summarise denied zone transfers (AXFR and IXFR)
547 for the previous day.
548 .It Va daily_status_named_usedns
552 if you want to enable reverse DNS lookups.
553 .It Va daily_queuerun_enable
557 if you want to manually run the mail queue at least once a day.
558 .It Va daily_submit_queuerun
562 if you also want to manually run the submit mail queue at least once a day
564 .Va daily_queuerun_enable
569 Set to a list of extra scripts that should be run after all other
571 All scripts must be absolute path names.
574 The following variables are used by the standard scripts that reside in
575 .Pa /etc/periodic/weekly :
576 .Bl -tag -offset 4n -width 2n
577 .It Va weekly_clean_kvmdb_enable
581 if you want to purge old
584 The kvm file for the current kernel will not be purged.
585 .It Va weekly_clean_kvmdb_days
587 Set to the number of days that the file must not have been accessed
588 before being deleted.
589 .It Va weekly_clean_kvmdb_verbose
593 if you want the removed files to be reported in your weekly output.
594 .It Va weekly_locate_enable
599 .Pa /usr/libexec/locate.updatedb .
600 This script is run using
604 and generates the table used by the
607 .It Va weekly_whatis_enable
612 .Pa /usr/libexec/makewhatis.local .
613 This script regenerates the database used by the
616 .It Va weekly_catman_enable
621 .Pa /usr/libexec/catman.local .
622 This script processes all out of date manual pages, speeding up the
624 command at the expense of disk space.
625 .It Va weekly_noid_enable
629 if you want to locate orphaned files on the system.
630 An orphaned file is one with an invalid owner or group.
631 .It Va weekly_noid_dirs
633 A list of directories under which orphaned files are searched for.
634 This would usually be set to
636 .It Va weekly_status_pkg_enable
642 to list installed packages which are out of date.
646 .Va weekly_status_pkg_enable
649 this variable specifies the program that is used to determine the out of
654 As an example, this variable might be set to
656 if the portupgrade port has been installed.
657 .It Va pkg_version_index
659 This variable specifies the
663 that should be used by
665 Because the dependency tree may be substantially different between versions of
667 there may be more than one
676 it will also be necessary to arrange that the correct
679 using environment variables and that
680 .Va pkg_version_index
682 .Pa /etc/periodic.conf
683 .Pq Dq Li pkg_version_index= .
686 Set to a list of extra scripts that should be run after all other
688 All scripts must be absolute path names.
691 The following variables are used by the standard scripts that reside in
692 .Pa /etc/periodic/monthly :
693 .Bl -tag -offset 4n -width 2n
694 .It Va monthly_accounting_enable
698 if you want to do login accounting using the
703 Set to a list of extra scripts that should be run after all other
705 All scripts must be absolute path names.
708 .Bl -tag -width /etc/defaults/periodic.conf
709 .It Pa /etc/defaults/periodic.conf
710 The default configuration file.
711 This file contains all default variables and values.
712 .It Pa /etc/periodic.conf
713 The usual system specific variable override file.
714 .It Pa /etc/periodic.conf.local
715 An additional override file, useful when
716 .Pa /etc/periodic.conf
717 is shared or distributed.
744 .An Brian Somers Aq brian@Awfulhak.org .