Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- that's because the script is borked. If condition with -e (exists) arg is not setup correctly for wildcard searching when there is more than 1 result.
- Change the lines from:
- touch purgelist
- if [[ -e $BKUP_PATH/$WORLD/*-incr.tgz ]]; then
- find $WORLD/*-incr.tgz -type f -mtime +$BKUP_DAYS_INCR -print > purgelist
- fi
- if [[ -e $BKUP_PATH/$WORLD/*-full.tgz ]]; then
- find $WORLD/*-full.tgz -type f -mtime +$BKUP_DAYS_FULL -print >> purgelist
- fi
- to:
- touch purgelist
- if [[ -e `echo $BKUP_PATH/$WORLD/*-incr.tgz | cut -d " " -f1` ]]; then
- find $WORLD/*-incr.tgz -type f -mtime +$BKUP_DAYS_INCR -print > purgelist
- fi
- if [[ -e `echo $BKUP_PATH/$WORLD/*-full.tgz | cut -d " " -f1` ]]; then
- find $WORLD/*-full.tgz -type f -mtime +$BKUP_DAYS_FULL -print >> purgelist
- fi
Add Comment
Please, Sign In to add comment