mirror of
https://github.com/flatcar/scripts.git
synced 2025-11-28 22:12:10 +01:00
app-admin/logrotate: Apply Flatcar modifications
This commit is contained in:
parent
49bcee9ae7
commit
770a3a48d4
@ -1,13 +1,5 @@
|
||||
#
|
||||
# Default logrotate(8) configuration file for Gentoo Linux.
|
||||
# See "man logrotate" for details.
|
||||
|
||||
# rotate log files weekly.
|
||||
weekly
|
||||
#daily
|
||||
|
||||
# keep 4 weeks worth of backlogs.
|
||||
rotate 4
|
||||
# keep only the most recent old log.
|
||||
rotate 1
|
||||
|
||||
# create new (empty) log files after rotating old ones.
|
||||
create
|
||||
@ -18,25 +10,20 @@ dateext
|
||||
# compress rotated log files.
|
||||
compress
|
||||
|
||||
missingok
|
||||
notifempty
|
||||
nomail
|
||||
noolddir
|
||||
|
||||
# packages can drop log rotation information into this directory.
|
||||
# accept user provided configuration files in /etc.
|
||||
include /etc/logrotate.d
|
||||
|
||||
# no packages own wtmp and btmp -- we'll rotate them here.
|
||||
# must match creation rules in /usr/lib/tmpfiles.d/var.conf
|
||||
/var/log/wtmp {
|
||||
monthly
|
||||
create 0664 root utmp
|
||||
minsize 1M
|
||||
rotate 1
|
||||
size 1M
|
||||
}
|
||||
/var/log/btmp {
|
||||
missingok
|
||||
monthly
|
||||
create 0600 root utmp
|
||||
rotate 1
|
||||
size 1M
|
||||
}
|
||||
|
||||
# system-specific logs may also be configured here.
|
||||
|
||||
5
sdk_container/src/third_party/coreos-overlay/app-admin/logrotate/files/logrotate.service
vendored
Normal file
5
sdk_container/src/third_party/coreos-overlay/app-admin/logrotate/files/logrotate.service
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
[Unit]
|
||||
Description=Rotate and Compress System Logs
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/sbin/logrotate /usr/share/logrotate/logrotate.conf
|
||||
@ -1 +1,2 @@
|
||||
d /var/lib/misc
|
||||
d /etc/logrotate.d - - - - -
|
||||
|
||||
@ -70,6 +70,7 @@ src_install() {
|
||||
use cron && install_cron_file
|
||||
|
||||
systemd_dounit examples/logrotate.{service,timer}
|
||||
systemd_enable_service multi-user.target logrotate.timer
|
||||
newtmpfiles "${FILESDIR}"/${PN}.tmpfiles ${PN}.conf
|
||||
|
||||
keepdir /etc/logrotate.d
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user