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