]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/man/man5/periodic.conf.5
This commit was generated by cvs2svn to compensate for changes in r154180,
[FreeBSD/FreeBSD.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$
27 .\"
28 .Dd November 24, 2004
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 monthly 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 executed 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 executed 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 manual 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 is 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 is 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 to run
240 .Nm sendmail Fl bH
241 to automatically purge stale entries from
242 .Xr sendmail 8 Ns 's
243 host status cache.
244 Files will be deleted using the same criteria as
245 .Xr sendmail 8
246 would normally use when determining whether to believe the cached information,
247 as configured in
248 .Pa /etc/mail/sendmail.cf .
249 .It Va daily_backup_passwd_enable
250 .Pq Vt bool
251 Set to
252 .Dq YES
253 if you want the
254 .Pa /etc/master.passwd
255 and
256 .Pa /etc/group
257 files backed up and reported on.
258 Reporting consists of checking both files for modifications and running
259 .Xr chkgrp 8
260 on the
261 .Pa group
262 file.
263 .It Va daily_backup_aliases_enable
264 .Pq Vt bool
265 Set to
266 .Dq YES
267 if you want the
268 .Pa /etc/mail/aliases
269 file backed up and modifications to be displayed in your daily output.
270 .It Va daily_calendar_enable
271 .Pq Vt bool
272 Set to
273 .Dq YES
274 if you want to run
275 .Nm calendar Fl a
276 daily.
277 .It Va daily_accounting_enable
278 .Pq Vt bool
279 Set to
280 .Dq YES
281 if you want to rotate your daily accounting files.
282 No rotations are necessary unless
283 .Va accounting_enable
284 is enabled in
285 .Xr rc.conf 5 .
286 .It Va daily_accounting_compress
287 .Pq Vt bool
288 Set to
289 .Dq YES
290 if you want your daily accounting files to be compressed using
291 .Xr gzip 1 .
292 .It Va daily_accounting_save
293 .Pq Vt num
294 When
295 .Va daily_accounting_enable
296 is set, this may also be set to the number of daily accounting files that are
297 to be saved.
298 The default is
299 .Dq 3 .
300 .It Va daily_accounting_flags
301 .Pq Vt str
302 Set to the arguments to pass to the
303 .Xr sa 8
304 utility (in addition to
305 .Fl s )
306 when
307 .Va daily_accounting_enable
308 is set to
309 .Dq YES .
310 The default is
311 .Fl q .
312 .It Va daily_news_expire_enable
313 .Pq Vt bool
314 Set to
315 .Dq YES
316 if you want to run
317 .Pa /etc/news.expire .
318 .It Va daily_status_disks_enable
319 .Pq Vt bool
320 Set to
321 .Dq YES
322 if you want to run
323 .Xr df 1
324 (with the arguments supplied in
325 .Va daily_status_disks_df_flags )
326 and
327 .Nm dump Fl W .
328 .It Va daily_status_disks_df_flags
329 .Pq Vt str
330 Set to the arguments for the
331 .Xr df 1
332 utility when
333 .Va daily_status_disks_enable
334 is set to
335 .Dq YES .
336 .It Va daily_status_network_enable
337 .Pq Vt bool
338 Set to
339 .Dq YES
340 if you want to run
341 .Nm netstat Fl i .
342 .It Va daily_status_network_usedns
343 .Pq Vt bool
344 Set to
345 .Dq YES
346 if you want to run
347 .Xr netstat 1
348 without the
349 .Fl n
350 option (to do DNS lookups).
351 .It Va daily_status_rwho_enable
352 .Pq Vt bool
353 Set to
354 .Dq YES
355 if you want to run
356 .Xr uptime 1
357 (or
358 .Xr ruptime 1
359 if
360 .Va rwhod_enable
361 is set to
362 .Dq YES
363 in
364 .Pa /etc/rc.conf ) .
365 .It Va daily_status_mailq_enable
366 .Pq Vt bool
367 Set to
368 .Dq YES
369 if you want to run
370 .Xr mailq 1 .
371 .It Va daily_status_mailq_shorten
372 .Pq Vt bool
373 Set to
374 .Dq YES
375 if you want to shorten the
376 .Xr mailq 1
377 output when
378 .Va daily_status_mailq_enable
379 is set to
380 .Dq YES .
381 .It Va daily_status_include_submit_mailq
382 .Pq Vt bool
383 Set to
384 .Dq YES
385 if you also want to run
386 .Xr mailq 1
387 on the submit mail queue when
388 .Va daily_status_mailq_enable
389 is set to
390 .Dq YES .
391 This may not work with MTAs other than
392 .Xr sendmail 8 .
393 .It Va daily_status_security_enable
394 .Pq Vt bool
395 Set to
396 .Dq YES
397 if you want to run the security check.
398 The security check is another set of
399 .Xr periodic 8
400 scripts.
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 .
405 See the
406 .Xr periodic 8
407 manual page for more information.
408 .It Va daily_status_security_inline
409 .Pq Vt bool
410 Set to
411 .Dq YES
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
416 .Pq Vt str
417 Where to send the output of the security check if
418 .Va daily_status_security_inline
419 is set to
420 .Dq NO .
421 This variable behaves in the same way as the
422 .Va *_output
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
426 .Pq Vt str
427 Set to the arguments to pass to the
428 .Xr diff 1
429 utility when generating differences.
430 The default is
431 .Fl b u .
432 .It Va daily_status_security_chksetuid_enable
433 .Pq Vt bool
434 Set to
435 .Dq YES
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
439 .Pq Vt bool
440 Set to
441 .Dq YES
442 to check for changes mounted file systems to the previous day's values.
443 .It Va daily_status_security_noamd
444 .Pq Vt bool
445 Set to
446 .Dq YES
447 if you want to ignore
448 .Xr amd 8
449 mounts when comparing against yesterday's file system mounts in the
450 .Va daily_status_security_chkmounts_enable
451 check.
452 .It Va daily_status_security_chkuid0_enable
453 .Pq Vt bool
454 Set to
455 .Dq YES
456 to check
457 .Pa /etc/master.passwd
458 for accounts with uid 0.
459 .It Va daily_status_security_passwdless_enable
460 .Pq Vt bool
461 Set to
462 .Dq YES
463 to check
464 .Pa /etc/master.passwd
465 for accounts with empty passwords.
466 .It Va daily_status_security_ipfwdenied_enable
467 .Pq Vt bool
468 Set to
469 .Dq YES
470 to show log entries for packets denied by
471 .Xr ipfw 8
472 since yesterday's check.
473 .It Va daily_status_security_ipfdenied_enable
474 .Pq Vt bool
475 Set to
476 .Dq YES
477 to show log entries for packets denied by
478 .Xr ipf 8
479 since yesterday's check.
480 .It Va daily_status_security_pfdenied_enable
481 .Pq Vt bool
482 Set to
483 .Dq YES
484 to show log entries for packets denied by
485 .Xr pf 4
486 since yesterday's check.
487 .It Va daily_status_security_ipfwlimit_enable
488 .Pq Vt bool
489 Set to
490 .Dq YES
491 to display
492 .Xr ipfw 8
493 rules that have reached their verbosity limit.
494 .It Va daily_status_security_ip6fwdenied_enable
495 .Pq Vt bool
496 Set to
497 .Dq YES
498 to show log entries for packets denied by
499 .Xr ip6fw 8
500 since yesterday's check.
501 .It Va daily_status_security_ip6fwlimit_enable
502 .Pq Vt bool
503 Set to
504 .Dq YES
505 to display
506 .Xr ip6fw 8
507 rules that have reached their verbosity limit.
508 .It Va daily_status_security_kernelmsg_enable
509 .Pq Vt bool
510 Set to
511 .Dq YES
512 to show new
513 .Xr dmesg 8
514 entries since yesterday's check.
515 .It Va daily_status_security_loginfail_enable
516 .Pq Vt bool
517 Set to
518 .Dq YES
519 to display failed logins from
520 .Pa /var/log/messages
521 in the previous day.
522 .It Va daily_status_security_tcpwrap_enable
523 .Pq Vt bool
524 Set to
525 .Dq YES
526 to display connections denied by tcpwrappers (see
527 .Xr hosts_access 5 )
528 from
529 .Pa /var/log/messages
530 during the previous day.
531 .It Va daily_status_mail_rejects_enable
532 .Pq Vt bool
533 Set to
534 .Dq YES
535 if you want to summarise mail rejections logged to
536 .Pa /var/log/maillog
537 for the previous day.
538 .It Va daily_status_mail_rejects_logs
539 .Pq Vt num
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
543 .Pq Vt bool
544 Set to
545 .Dq YES
546 if you want to summarise denied zone transfers (AXFR and IXFR)
547 for the previous day.
548 .It Va daily_status_named_usedns
549 .Pq Vt bool
550 Set to
551 .Dq YES
552 if you want to enable reverse DNS lookups.
553 .It Va daily_queuerun_enable
554 .Pq Vt bool
555 Set to
556 .Dq YES
557 if you want to manually run the mail queue at least once a day.
558 .It Va daily_submit_queuerun
559 .Pq Vt bool
560 Set to
561 .Dq YES
562 if you also want to manually run the submit mail queue at least once a day
563 when
564 .Va daily_queuerun_enable
565 is set to
566 .Dq YES .
567 .It Va daily_local
568 .Pq Vt str
569 Set to a list of extra scripts that should be run after all other
570 daily scripts.
571 All scripts must be absolute path names.
572 .El
573 .Pp
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
578 .Pq Vt bool
579 Set to
580 .Dq YES
581 if you want to purge old
582 .Pa /var/db/kvm_*.db
583 files.
584 The kvm file for the current kernel will not be purged.
585 .It Va weekly_clean_kvmdb_days
586 .Pq Vt num
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
590 .Pq Vt bool
591 Set to
592 .Dq YES
593 if you want the removed files to be reported in your weekly output.
594 .It Va weekly_locate_enable
595 .Pq Vt bool
596 Set to
597 .Dq YES
598 if you want to run
599 .Pa /usr/libexec/locate.updatedb .
600 This script is run using
601 .Nm nice Fl 5
602 as user
603 .An nobody ,
604 and generates the table used by the
605 .Xr locate 1
606 command.
607 .It Va weekly_whatis_enable
608 .Pq Vt bool
609 Set to
610 .Dq YES
611 if you want to run
612 .Pa /usr/libexec/makewhatis.local .
613 This script regenerates the database used by the
614 .Xr apropos 1
615 command.
616 .It Va weekly_catman_enable
617 .Pq Vt bool
618 Set to
619 .Dq YES
620 if you want to run
621 .Pa /usr/libexec/catman.local .
622 This script processes all out of date manual pages, speeding up the
623 .Xr man 1
624 command at the expense of disk space.
625 .It Va weekly_noid_enable
626 .Pq Vt bool
627 Set to
628 .Dq YES
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
632 .Pq Vt str
633 A list of directories under which orphaned files are searched for.
634 This would usually be set to
635 .Pa / .
636 .It Va weekly_status_pkg_enable
637 .Pq Vt bool
638 Set to
639 .Dq YES
640 if you want to use
641 .Xr pkg_version 1
642 to list installed packages which are out of date.
643 .It Va pkg_version
644 .Pq Vt string
645 When
646 .Va weekly_status_pkg_enable
647 is set to
648 .Dq YES ,
649 this variable specifies the program that is used to determine the out of
650 date packages.
651 If unset, the
652 .Xr pkg_version 1
653 program is used.
654 As an example, this variable might be set to
655 .Dq portversion
656 if the portupgrade port has been installed.
657 .It Va pkg_version_index
658 .Pq Vt string
659 This variable specifies the
660 .Pa INDEX
661 file from
662 .Pa /usr/ports
663 that should be used by
664 .Xr pkg_version 1 .
665 Because the dependency tree may be substantially different between versions of
666 .Fx ,
667 there may be more than one
668 .Pa INDEX
669 file in
670 .Pa /usr/ports .
671 .Pp
672 Note, if the
673 .Va pkg_version
674 variable is set to
675 .Dq Li portversion ,
676 it will also be necessary to arrange that the correct
677 .Pa INDEX
678 file is specified
679 using environment variables and that
680 .Va pkg_version_index
681 is cleared in
682 .Pa /etc/periodic.conf
683 .Pq Dq Li pkg_version_index= .
684 .It Va weekly_local
685 .Pq Vt str
686 Set to a list of extra scripts that should be run after all other
687 weekly scripts.
688 All scripts must be absolute path names.
689 .El
690 .Pp
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
695 .Pq Vt bool
696 Set to
697 .Dq YES
698 if you want to do login accounting using the
699 .Xr ac 8
700 command.
701 .It Va monthly_local
702 .Pq Vt str
703 Set to a list of extra scripts that should be run after all other
704 monthly scripts.
705 All scripts must be absolute path names.
706 .El
707 .Sh FILES
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.
718 .El
719 .Sh SEE ALSO
720 .Xr apropos 1 ,
721 .Xr calendar 1 ,
722 .Xr df 1 ,
723 .Xr diff 1 ,
724 .Xr gzip 1 ,
725 .Xr locate 1 ,
726 .Xr man 1 ,
727 .Xr msgs 1 ,
728 .Xr netstat 1 ,
729 .Xr nice 1 ,
730 .Xr pkg_version 1 ,
731 .Xr rc.conf 5 ,
732 .Xr ac 8 ,
733 .Xr chkgrp 8 ,
734 .Xr dump 8 ,
735 .Xr newsyslog 8 ,
736 .Xr periodic 8 ,
737 .Xr sendmail 8
738 .Sh HISTORY
739 The
740 .Nm
741 file appeared in
742 .Fx 4.1 .
743 .Sh AUTHORS
744 .An Brian Somers Aq brian@Awfulhak.org .