Replace multiple USB scripts with single interactive version

Consolidated all USB setup functionality into one script:
- setup_usb.sh (formerly setup_usb_interactive.sh)

Removed deprecated scripts:
- setup_usb_automount.sh
- setup_usb_final.sh
- old setup_usb.sh

New setup_usb.sh features:
- Interactive menu-driven interface
- Scans for all connected USB drives automatically
- Displays device info (label, size, UUID, filesystem)
- Let user select which drives to auto-mount
- Custom mount point names (usb0, usb1, backup, etc.)
- Creates systemd .mount and .automount units
- Handles cleanup and conflict resolution
- Proper permissions (uid/gid)
- Works with drives plugged in after boot

Updated README.md documentation to reflect new workflow.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-10-27 15:33:10 +07:00
parent 7d5610d21d
commit 2ddba3f3e1
4 changed files with 268 additions and 487 deletions

View File

@@ -391,14 +391,16 @@ Automatically backup all recordings and greeting files to USB drives:
**Automated Setup (Easiest):**
```bash
# Run the USB setup script
# Run the interactive USB setup script
sudo ./setup_usb.sh
```
This interactive script will:
- Detect your USB devices
- Mount them with proper user permissions
- Test write access
- Optionally add to /etc/fstab for auto-mounting
- Scan for all connected USB drives
- Let you select which drives to auto-mount
- Choose custom mount point names (e.g., usb0, usb1, backup)
- Create systemd auto-mount units
- Handle permissions automatically (uid/gid)
- Work even when USB drives are plugged in after boot
**Option 1: Mount with user permissions (Recommended)**
```bash
@@ -461,7 +463,7 @@ wedding-phone/
├── test_complete.py # Audio testing script
├── configure_hifiberry.sh # HiFiBerry DAC+ADC setup script
├── install_service.sh # Systemd service installer (interactive)
├── setup_usb.sh # USB drive setup with permissions (interactive)
├── setup_usb.sh # Interactive USB auto-mount setup (systemd)
├── wedding-phone.service # Systemd service file template
├── Makefile # Make commands (start, test, sync, clean)
├── config.example.json # Example configuration (copy to config.json)