#!/bin/sh # Because of the way find works, this will actually add a day to the archive MAX_AGE='+30' # Archive the current data /usr/bin/arm4_control archive # Remove older archives find /var/lib/arm4/data/backup -ctime $MAX_AGE -exec rm -rf {} \; > /dev/null 2>&1