mirror of
https://github.com/flatcar/scripts.git
synced 2025-11-29 22:42:10 +01:00
app-admin/logrotate: Apply Flatcar modifications
This commit is contained in:
parent
49bcee9ae7
commit
770a3a48d4
@ -1,13 +1,5 @@
|
|||||||
#
|
# keep only the most recent old log.
|
||||||
# Default logrotate(8) configuration file for Gentoo Linux.
|
rotate 1
|
||||||
# See "man logrotate" for details.
|
|
||||||
|
|
||||||
# rotate log files weekly.
|
|
||||||
weekly
|
|
||||||
#daily
|
|
||||||
|
|
||||||
# keep 4 weeks worth of backlogs.
|
|
||||||
rotate 4
|
|
||||||
|
|
||||||
# create new (empty) log files after rotating old ones.
|
# create new (empty) log files after rotating old ones.
|
||||||
create
|
create
|
||||||
@ -18,25 +10,20 @@ dateext
|
|||||||
# compress rotated log files.
|
# compress rotated log files.
|
||||||
compress
|
compress
|
||||||
|
|
||||||
|
missingok
|
||||||
notifempty
|
notifempty
|
||||||
nomail
|
nomail
|
||||||
noolddir
|
noolddir
|
||||||
|
|
||||||
# packages can drop log rotation information into this directory.
|
# accept user provided configuration files in /etc.
|
||||||
include /etc/logrotate.d
|
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 {
|
/var/log/wtmp {
|
||||||
monthly
|
|
||||||
create 0664 root utmp
|
create 0664 root utmp
|
||||||
minsize 1M
|
size 1M
|
||||||
rotate 1
|
|
||||||
}
|
}
|
||||||
/var/log/btmp {
|
/var/log/btmp {
|
||||||
missingok
|
|
||||||
monthly
|
|
||||||
create 0600 root utmp
|
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 /var/lib/misc
|
||||||
|
d /etc/logrotate.d - - - - -
|
||||||
|
|||||||
@ -70,6 +70,7 @@ src_install() {
|
|||||||
use cron && install_cron_file
|
use cron && install_cron_file
|
||||||
|
|
||||||
systemd_dounit examples/logrotate.{service,timer}
|
systemd_dounit examples/logrotate.{service,timer}
|
||||||
|
systemd_enable_service multi-user.target logrotate.timer
|
||||||
newtmpfiles "${FILESDIR}"/${PN}.tmpfiles ${PN}.conf
|
newtmpfiles "${FILESDIR}"/${PN}.tmpfiles ${PN}.conf
|
||||||
|
|
||||||
keepdir /etc/logrotate.d
|
keepdir /etc/logrotate.d
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user