function rotatereports() {
# Do not rotate while it might receive data
if lockfile -r -1 ${LOCK_UNCHECKED} 2> /dev/null; then
function rotatereports() {
# Do not rotate while it might receive data
if lockfile -r -1 ${LOCK_UNCHECKED} 2> /dev/null; then