Fixes #3516 - Use -delete instead of -exec

This commit is contained in:
Lorenzo Milesi 2021-04-20 08:02:33 +02:00 committed by Bola Ahmed Buari
parent 3baec9c606
commit 3d86eb8543
No known key found for this signature in database
GPG key ID: 69F689AC67133AFC

View file

@ -16,7 +16,7 @@ function get_backup_date () {
}
function delete_old_backups () {
test -d ${BACKUP_DIR} && find ${BACKUP_DIR}/*_zammad_*.gz -type f -mtime +${HOLD_DAYS} -exec rm {} \;
test -d ${BACKUP_DIR} && find ${BACKUP_DIR}/*_zammad_*.gz -type f -mtime +${HOLD_DAYS} -delete
}
function get_db_credentials () {