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