#!/bin/bash

log='/var/log/purge_domlogs.log'
single_home='/home/apachelogs'
multi_home='/home1/apachelogs'

echo "Beginning purge domlogs $(date)" &>> ${log}
if [ -d ${multi_home} ]; then
   find ${multi_home} -maxdepth 2 -mtime +365 -print -delete &>> ${log}
elif [ -d ${single_home} ]; then
  find ${single_home} -maxdepth 2 -mtime +365 -print -delete &>> ${log}
fi
