/var/log/mmdvm/MMDVM_Bridge.log
{
        firstaction
                # $1 = the full path to the log file is passed to this script
                # The path contains ".log" and a trailing space, so strip it.
                parameter=$1
                parameter="${parameter%%.*}"
                today=$(date +"%Y-%m-%d")
                filename=$parameter-$today.log
                echo $filename $1 >/tmp/out.txt
                if [ -f "$filename" ]; then
                mv $filename $1
                fi
        endscript
        daily
        rotate 7
        maxage 7
        dateext
        dateformat -%Y-%m-%d
        extension .log
        ifempty
        create
        postrotate
                systemctl reload mmdvm_bridge
        endscript
}
 
