Fix: Clean interrupted SSH candidates
This commit is contained in:
@@ -118,6 +118,13 @@ remove_ssh_artifact() {
|
||||
handle_ssh_transaction_signal() {
|
||||
local signal_status="$1"
|
||||
trap - INT TERM
|
||||
if [[ -n "$ssh_candidate" && -e "$ssh_candidate" ]]; then
|
||||
ssh_transaction_active=0
|
||||
restore_ssh_transaction_traps
|
||||
remove_ssh_artifact "$ssh_candidate" || true
|
||||
remove_ssh_artifact "$ssh_backup" || true
|
||||
exit "$signal_status"
|
||||
fi
|
||||
rollback_failed=0
|
||||
restore_ssh_dropin || rollback_failed=1
|
||||
sshd -t || rollback_failed=1
|
||||
|
||||
Reference in New Issue
Block a user