Merge from vendor branch CVS:
[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.3 2005/07/25 00:24:31 gshapiro 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
36 The file
37 .Nm
38 contains a description of how daily, weekly and montly 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 .Dq /var/log/daily.log ,
81 .Dq /var/log/weekly.log ,
82 and
83 .Dq /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_backup_passwd_enable
251 .Pq Vt bool
252 Set to
253 .Dq YES
254 if you want the
255 .Pa /etc/master.passwd
256 and
257 .Pa /etc/group
258 files backed up and reported on.
259 Reporting consists of checking both files for modifications and running
260 .Xr chkgrp 8
261 on the
262 .Pa group
263 file.
264 .It Va daily_backup_aliases_enable
265 .Pq Vt bool
266 Set to
267 .Dq YES
268 if you want the
269 .Pa /etc/mail/aliases
270 file backed up and modifications to be displayed in your daily output.
271 .It Va daily_backup_distfile_enable
272 .Pq Vt bool
273 Set to
274 .Dq YES
275 if you want the
276 .Pa /etc/Distfile
277 file backed up and modifications to be displayed in your daily output.
278 .It Va daily_calendar_enable
279 .Pq Vt bool
280 Set to
281 .Dq YES
282 if you want to run
283 .Ic calendar -a
284 daily.
285 .It Va daily_accounting_enable
286 .Pq Vt bool
287 Set to
288 .Dq YES
289 if you want to rotate your daily accounting files.
290 No rotations are necessary unless
291 .Va accounting_enable
292 is enabled in
293 .Xr rc.conf 5 .
294 .It Va daily_accounting_compress
295 .Pq Vt bool
296 Set to
297 .Dq YES
298 if you want your daily accounting files to be compressed using
299 .Xr gzip 1 .
300 .It Va daily_accounting_save
301 .Pq Vt num
302 When
303 .Va daily_accounting_enable
304 is set, this may also be set to the number of daily accounting files that are
305 to be saved.
306 The default is
307 .Dq 3 .
308 .It Va daily_accounting_flags
309 .Pq Vt str
310 Set to the arguments to pass to the
311 .Xr sa 8
312 utility (in addition to
313 .Fl s )
314 when
315 .Va daily_accounting_enable
316 is set to
317 .Dq YES .
318 The default is
319 .Fl q .
320 .It Va daily_distfile_enable
321 .Pq Vt bool
322 Set to
323 .Dq YES
324 if you want to run
325 .Xr rdist 1
326 daily.
327 The
328 .Pa /etc/Distfile
329 file must also exist.
330 .It Va daily_news_expire_enable
331 .Pq Vt bool
332 Set to
333 .Dq YES
334 if you want to run
335 .Pa /etc/news.expire .
336 .It Pa daily_uuclean_enable
337 .Pq Vt bool
338 Set to
339 .Dq YES
340 if you want to run
341 .Pa /etc/uuclean.daily .
342 .It Va daily_status_disks_enable
343 .Pq Vt bool
344 Set to
345 .Dq YES
346 if you want to run
347 .Xr df 1
348 (with the arguments supplied in
349 .Va daily_status_disks_df_flags )
350 and
351 .Ic dump -W .
352 .It Va daily_status_disks_df_flags
353 .Pq Vt str
354 Set to the arguments for the
355 .Xr df 1
356 utility when
357 .Va daily_status_disks_enable
358 is set to
359 .Dq YES .
360 .It Va daily_status_uucp_enable
361 .Pq Vt bool
362 Set to
363 .Dq YES
364 if you want to run
365 .Ic uustat -a .
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_output
446 .Pq Vt str
447 Where to send the output of the security check if
448 .Va daily_status_security_inline
449 is set to
450 .Dq NO .
451 This variable behaves in the same way as the
452 .Va *_output
453 variables above, namely it can be set either to one or more email addresses
454 or to an absolute file name.
455 .It Va daily_status_security_chksetuid_enable
456 .Pq Vt bool
457 Set to
458 .Dq YES
459 to compare the modes and modification times of setuid executables with
460 the previous day's values.
461 .It Va daily_status_security_chkmounts_enable
462 .Pq Vt bool
463 Set to
464 .Dq YES
465 to check for changes mounted filesystems to the previous day's values.
466 .It Va daily_status_security_noamd
467 .Pq Vt bool
468 Set to
469 .Dq YES
470 if you want to ignore
471 .Xr amd 8
472 mounts when comparing against yesterdays filesystem mounts in the
473 .Va daily_status_security_chkmounts_enable
474 check.
475 .It Va daily_status_security_nomfs
476 .Pq Vt bool
477 Set to
478 .Dq YES
479 if you want to ignore
480 .Xr mfs 8
481 mounts when comparing against yesterdays filesystem mounts in the
482 .Va daily_status_security_chkmounts_enable
483 check.
484 .It Va daily_status_security_chkuid0_enable
485 .Pq Vt bool
486 Set to
487 .Dq YES
488 to check
489 .Pa /etc/master.passwd
490 for accounts with uid 0.
491 .It Va daily_status_security_passwdless_enable
492 .Pq Vt bool
493 Set to
494 .Dq YES
495 to check
496 .Pa /etc/master.passwd
497 for accounts with empty passwords.
498 .It Va daily_status_security_ipfwdenied_enable
499 .Pq Vt bool
500 Set to
501 .Dq YES
502 to show log entries for packets denied by
503 .Xr ipfw 8
504 since yesterday's check.
505 .It Va daily_status_security_ipfdenied_enable
506 .Pq Vt bool
507 Set to
508 .Dq YES
509 to show log entries for packets denied by
510 .Xr ipf 8
511 since yesterday's check.
512 .It Va daily_status_security_ipfwlimit_enable
513 .Pq Vt bool
514 Set to
515 .Dq YES
516 to display
517 .Xr ipfw 8
518 rules that have reached their verbosity limit.
519 .It Va daily_status_security_ip6fwdenied_enable
520 .Pq Vt bool
521 Set to
522 .Dq YES
523 to show log entries for packets denied by
524 .Xr ip6fw 8
525 since yesterday's check.
526 .It Va daily_status_security_ip6fwlimit_enable
527 .Pq Vt bool
528 Set to
529 .Dq YES
530 to display
531 .Xr ip6fw 8
532 rules that have reached their verbosity limit.
533 .It Va daily_status_security_kernelmsg_enable
534 .Pq Vt bool
535 Set to
536 .Dq YES
537 to show new
538 .Xr dmesg 8
539 entries since yesterday's check.
540 .It Va daily_status_security_loginfail_enable
541 .Pq Vt bool
542 Set to
543 .Dq YES
544 to display failed logins from
545 .Pa /var/log/messages
546 in the previous day.
547 .It Va daily_status_security_tcpwrap_enable
548 .Pq Vt bool
549 Set to
550 .Dq YES
551 to display connections denied by tcpwrappers (see
552 .Xr hosts_access 5 )
553 from
554 .Pa /var/log/messages
555 during the previous day.
556 .It Va daily_status_mail_rejects_enable
557 .Pq Vt bool
558 Set to
559 .Dq YES
560 if you want to summarise mail rejections logged to
561 .Pa /var/log/maillog
562 for the previous day.
563 .It Va daily_status_mail_rejects_logs
564 .Pq Vt num
565 Set to the number of maillog files that should be checked
566 for yesterday's mail rejects.
567 .It Va daily_status_named_enable
568 .Pq Vt bool
569 Set to
570 .Dq YES
571 if you want to summarise denied zone transfers (AXFR and IXFR)
572 for the previious day.
573 .It Va daily_status_named_usedns
574 .Pq Vt bool
575 Set to
576 .Dq YES
577 if you want to enable reverse DNS lookups.
578 .It Va daily_queuerun_enable
579 .Pq Vt bool
580 Set to
581 .Dq YES
582 if you want to manually run the mail queue at least once a day.
583 .It Va daily_submit_queuerun
584 .Pq Vt bool
585 Set to
586 .Dq YES
587 if you also want to manually run the submit mail queue at least once a day
588 when
589 .Va daily_queuerun_enable
590 is set to
591 .Dq YES .
592 .It Va daily_local
593 .Pq Vt str
594 Set to a list of extra scripts that should be run after all other
595 daily scripts.
596 All scripts must be absolute path names.
597 .El
598 .Pp
599 The following variables are used by the standard scripts that reside in
600 .Pa /etc/periodic/weekly :
601 .Bl -tag -offset 4n -width 2n
602 .It Va weekly_clean_kvmdb_enable
603 .Pq Vt bool
604 Set to
605 .Dq YES
606 if you want to purge old
607 .Pa /var/db/kvm_*.db
608 files.
609 The kvm file for the current kernel will not be purged.
610 .It Va weekly_clean_kvmdb_days
611 .Pq Vt num
612 Set to the number of days that the file must not have been accessed
613 before being deleted.
614 .It Va weekly_clean_kvmdb_verbose
615 .Pq Vt bool
616 Set to
617 .Dq YES
618 if you want the removed files to be reported in your weekly output.
619 .It Va weekly_uucp_enable
620 .Pq Vt bool
621 Set to
622 .Dq YES
623 if you want to run
624 .Pa /usr/libexec/uucp/clean.weekly .
625 .It Va weekly_locate_enable
626 .Pq Vt bool
627 Set to
628 .Dq YES
629 if you want to run
630 .Pa /usr/libexec/locate.updatedb .
631 This script is run using
632 .Ic nice -5
633 as user
634 .An nobody ,
635 and generates the table used by the
636 .Xr locate 1
637 command.
638 .It Va weekly_whatis_enable
639 .Pq Vt bool
640 Set to
641 .Dq YES
642 if you want to run
643 .Pa /usr/libexec/makewhatis.local .
644 This script regenerates the database used by the
645 .Xr apropos 1
646 command.
647 .It Va weekly_catman_enable
648 .Pq Vt bool
649 Set to
650 .Dq YES
651 if you want to run
652 .Pa /usr/libexec/catman.local .
653 This script processes all out of date man pages, speeding up the
654 .Xr man 1
655 command at the expense of disk space.
656 .It Va weekly_noid_enable
657 .Pq Vt bool
658 Set to
659 .Dq YES
660 if you want to locate orphaned files on the system.
661 An orphaned file is one with an invalid owner or group.
662 .It Va weekly_noid_dirs
663 .Pq Vt str
664 A list of directories under which orphaned files are searched for.
665 This would usually be set to
666 .Pa / .
667 .It Va weekly_status_pkg_enable
668 .Pq Vt bool
669 Set to
670 .Dq YES
671 if you want to use
672 .Xr pkg_version 1
673 to list installed packages which are out of date.
674 .It Va weekly_local
675 .Pq Vt str
676 Set to a list of extra scripts that should be run after all other
677 weekly scripts.
678 All scripts must be absolute path names.
679 .El
680 .Pp
681 The following variables are used by the standard scripts that reside in
682 .Pa /etc/periodic/monthly :
683 .Bl -tag -offset 4n -width 2n
684 .It Va monthly_accounting_enable
685 .Pq Vt bool
686 Set to
687 .Dq YES
688 if you want to do login accounting using the
689 .Xr ac 8
690 command.
691 .It Va monthly_local
692 .Pq Vt str
693 Set to a list of extra scripts that should be run after all other
694 monthly scripts.
695 All scripts must be absolute path names.
696 .El
697 .Sh FILES
698 .Bl -tag -width /etc/defaults/periodic.conf
699 .It Pa /etc/defaults/periodic.conf
700 The default configuration file.
701 This file contains all default variables and values.
702 .It Pa /etc/periodic.conf
703 The usual system specific variable override file.
704 .It Pa /etc/periodic.conf.local
705 An additional override file, useful when
706 .Pa /etc/periodic.conf
707 is shared or distributed.
708 .El
709 .Sh SEE ALSO
710 .Xr apropos 1 ,
711 .Xr calendar 1 ,
712 .Xr df 1 ,
713 .Xr gzip 1 ,
714 .Xr locate 1 ,
715 .Xr man 1 ,
716 .Xr msgs 1 ,
717 .Xr netstat 1 ,
718 .Xr nice 1 ,
719 .Xr pkg_version 1 ,
720 .Xr rdist 1 ,
721 .Xr rc.conf 5 ,
722 .Xr ac 8 ,
723 .Xr amd 8 ,
724 .Xr chkgrp 8 ,
725 .Xr dump 8 ,
726 .Xr mfs 8 ,
727 .Xr newsyslog 8 ,
728 .Xr periodic 8 ,
729 .Xr sendmail 8
730 .Sh HISTORY
731 The
732 .Nm
733 file appeared in
734 .Fx 4.1 .
735 .Sh AUTHORS
736 .An Brian Somers Aq brian@Awfulhak.org .