Fix permission errors and variable scope issues
This commit is contained in:
parent
d5bc2a9d0d
commit
ecaca99b8f
1 changed files with 2 additions and 2 deletions
|
|
@ -209,7 +209,7 @@ cleanup_old_backups() {
|
|||
local keep_versions=$2
|
||||
|
||||
log "Cleaning up old backup directories (keeping $keep_versions)"
|
||||
find "$path/backups" -maxdepth 1 -type d -name "backup-*" | sort -r | tail -n +$((keep_versions + 1)) | xargs -r rm -rf
|
||||
find "$path/backups" -maxdepth 1 -type d -name "backup-*" 2>/dev/null | sort -r | tail -n +$((keep_versions + 1)) | xargs -r rm -rf
|
||||
}
|
||||
|
||||
# Function to send webhook notification
|
||||
|
|
@ -321,7 +321,7 @@ process_stack() {
|
|||
fi
|
||||
|
||||
# Ensure lock is released on exit
|
||||
trap 'release_lock "$lock_file"' EXIT
|
||||
trap 'release_lock "'"$lock_file"'"' EXIT
|
||||
|
||||
log "Processing stack $name"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue