|
| logrotate problem Fra : Søren Reinke |
Dato : 22-05-03 13:55 |
|
Hejsa
jeg har følgende conf fil til logrotate:
/srv/*/log/access.log {
compress
dateext
maxage 365
rotate 99
size=+4096k
notifempty
missingok
create 644 root root
postrotate
/etc/init.d/apache reload
endscript
}
Som tager alle mine domæner og pakker logfilerne.
Men hvis der er 3 domæner hvis fil er blevet for stor, genstarter den apache
3 gange, hvordan sikre jeg mig at den kun gør det 1 gang ?
--
Med venlig hilsen
Søren Reinke Rescue Diver Fjern ihsyd fra email
http://www.dykkercenterlangeland.dk
Danmarks hyggeligste Pinse Træf 6-9 Juni
| |
Kim Hansen (22-05-2003)
| Kommentar Fra : Kim Hansen |
Dato : 22-05-03 15:30 |
|
"Søren Reinke" <disky@disky.ihsyd.dk> writes:
> Men hvis der er 3 domæner hvis fil er blevet for stor, genstarter den apache
> 3 gange, hvordan sikre jeg mig at den kun gør det 1 gang ?
Fra logrotate(8):
sharedscripts
Normally, prerotate and postrotate scripts are run
for each log which is rotated, meaning that a sin
gle script may be run multiple times for log file
entries which match multiple files (such as the
/var/log/news/* example). If sharedscript is speci
fied, the scripts are only run once, no matter how
many logs match the wildcarded pattern. A side
effect of this option is that the scripts are
always executed, even if no logs are rotated. If
this directive is not specified, the scripts are
run only if logs are actually rotated. This over
rides the nosharedscripts option.
--
Kim Hansen | |\ _,,,---,,_ | Det er ikke
Dalslandsgade 8, A708 | /,`.-´` -. ;:-. | Jeopardy.
2300 København S | |,4- ) )-,_. ,\ ( `'-' | Svar _efter_
Tlf: 32 88 60 86 | '---''(_/--' `-'\_) | spørgsmålet.
| |
Søren Reinke (22-05-2003)
| Kommentar Fra : Søren Reinke |
Dato : 22-05-03 17:06 |
|
Kim Hansen wrote:
> "Søren Reinke" <disky@disky.ihsyd.dk> writes:
>
>> Men hvis der er 3 domæner hvis fil er blevet for stor, genstarter
>> den apache 3 gange, hvordan sikre jeg mig at den kun gør det 1 gang ?
>
> Fra logrotate(8):
>
> sharedscripts
> Normally, prerotate and postrotate scripts are run
> for each log which is rotated, meaning that a sin
> gle script may be run multiple times for log file
> entries which match multiple files (such as the
> /var/log/news/* example). If sharedscript is speci
> fied, the scripts are only run once, no matter how
> many logs match the wildcarded pattern. A side
> effect of this option is that the scripts are
> always executed, even if no logs are rotated. If
> this directive is not specified, the scripts are
> run only if logs are actually rotated. This over
> rides the nosharedscripts option.
Lol,. den havde jeg ellers overset :)
Mange tak
Hilsen Søren
| |
|
|