Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most
[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.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
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 if you wish old files in
241 .Pa /var/spool/.hoststat
242 to be purged.
243 .It Va daily_clean_hoststat_days
244 .Pq Vt num
245 Set to the number of days that files must not have been modified before
246 they are deleted.
247 .It Va daily_clean_hoststat_verbose
248 .Pq Vt bool
249 Set to
250 .Dq YES
251 if you want the removed files to be reported in your daily output.
252 .It Va daily_backup_passwd_enable
253 .Pq Vt bool
254 Set to
255 .Dq YES
256 if you want the
257 .Pa /etc/master.passwd
258 and
259 .Pa /etc/group
260 files backed up and reported on.
261 Reporting consists of checking both files for modifications and running
262 .Xr chkgrp 8
263 on the
264 .Pa group
265 file.
266 .It Va daily_backup_aliases_enable
267 .Pq Vt bool
268 Set to
269 .Dq YES
270 if you want the
271 .Pa /etc/mail/aliases
272 file backed up and modifications to be displayed in your daily output.
273 .It Va daily_backup_distfile_enable
274 .Pq Vt bool
275 Set to
276 .Dq YES
277 if you want the
278 .Pa /etc/Distfile
279 file backed up and modifications to be displayed in your daily output.
280 .It Va daily_calendar_enable
281 .Pq Vt bool
282 Set to
283 .Dq YES
284 if you want to run
285 .Ic calendar -a
286 daily.
287 .It Va daily_accounting_enable
288 .Pq Vt bool
289 Set to
290 .Dq YES
291 if you want to rotate your daily accounting files.
292 No rotations are necessary unless
293 .Va accounting_enable
294 is enabled in
295 .Xr rc.conf 5 .
296 .It Va daily_accounting_compress
297 .Pq Vt bool
298 Set to
299 .Dq YES
300 if you want your daily accounting files to be compressed using
301 .Xr gzip 1 .
302 .It Va daily_accounting_save
303 .Pq Vt num
304 When
305 .Va daily_accounting_enable
306 is set, this may also be set to the number of daily accounting files that are
307 to be saved.
308 The default is
309 .Dq 3 .
310 .It Va daily_accounting_flags
311 .Pq Vt str
312 Set to the arguments to pass to the
313 .Xr sa 8
314 utility (in addition to
315 .Fl s )
316 when
317 .Va daily_accounting_enable
318 is set to
319 .Dq YES .
320 The default is
321 .Fl q .
322 .It Va daily_distfile_enable
323 .Pq Vt bool
324 Set to
325 .Dq YES
326 if you want to run
327 .Xr rdist 1
328 daily.
329 The
330 .Pa /etc/Distfile
331 file must also exist.
332 .It Va daily_news_expire_enable
333 .Pq Vt bool
334 Set to
335 .Dq YES
336 if you want to run
337 .Pa /etc/news.expire .
338 .It Pa daily_uuclean_enable
339 .Pq Vt bool
340 Set to
341 .Dq YES
342 if you want to run
343 .Pa /etc/uuclean.daily .
344 .It Va daily_status_disks_enable
345 .Pq Vt bool
346 Set to
347 .Dq YES
348 if you want to run
349 .Xr df 1
350 (with the arguments supplied in
351 .Va daily_status_disks_df_flags )
352 and
353 .Ic dump -W .
354 .It Va daily_status_disks_df_flags
355 .Pq Vt str
356 Set to the arguments for the
357 .Xr df 1
358 utility when
359 .Va daily_status_disks_enable
360 is set to
361 .Dq YES .
362 .It Va daily_status_uucp_enable
363 .Pq Vt bool
364 Set to
365 .Dq YES
366 if you want to run
367 .Ic uustat -a .
368 .It Va daily_status_network_enable
369 .Pq Vt bool
370 Set to
371 .Dq YES
372 if you want to run
373 .Ic netstat -i .
374 .It Va daily_status_network_usedns
375 .Pq Vt bool
376 Set to
377 .Dq YES
378 if you want to run
379 .Xr netstat 1
380 without the
381 .Fl n
382 option (to do DNS lookups).
383 .It Va daily_status_rwho_enable
384 .Pq Vt bool
385 Set to
386 .Dq YES
387 if you want to run
388 .Xr uptime 1
389 (or
390 .Xr ruptime 1
391 if
392 .Va rwhod_enable
393 is set to
394 .Dq YES
395 in
396 .Pa /etc/rc.conf ) .
397 .It Va daily_status_mailq_enable
398 .Pq Vt bool
399 Set to
400 .Dq YES
401 if you want to run
402 .Xr mailq 1 .
403 .It Va daily_status_mailq_shorten
404 .Pq Vt bool
405 Set to
406 .Dq YES
407 if you want to shorten the
408 .Nm mailq
409 output when
410 .Va daily_status_mailq_enable
411 is set to
412 .Dq YES .
413 .It Va daily_status_include_submit_mailq
414 .Pq Vt bool
415 Set to
416 .Dq YES
417 if you also want to run
418 .Xr mailq 1
419 on the submit mail queue when
420 .Va daily_status_mailq_enable
421 is set to
422 .Dq YES .
423 This may not work with MTAs other than
424 .Xr sendmail 8 .
425 .It Va daily_status_security_enable
426 .Pq Vt bool
427 Set to
428 .Dq YES
429 if you want to run the security check.
430 The security check is another set of
431 .Xr periodic 8
432 scripts.
433 The system defaults are in
434 .Pa /etc/periodic/security .
435 Local scripts should be placed in
436 .Pa /usr/local/etc/periodic/security .
437 See the
438 .Xr periodic 8
439 manual page for more information.
440 .It Va daily_status_security_inline
441 .Pq Vt bool
442 Set to
443 .Dq YES
444 if you want the security check output inline.
445 The 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
449 Where to send the output of the security check if
450 .Va daily_status_security_inline
451 is set to
452 .Dq NO .
453 This variable behaves in the same way as the
454 .Va *_output
455 variables above, namely it can be set either to one or more email addresses
456 or to an absolute file name.
457 .It Va daily_status_security_chksetuid_enable
458 .Pq Vt bool
459 Set to
460 .Dq YES
461 to compare the modes and modification times of setuid executables with
462 the previous day's values.
463 .It Va daily_status_security_chkmounts_enable
464 .Pq Vt bool
465 Set to
466 .Dq YES
467 to check for changes mounted filesystems to the previous day's values.
468 .It Va daily_status_security_noamd
469 .Pq Vt bool
470 Set to
471 .Dq YES
472 if you want to ignore
473 .Xr amd 8
474 mounts when comparing against yesterdays filesystem mounts in the
475 .Va daily_status_security_chkmounts_enable
476 check.
477 .It Va daily_status_security_nomfs
478 .Pq Vt bool
479 Set to
480 .Dq YES
481 if you want to ignore
482 .Xr mfs 8
483 mounts when comparing against yesterdays filesystem mounts in the
484 .Va daily_status_security_chkmounts_enable
485 check.
486 .It Va daily_status_security_chkuid0_enable
487 .Pq Vt bool
488 Set to
489 .Dq YES
490 to check
491 .Pa /etc/master.passwd
492 for accounts with uid 0.
493 .It Va daily_status_security_passwdless_enable
494 .Pq Vt bool
495 Set to
496 .Dq YES
497 to check
498 .Pa /etc/master.passwd
499 for accounts with empty passwords.
500 .It Va daily_status_security_ipfwdenied_enable
501 .Pq Vt bool
502 Set to
503 .Dq YES
504 to show log entries for packets denied by
505 .Xr ipfw 8
506 since yesterday's check.
507 .It Va daily_status_security_ipfdenied_enable
508 .Pq Vt bool
509 Set to
510 .Dq YES
511 to show log entries for packets denied by
512 .Xr ipf 8
513 since yesterday's check.
514 .It Va daily_status_security_ipfwlimit_enable
515 .Pq Vt bool
516 Set to
517 .Dq YES
518 to display
519 .Xr ipfw 8
520 rules that have reached their verbosity limit.
521 .It Va daily_status_security_ip6fwdenied_enable
522 .Pq Vt bool
523 Set to
524 .Dq YES
525 to show log entries for packets denied by
526 .Xr ip6fw 8
527 since yesterday's check.
528 .It Va daily_status_security_ip6fwlimit_enable
529 .Pq Vt bool
530 Set to
531 .Dq YES
532 to display
533 .Xr ip6fw 8
534 rules that have reached their verbosity limit.
535 .It Va daily_status_security_kernelmsg_enable
536 .Pq Vt bool
537 Set to
538 .Dq YES
539 to show new
540 .Xr dmesg 8
541 entries since yesterday's check.
542 .It Va daily_status_security_loginfail_enable
543 .Pq Vt bool
544 Set to
545 .Dq YES
546 to display failed logins from
547 .Pa /var/log/messages
548 in the previous day.
549 .It Va daily_status_security_tcpwrap_enable
550 .Pq Vt bool
551 Set to
552 .Dq YES
553 to display connections denied by tcpwrappers (see
554 .Xr hosts_access 5 )
555 from
556 .Pa /var/log/messages
557 during the previous day.
558 .It Va daily_status_mail_rejects_enable
559 .Pq Vt bool
560 Set to
561 .Dq YES
562 if you want to summarise mail rejections logged to
563 .Pa /var/log/maillog
564 for the previous day.
565 .It Va daily_status_mail_rejects_logs
566 .Pq Vt num
567 Set to the number of maillog files that should be checked
568 for yesterday's mail rejects.
569 .It Va daily_status_named_enable
570 .Pq Vt bool
571 Set to
572 .Dq YES
573 if you want to summarise denied zone transfers (AXFR and IXFR)
574 for the previious day.
575 .It Va daily_status_named_usedns
576 .Pq Vt bool
577 Set to
578 .Dq YES
579 if you want to enable reverse DNS lookups.
580 .It Va daily_queuerun_enable
581 .Pq Vt bool
582 Set to
583 .Dq YES
584 if you want to manually run the mail queue at least once a day.
585 .It Va daily_submit_queuerun
586 .Pq Vt bool
587 Set to
588 .Dq YES
589 if you also want to manually run the submit mail queue at least once a day
590 when
591 .Va daily_queuerun_enable
592 is set to
593 .Dq YES .
594 .It Va daily_local
595 .Pq Vt str
596 Set to a list of extra scripts that should be run after all other
597 daily scripts.
598 All scripts must be absolute path names.
599 .El
600 .Pp
601 The 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
606 Set to
607 .Dq YES
608 if you want to purge old
609 .Pa /var/db/kvm_*.db
610 files.
611 The kvm file for the current kernel will not be purged.
612 .It Va weekly_clean_kvmdb_days
613 .Pq Vt num
614 Set to the number of days that the file must not have been accessed
615 before being deleted.
616 .It Va weekly_clean_kvmdb_verbose
617 .Pq Vt bool
618 Set to
619 .Dq YES
620 if you want the removed files to be reported in your weekly output.
621 .It Va weekly_uucp_enable
622 .Pq Vt bool
623 Set to
624 .Dq YES
625 if you want to run
626 .Pa /usr/libexec/uucp/clean.weekly .
627 .It Va weekly_locate_enable
628 .Pq Vt bool
629 Set to
630 .Dq YES
631 if you want to run
632 .Pa /usr/libexec/locate.updatedb .
633 This script is run using
634 .Ic nice -5
635 as user
636 .An nobody ,
637 and generates the table used by the
638 .Xr locate 1
639 command.
640 .It Va weekly_whatis_enable
641 .Pq Vt bool
642 Set to
643 .Dq YES
644 if you want to run
645 .Pa /usr/libexec/makewhatis.local .
646 This script regenerates the database used by the
647 .Xr apropos 1
648 command.
649 .It Va weekly_catman_enable
650 .Pq Vt bool
651 Set to
652 .Dq YES
653 if you want to run
654 .Pa /usr/libexec/catman.local .
655 This script processes all out of date man pages, speeding up the
656 .Xr man 1
657 command at the expense of disk space.
658 .It Va weekly_noid_enable
659 .Pq Vt bool
660 Set to
661 .Dq YES
662 if you want to locate orphaned files on the system.
663 An orphaned file is one with an invalid owner or group.
664 .It Va weekly_noid_dirs
665 .Pq Vt str
666 A list of directories under which orphaned files are searched for.
667 This would usually be set to
668 .Pa / .
669 .It Va weekly_status_pkg_enable
670 .Pq Vt bool
671 Set to
672 .Dq YES
673 if you want to use
674 .Xr pkg_version 1
675 to list installed packages which are out of date.
676 .It Va weekly_local
677 .Pq Vt str
678 Set to a list of extra scripts that should be run after all other
679 weekly scripts.
680 All scripts must be absolute path names.
681 .El
682 .Pp
683 The 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
688 Set to
689 .Dq YES
690 if you want to do login accounting using the
691 .Xr ac 8
692 command.
693 .It Va monthly_local
694 .Pq Vt str
695 Set to a list of extra scripts that should be run after all other
696 monthly scripts.
697 All 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
702 The default configuration file.
703 This file contains all default variables and values.
704 .It Pa /etc/periodic.conf
705 The usual system specific variable override file.
706 .It Pa /etc/periodic.conf.local
707 An additional override file, useful when
708 .Pa /etc/periodic.conf
709 is 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
732 The
733 .Nm
734 file appeared in
735 .Fx 4.1 .
736 .Sh AUTHORS
737 .An Brian Somers Aq brian@Awfulhak.org .