-
Notifications
You must be signed in to change notification settings - Fork 37
fix: handle ssh-copy-id failure and support non-root initial accounts #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -71,7 +71,7 @@ run_script() { | |
| local tmp_script | ||
|
|
||
| tmp_script=$(mktemp) | ||
| trap 'rm -f "$tmp_script" "${_LANG_TMP:-}"' EXIT | ||
| trap 'rm -f "${tmp_script:-}" "${_LANG_TMP:-}"' EXIT | ||
|
||
|
|
||
| info "$(printf "$MSG_VPSKIT_DOWNLOADING" "$script_name")" | ||
|
|
||
|
|
@@ -112,7 +112,11 @@ run_script() { | |
|
|
||
| bash "$tmp_script" | ||
| rm -f "$tmp_script" | ||
| trap - EXIT | ||
| if [[ -n "${_LANG_TMP:-}" ]]; then | ||
| trap 'rm -f "${_LANG_TMP}"' EXIT | ||
| else | ||
| trap - EXIT | ||
| fi | ||
| } | ||
|
|
||
| # --- Detection si le script est execute en local --- | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
INITIAL_USERis prompted for the new-VPS flow but it isn't persisted to$LOCAL_STATE. If the setup is interrupted before the$USERNAMEaccount is created (or before key-based login for$USERNAMEworks), a later resume will go throughMODE=updateand only tries${USERNAME}@${VPS_IP}thenroot@${VPS_IP}—so VPSes with a non-root initial account and root login disabled can become non-resumable. Consider savingINITIAL_USERin the local state and including it as an additional SSH fallback in the update-mode connection test when$USERNAMEis not yet available.