Portál AbcLinuxu, 25. října 2025 19:49
/var/log/apache2/*.log {
weekly
missingok
rotate 8
compress
delaycompress
notifempty
create 640 root adm
sharedscripts
postrotate
if [ -f /var/run/apache2.pid ]; then
/etc/init.d/apache2 restart > /dev/null
fi
endscript
Lze tedy nějak zařídit aby se patřičně pojmenované logy ukládaly do archivu? prerotate/endscript
The lines between prerotate and endscript (both of which must
appear on lines by themselves) are executed before the log file
is rotated and only if the log will actually be rotated. These
directives may only appear inside of a log file definition.
See postrotate as well.
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.