Thanks a lot! it works fine!
As in rsyslog logrotate conf file there are many rules, I used this
syntax to retrieve the correct rule instead to define rule index manually:
augtool> print /files/etc/logrotate.d/rsyslog/rule[file =~
regexp("/var/log/mail.*")]/file[. =~ regexp("/var/log/mail.*")
On 08/05/12 09:26, Luke Bigum wrote:
> Theoretically you should be able to do this:
>
> augtool> print /files/etc/logrotate.d/syslog/rule/file[. =~
> regexp("/var/log/mail")]
>
> ... but I can't get the Regular Expression function to work in augtool :-(
Very nearly. Try this:
augtool> print /
Theoretically you should be able to do this:
augtool> print /files/etc/logrotate.d/syslog/rule/file[. =~
regexp("/var/log/mail")]
... but I can't get the Regular Expression function to work in augtool :-(
You could match each one, considering you know the names of each Syslog
Level:
augtoo
Hi all,
I have to modify logrotate conf file for rsyslog with augeas.
I have this configuration:
/var/log/syslog
{
rotate 7
daily
missingok
notifempty
delaycompress
compress
postrotate
reload rsyslog >/dev/null 2>&1 || true
endscript
}
/var/log/mail.info