bash scripts to automate database queries (message_reaper and reset_db)