logrotate a 'weekly' rezim

Kamil Kukura K.Kukura na unicom.cz
Úterý Květen 19 10:46:56 CEST 1998


Gabriel Svajko:
>On Mon, 18 May 1998, Kamil Kukura wrote:
>
>> Narazil jsem na mensi problem. Kdyz logrotate dela "weekly" rotaci logu,
tak
>> to dela presne v nedeli (asi proto ze americky tejden zacina v nedeli).
Da
>> se nejak donutit aby to delal v pondeli?
>zdar,
>
>na debiane :
># cat /etc/crontab
>..
># m h dom mon dow user  command
>47 6    * * 7   root    run-parts --report /etc/cron.weekly
>            ^ toto treba zmenit za 1-ku a scripty v adresari
/etc/cron.weekly
>              bude spustat v pondelok
>..


Diky snowmane, ale logrotate sa pusta prave v cron.daily. Az potom si to
rozhoduje kedy zacina tyzden. V logrotate(8) sa ale pise:

 weekly Log  files  are  rotated  if the current weekday is
              less then the weekday of the last  rotation  or  if
              more  then  a  week has passed since the last rota-
              tion. This is normally the same as rotating logs on
              the  first  day of the week, but it works better if
              logrotate is not run every night.

Asi to fakt chce hacknut v zdrojakoch aby dni to malo cislovane od pondelka.

Kamil





Další informace o konferenci Linux