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