/var/log/ipnetwork-agent/agent.log {
  rotate 1
  su ipnetwork-agent ipnetwork-agent
  size 2M
  missingok
  nocreate
  nocompress
  prerotate
        systemctl --quiet is-active ipnetwork-monitor-agent && systemctl kill -s USR1 ipnetwork-monitor-agent && sleep 1 || true
  endscript
  postrotate
        systemctl --quiet is-active ipnetwork-monitor-agent && systemctl kill -s USR2 ipnetwork-monitor-agent || true
  endscript
}
