Re: Analog_Bridge log files


Steve N4IRS
 
Edited

For any of the auto rotated file, here is my first shot:
touch /var/log/mmdvm/MMDVM_Bridge.log

Add this to MMDVM_Bridge in /etc/logrotate.d

/var/log/mmdvm/MMDVM_Bridge.log
{
daily
rotate 30
maxage 30
dateext
dateformat -%Y-%m-%d
extension .log
ifempty
create

firstaction
today=$(date +"%Y-%m-%d")
filename="/var/log/mmdvm/MMDVM_Bridge-$today.log"
if [ -f "$filename" ]; then
mv /var/log/mmdvm/MMDVM_Bridge-$today.log /var/log/mmdvm/MMDVM_Bridge.log
fi
endscript

}


There are a number of other ways to do this but I like this one so far.
Mike and I will discuss "releasing the AB.log" (if it's even needed)

Steve N4IRS

On 4/23/2020 9:51 PM, Richard (Joseph) VE2DJE wrote:
I am running 2 instances of  Analog_Bridge and  MMDVM_Bridge on  a Debian9   VPS server installation.

They have their own log file  .

All log files are  are running OK  but  size of Analog_Bridge.log and number  of files  for MMDVM_Bridge-2020-mm-dd.log  are getting out of hand .

Can   anyone tell me if there is  some logrotate files  avalable to put in /etc/logrotate.d  to  clean up these  log files.



Thanks  Richard VE2DJE




Join main@DVSwitch.groups.io to automatically receive all group messages.