View | Details | Raw Unified | Return to bug 38554 | Differences between
and this patch

Collapse All | Expand All

(-)ucs-4.2-2/base/univention-lib/shell/backup.sh (-1 / +1 lines)
 Lines 46-52    Link Here 
46
	local max_age="${arg_max_age:-$backup_clean_max_age}"
46
	local max_age="${arg_max_age:-$backup_clean_max_age}"
47
47
48
	if [ -n "$max_age" ]; then
48
	if [ -n "$max_age" ]; then
49
		echo find "$backup_dir" -type f -mtime "+$max_age" -regex "$pattern"
49
		echo "find '$backup_dir' -type f -mtime '+$max_age' -regex '$pattern'"
50
		local count=$(find "$backup_dir" -type f -mtime "+$max_age" -regex "$pattern" | wc -l)
50
		local count=$(find "$backup_dir" -type f -mtime "+$max_age" -regex "$pattern" | wc -l)
51
		if [ "$count" -ge "${backup_clean_min_backups:-10}" ]; then
51
		if [ "$count" -ge "${backup_clean_min_backups:-10}" ]; then
52
				find "$backup_dir" -type f -mtime "+$max_age" -regex "$pattern" -delete
52
				find "$backup_dir" -type f -mtime "+$max_age" -regex "$pattern" -delete

Return to bug 38554