diff --git a/ct/huntarr.sh b/ct/huntarr.sh index afb48d8..d951bfe 100644 --- a/ct/huntarr.sh +++ b/ct/huntarr.sh @@ -41,6 +41,12 @@ function update_script() { # Creating Backup msg_info "Creating Backup" + # Remove any existing backups + if ls /opt/${APP}_backup_*.tar.gz &>/dev/null; then + rm -f /opt/${APP}_backup_*.tar.gz + msg_info "Removed previous backup" + fi + # Create new backup tar -czf "/opt/${APP}_backup_$(date +%F).tar.gz" /opt/huntarr msg_ok "Backup Created"