|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Log Rotation Problem (FreeBSD 5.4)
My logrotate is not recreating the original log file even though I have that set as the default.
Here is the config file: maillast mail root nomissingok ifempty nodelaycompress compress rotate 10 weekly include /usr/local/etc/logrotate.d /var/log/wtmp { monthly } When I force rotation the wtmp file (viewable via last) is replaced with wtmp.1.bz2. That part is good. What's not good is that the wtmp file is not recreated which means "last" does not work properly thereafter. I suppose as a post rotate command I can touch the.log but i would have to do that for each rotation entry which is a pain in the arse. Does anyone have a solution or any ideas? Does anyone know if there is a variable i can pass to the post rotate command (for instance: touch $this_file) that i can use as a global default which will recreate the appropriate log file for each rotation? |
|
#2
|
|||
|
|||
|
Add "create" to your default options.
![]() M.
__________________
-- Manuel Hirsch - Linux, FreeBSD, programming, administration articles, tutorials and more. |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > BSD Help > Log Rotation Problem (FreeBSD 5.4) |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|