- oldestbackup=$(grepbackups | head -1)
- oldestbackuptstamp=$(echo $oldestbackup | cut -d'-' -f1)
-
- if [ $oldestbackuptstamp -lt $(( $(date +%s) - $ARCHIVE_KEEPNDAYS*60*60*24 )) ]; then
- scottyinfo "Removing old backup $oldestbackup."
- ssh255 $REMOTE_HOST rm -r "$REMOTE_DIR/$oldestbackup"
- else
- break
- fi
+ oldestbackup=$(grepbackups | head -1)
+ oldestbackuptstamp=$(echo $oldestbackup | cut -d'-' -f1)
+
+ if [ $oldestbackuptstamp -lt $(( $(date +%s) - $ARCHIVE_KEEPNDAYS*60*60*24 )) ]; then
+ scottyinfo "Removing old backup $oldestbackup."
+ ssh255 $REMOTE_HOST rm -r "$REMOTE_DIR/$oldestbackup"
+ else
+ break
+ fi