From 6829facb00391d1d73f7c3956cf187698fe42c26 Mon Sep 17 00:00:00 2001 From: zaphod-black Date: Sat, 1 Nov 2025 23:16:30 -0500 Subject: [PATCH] UX: Add confirmation prompt before PBS client installation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Improved the installation flow to be more explicit and user-friendly when PBS client is not installed on the system. BEFORE: - Script immediately started installing - No clear indication of what would happen - User couldn't cancel AFTER: - Clear message: "Proxmox Backup Client is not installed" - Shows 3-step plan: 1. Install Proxmox Backup Client 2. Configure your first backup target 3. Set up automated backups - Asks for confirmation: "Do you want to proceed?" - User can cancel by entering anything other than "yes" - Clear progress messages after each step FLOW: 1. Detect PBS not installed 2. Show what will happen 3. Ask for confirmation 4. Install (if confirmed) 5. Configure first target 6. Exit The script already correctly skips the multi-target menu when PBS is not installed - this change just makes the flow more explicit and gives users control over whether to proceed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- CHANGELOG.md | 7 +++++++ pbs-client-installer.sh | 18 +++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 38886fb..12f2db0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -129,6 +129,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Runs in subshell to avoid environment pollution ### Changed +- **Clearer installation flow when PBS client not installed** + - Shows what the script will do before proceeding + - Lists 3 steps: Install PBS client, Configure target, Set up automation + - Asks for confirmation before installation + - Allows user to cancel if they change their mind + - No menu options shown (install → configure → exit) + - Clear progress messages throughout installation - **Improved menu flow for viewing target details** - "View target details" moved from main menu option 6 to sub-menu under "List all backup targets" - After listing targets, users can choose: diff --git a/pbs-client-installer.sh b/pbs-client-installer.sh index 2cb2708..b22ef0a 100755 --- a/pbs-client-installer.sh +++ b/pbs-client-installer.sh @@ -2149,11 +2149,27 @@ main() { fi else # PBS client not installed + info "Proxmox Backup Client is not installed on this system" + echo + echo "This script will:" + echo " 1. Install Proxmox Backup Client" + echo " 2. Configure your first backup target" + echo " 3. Set up automated backups" + echo + + PROCEED=$(prompt "Do you want to proceed with installation? (yes/no)" "yes") + + if [ "$PROCEED" != "yes" ]; then + info "Installation cancelled" + exit 0 + fi + + echo info "Installing Proxmox Backup Client..." install_pbs_client echo - info "Let's create your first backup target!" + info "Installation complete! Now let's create your first backup target!" echo TARGET_NAME=$(prompt "Enter name for first target (e.g., 'primary', 'local', 'offsite')" "default")