1.\" $NetBSD: daily.5,v 1.7 2020/12/02 14:18:13 wiz Exp $ 2.\" 3.\" Copyright (c) 1996 Matthew R. Green 4.\" All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 16.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 20.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 22.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 23.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25.\" SUCH DAMAGE. 26.\" 27.Dd December 2, 2020 28.Dt DAILY 5 29.Os 30.Sh NAME 31.Nm daily , 32.Nm daily.conf 33.Nd daily maintenance 34.Sh DESCRIPTION 35The 36.Pa /etc/daily 37script is run, by default, every night on a 38.Nx 39system. 40The 41.Pa /etc/daily.conf 42file specifies which of the standard 43.Nm 44services are performed. 45.Pp 46The variables described below can be set to 47.Dq YES 48or 49.Dq NO 50in the 51.Pa /etc/daily.conf 52file. 53Most default to 54.Dq YES , 55but not all. 56Check the 57.Pa /etc/defaults/daily.conf 58file if you are in doubt. 59(Note that you should never edit 60.Pa /etc/defaults/daily.conf 61directly, as it is often replaced during system upgrades.) 62.Bl -tag -width fetch_pkg_vulnerabilities 63.It Sy find_core 64This runs 65.Xr find 1 66over the entire local filesystem, looking for core files. 67.It Sy run_msgs 68This runs 69.Xr msgs 1 70with the 71.Fl c 72argument. 73.It Sy expire_news 74This runs the 75.Pa /etc/expire.news 76script. 77.It Sy purge_accounting 78This ages accounting files in 79.Pa /var/account . 80.It Sy run_calendar 81This runs 82.Xr calendar 1 83with the 84.Fl a 85argument. 86.It Sy check_disks 87This uses the 88.Xr df 1 89and 90.Xr dump 8 91to give disk status, and also reports failed 92.Xr raid 4 93components. 94.It Sy show_remote_fs 95In check_disks, show remote file systems, which are not reported on by 96default. 97.It Sy check_mailq 98This runs 99.Xr mailq 1 . 100.It Sy check_network 101This runs 102.Xr netstat 1 103with the 104.Fl i 105argument, and also checks the 106.Xr rwhod 8 107database, and runs 108.Xr ruptime 1 109if there are hosts in 110.Pa /var/rwho . 111.It Sy full_netstat 112By default, 113.Sy check_network 114outputs a summarized version of the 115.Xr netstat 1 116report. 117If a full version of the output run with the 118.Fl inv 119options is desired, set this variable. 120.It Sy run_fsck 121This runs 122.Xr fsck 8 123with the 124.Fl n 125option. 126.It Sy run_rdist 127This runs 128.Xr rdist 1 129with 130.Pa /etc/Distfile . 131.It Sy run_security 132This runs the 133.Pa /etc/security 134script looking for possible security problems with the system. 135.It Sy run_skeyaudit 136Runs the 137.Xr skeyaudit 1 138program to check the S/Key database and informs users of S/Keys that 139are about to expire. 140.It Sy run_makemandb 141If the 142.Pa /etc/man.conf 143file exists, runs the 144.Xr makemandb 8 145utility to update the 146.Pa man.db 147database for use by 148.Xr apropos 1 . 149.It Sy fetch_pkg_vulnerabilities 150Refreshes the local database of package vulnerabilities. 151See the settings in 152.Xr security.conf 5 153for details on the actual package checks. 154.El 155.Pp 156The variables described below can be set to modify the tests: 157.Bl -tag -width fetch_pkg_vulnerabilities 158.It Sy find_core_ignore_fstypes 159Lists filesystem types to ignore during the 160.Sy find_core 161phase. 162Prefixing the type with a 163.Sq \&! 164inverts the match. 165For example, 166.Ql procfs !local 167will ignore 168.Ql procfs 169type filesystems and filesystems that are not 170.Ql local . 171.It Sy find_core_ignore_paths 172Lists paths to ignore during the 173.Sy find_core 174phase. 175For example, 176.Ql Pa /export 177will not descend into any directories under the 178.Ql Pa /export 179hierarchy. 180This, on a file server, allows to skip 181user data while still scanning system files. 182.It Sy run_fsck_flags 183Extra options to be passed to 184.Xr fsck 8 185if 186.Sy run_fsck 187is enabled. 188.It Sy send_empty_security 189If set, the report generated by the 190.Sy run_security 191phase will always be sent, even if it is empty. 192.It Sy pkgdb_dir 193.Em DEPRECATED . 194Please set 195.Dv PKGDB_DIR 196in 197.Xr pkg_install.conf 5 198instead. 199.Pp 200If defined, points to the location of the packages database. 201Defaults to 202.Pa /usr/pkg/pkgdb . 203.El 204.Sh FILES 205.Bl -tag -width /etc/defaults/daily.conf -compact 206.It Pa /etc/daily 207daily maintenance script 208.It Pa /etc/daily.conf 209daily maintenance configuration 210.It Pa /etc/defaults/daily.conf 211default settings, overridden by 212.Pa /etc/daily.conf 213.It Pa /etc/daily.local 214local site additions to 215.Pa /etc/daily 216.El 217.Sh SEE ALSO 218.Xr monthly 5 , 219.Xr security.conf 5 , 220.Xr weekly 5 221.Sh HISTORY 222The 223.Pa /etc/daily.conf 224file appeared in 225.Nx 1.3 . 226