The following changes were made:
* rsyslog now depends on logrotate * package now installs a logrotate config for rsyslog (via usher)
This commit is contained in:
37
SNAP/rsyslog.logrotate
Normal file
37
SNAP/rsyslog.logrotate
Normal file
@@ -0,0 +1,37 @@
|
||||
/var/log/syslog
|
||||
{
|
||||
rotate 7
|
||||
daily
|
||||
missingok
|
||||
notifempty
|
||||
delaycompress
|
||||
compress
|
||||
postrotate
|
||||
invoke-rc.d rsyslog rotate > /dev/null
|
||||
endscript
|
||||
}
|
||||
|
||||
/var/log/mail.info
|
||||
/var/log/mail.warn
|
||||
/var/log/mail.err
|
||||
/var/log/mail.log
|
||||
/var/log/daemon.log
|
||||
/var/log/kern.log
|
||||
/var/log/auth.log
|
||||
/var/log/user.log
|
||||
/var/log/lpr.log
|
||||
/var/log/cron.log
|
||||
/var/log/debug
|
||||
/var/log/messages
|
||||
{
|
||||
rotate 4
|
||||
weekly
|
||||
missingok
|
||||
notifempty
|
||||
compress
|
||||
delaycompress
|
||||
sharedscripts
|
||||
postrotate
|
||||
invoke-rc.d rsyslog rotate > /dev/null
|
||||
endscript
|
||||
}
|
||||
@@ -11,6 +11,10 @@ case $1 in
|
||||
cp /usr/share/rsyslog/rsyslog.conf /etc/rsyslog.conf
|
||||
fi
|
||||
|
||||
if [ ! -f /etc/logrotate.d/rsyslog ]; then
|
||||
cp /usr/share/rsyslog/rsyslog.logrotate /etc/logrotate.d/rsyslog
|
||||
fi
|
||||
|
||||
/etc/init.d/rsyslog status 2>&1 > /dev/null && /etc/init.d/rsyslog restart
|
||||
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user