diff --git a/lib/restore.sh b/lib/restore.sh index da838b7..5add19e 100644 --- a/lib/restore.sh +++ b/lib/restore.sh @@ -131,11 +131,14 @@ restore_full_account() { # Terminate existing account if requested if [[ "$terminate" == "true" ]] && account_exists "$user"; then log_info "Terminating existing account $user before restore..." - if ! /scripts/removeacct --force "$user"; then + local removeacct_output + if ! removeacct_output=$(/scripts/removeacct "$user" --force 2>&1); then log_error "Failed to terminate account $user" + log_debug "removeacct output: $removeacct_output" rm -rf "$restore_dir" return 1 fi + log_debug "removeacct output: $removeacct_output" fi # Run restorepkg (--force to merge into existing account if present)