Add option to remove old log files.

This commit is contained in:
Jonah Bernhard 2014-03-30 14:44:31 -04:00
parent 36f87c73f1
commit 9f5626bd19

View file

@ -730,6 +730,10 @@ echo -e "-------- END DUPLICITY-BACKUP SCRIPT --------\n" >> ${LOGFILE}
email_logfile
# remove old logfiles
# stops them from piling up infinitely
[[ -n "${REMOVE_LOGS_OLDER_THAN}" ]] && find ${LOGDIR} -type f -mtime +"${REMOVE_LOGS_OLDER_THAN}" -delete
if [ ${ECHO} ]; then
echo "TEST RUN ONLY: Check the logfile for command output."
fi