Mercurial > hgrepos > FreeBSD > ports > sysutils > local-bsdtools
changeset 357:c559074302e0
Configure periodic scripts to log into logfiles instead of mails.
Also create all needed logfiles.
| author | Franz Glasner <hg@dom66.de> |
|---|---|
| date | Fri, 09 Dec 2022 17:05:36 +0100 |
| parents | 2ba1072103f1 |
| children | 80c781a59aa7 |
| files | sbin/fjail |
| diffstat | 1 files changed, 13 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/sbin/fjail Thu Dec 08 09:55:12 2022 +0100 +++ b/sbin/fjail Fri Dec 09 17:05:36 2022 +0100 @@ -497,13 +497,25 @@ _pcl="${_mp}/etc/periodic.conf.local" if [ ! -f "${_pcl}" ]; then echo "Adjusting periodic.conf.local" - echo "daily_ntpd_leapfile_enable=\"NO\"" > "${_pcl}" + echo "Periodic script log into files ..." + echo "daily_output=\"/var/log/daily.log\"" > "${_pcl}" + echo "weekly_output=\"/var/log/weekly.log\"" >> "${_pcl}" + echo "weekly_output=\"/var/log/weekly.log\"" >> "${_pcl}" + echo "monthly_output=\"/var/log/monthly.log\"" >> "${_pcl}" + echo "daily_status_security_output=\"/var/log/security\"" >> "${_pcl}" + echo "weekly_status_security_output=\"/var/log/security\"" >> "${_pcl}" + echo "monthly_status_security_output=\"/var/log/security\"" >> "${_pcl}" + echo "Disable some scripts that are enabled by default ..." + echo "daily_ntpd_leapfile_enable=\"NO\"" >> "${_pcl}" echo "daily_status_zfs_zpool_list_enable=\"NO\"" >> "${_pcl}" echo "daily_status_disks_enable=\"NO\"" >> "${_pcl}" echo "daily_status_uptime_enable=\"NO\"" >> "${_pcl}" echo "security_status_chkmounts_enable=\"NO\"" >> "${_pcl}" + echo "Creating system logfiles that are marked for creation ..." + chroot "${_mp}" /usr/sbin/newsyslog -CN + else echo "WARNING: \"${_pcl}\" exists already -- not changed" fi
