Ignore .backup directories that don't have anything in them
This commit is contained in:
parent
19908fea0b
commit
efd22958a3
@ -37,6 +37,7 @@ fi
|
||||
for dir in /home/*; do
|
||||
username="$(basename -- "$dir")"
|
||||
[ -d "$dir/.backup" ] || continue
|
||||
for file in "$dir/.backup/"*; do [ -e "$file" ] || continue; done
|
||||
tar czhf "$OUTDIR/desktop-$username-{{ inventory_hostname }}-$(date -Iseconds).tar.gz" "$dir/.backup/"*
|
||||
done
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user