/opt/SIA/log/siacore.log {
    missingok
    notifempty
    compress
    size 10M
    copytruncate
    dateext
    dateformat -%s
    su mmtec mmtec
    # do not logrotate during service mode
    prerotate
    	/opt/SIA/scripts/check_service_mode.sh
    endscript
    # restart SIA core to switch to the new log file
    postrotate
        systemctl restart siawatchdog
        systemctl restart siacore
    endscript
}
