Closed borpin closed 1 year ago
Also fixes #152 and https://github.com/openenergymonitor/EmonScripts/issues/6
Thanks @borpin I haven't tested this yet but assume this is working ok for you there? thanks for looking into this
@borpin : sure you dont need copytruncate for emonhub ? it is the only way when some programs cannot be told to close its logfile and thus might continue writing (appending) to the previous log file forever, ie nowhere
sure you dont need copytruncate for emonhub ?
Have you read through #155 That should explain the package changes.
Thanks @borpin I haven't tested this yet but assume this is working ok for you there? thanks for looking into this
Yes working for me and removes the errors.
sure you dont need copytruncate for emonhub ?
Have you read through #155 That should explain the package changes.
Yes I read it but cannot understand through my readings why you dont need copytruncate for emonhub as it will not close its log unless something internal has been implemented into emonhub which I do not have knowledge what I understood perfectly is that copytruncate and renamecopy options cannot work together.
I'm sure I came across something somewhere that said you could not use copytruncate' if
olddir` was pointing to a different partition or device. I cannot find it again so I think I may have been wrong in that.
Looking at man, I think I may have misread this (or I found an old man page)
I am also sure I was getting an error with copytruncate
.
Yes, I was - from #155
error: emoncms:6 olddir /var/log.old/emoncms and log file /var/log/emoncms/apache2-error.log are on different devices
I'll rebuild an SD card and test.
Ok, so in the log2ram
config it has the renamecopy
.
However, this should probably be in the main logrotate
files as well.
I'm not sure though, if this will conflict with old systems!
Modify the logrotate commands to ensure all logs get rotated to the SD card by log2ram.
Changes as well because of changes to Logrotate itself.
155 refers