Mercurial > hgrepos > FreeBSD > ports > sysutils > local-bsdtools
comparison sbin/fjail @ 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 | 673505e96cea |
| children | 80c781a59aa7 |
comparison
equal
deleted
inserted
replaced
| 356:2ba1072103f1 | 357:c559074302e0 |
|---|---|
| 495 chroot "${_mp}" /usr/bin/newaliases | 495 chroot "${_mp}" /usr/bin/newaliases |
| 496 | 496 |
| 497 _pcl="${_mp}/etc/periodic.conf.local" | 497 _pcl="${_mp}/etc/periodic.conf.local" |
| 498 if [ ! -f "${_pcl}" ]; then | 498 if [ ! -f "${_pcl}" ]; then |
| 499 echo "Adjusting periodic.conf.local" | 499 echo "Adjusting periodic.conf.local" |
| 500 echo "daily_ntpd_leapfile_enable=\"NO\"" > "${_pcl}" | 500 echo "Periodic script log into files ..." |
| 501 echo "daily_output=\"/var/log/daily.log\"" > "${_pcl}" | |
| 502 echo "weekly_output=\"/var/log/weekly.log\"" >> "${_pcl}" | |
| 503 echo "weekly_output=\"/var/log/weekly.log\"" >> "${_pcl}" | |
| 504 echo "monthly_output=\"/var/log/monthly.log\"" >> "${_pcl}" | |
| 505 echo "daily_status_security_output=\"/var/log/security\"" >> "${_pcl}" | |
| 506 echo "weekly_status_security_output=\"/var/log/security\"" >> "${_pcl}" | |
| 507 echo "monthly_status_security_output=\"/var/log/security\"" >> "${_pcl}" | |
| 508 echo "Disable some scripts that are enabled by default ..." | |
| 509 echo "daily_ntpd_leapfile_enable=\"NO\"" >> "${_pcl}" | |
| 501 echo "daily_status_zfs_zpool_list_enable=\"NO\"" >> "${_pcl}" | 510 echo "daily_status_zfs_zpool_list_enable=\"NO\"" >> "${_pcl}" |
| 502 echo "daily_status_disks_enable=\"NO\"" >> "${_pcl}" | 511 echo "daily_status_disks_enable=\"NO\"" >> "${_pcl}" |
| 503 echo "daily_status_uptime_enable=\"NO\"" >> "${_pcl}" | 512 echo "daily_status_uptime_enable=\"NO\"" >> "${_pcl}" |
| 504 | 513 |
| 505 echo "security_status_chkmounts_enable=\"NO\"" >> "${_pcl}" | 514 echo "security_status_chkmounts_enable=\"NO\"" >> "${_pcl}" |
| 515 | |
| 516 echo "Creating system logfiles that are marked for creation ..." | |
| 517 chroot "${_mp}" /usr/sbin/newsyslog -CN | |
| 506 | 518 |
| 507 else | 519 else |
| 508 echo "WARNING: \"${_pcl}\" exists already -- not changed" | 520 echo "WARNING: \"${_pcl}\" exists already -- not changed" |
| 509 fi | 521 fi |
| 510 | 522 |
