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