mirror of
https://github.com/buildplan/du_setup.git
synced 2025-12-23 12:45:30 +00:00
fix trap for ssh key
This commit is contained in:
parent
c8bfd9c123
commit
f1f47f7ce2
@ -1532,8 +1532,10 @@ setup_user() {
|
|||||||
printf '\n'
|
printf '\n'
|
||||||
printf '%s\n' "${PURPLE}ℹ The private key file ($TEMP_KEY_FILE) will be deleted after this step.${NC}"
|
printf '%s\n' "${PURPLE}ℹ The private key file ($TEMP_KEY_FILE) will be deleted after this step.${NC}"
|
||||||
read -rp "$(printf '%s' "${CYAN}Press Enter after you have saved the keys securely...${NC}")"
|
read -rp "$(printf '%s' "${CYAN}Press Enter after you have saved the keys securely...${NC}")"
|
||||||
|
rm -f "$TEMP_KEY_FILE" 2>/dev/null
|
||||||
print_info "Temporary key file deleted."
|
print_info "Temporary key file deleted."
|
||||||
LOCAL_KEY_ADDED=true
|
LOCAL_KEY_ADDED=true
|
||||||
|
trap - EXIT
|
||||||
fi
|
fi
|
||||||
print_success "User '$USERNAME' created."
|
print_success "User '$USERNAME' created."
|
||||||
echo "$USERNAME" > /root/.du_setup_managed_user
|
echo "$USERNAME" > /root/.du_setup_managed_user
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user