UX: Add confirmation prompt before PBS client installation

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 <noreply@anthropic.com>
This commit is contained in:
zaphod-black 2025-11-01 23:16:30 -05:00
parent 95e937b964
commit 6829facb00
2 changed files with 24 additions and 1 deletions

View file

@ -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:

View file

@ -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")