mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-02-18 23:41:48 +01:00
Major improvements to the install script based on comprehensive review: ## 1. Temperature Monitoring - No Restart Required ✨ - Ask about temperature monitoring BEFORE container creation (not after) - Add bind mount during `pct create` instead of requiring restart later - Quick mode defaults to "yes", Advanced mode asks user - Host path: /run/pulse-sensor-proxy → /mnt/pulse-proxy in container - Support --skip-restart flag in install-sensor-proxy.sh - Eliminates disruptive container restart on fresh installs ## 2. Shell Injection Prevention 🔒 - Replace `eval pct create` with array-based command building - Prevents quoting bugs with special characters in hostnames/nameservers - Safer handling of user input in container creation ## 3. Non-Interactive Install Support 🤖 - Replace bare `read` with `safe_read_with_default` in prompts - Prevents hangs when running `curl | bash` non-interactively - Proper fallback to sensible defaults ## 4. Cleanup on Interrupt 🧹 - Track container ID globally during creation - Properly cleanup orphaned containers on Ctrl+C/SIGTERM - New handle_install_interrupt() function - Prevents leftover containers after cancelled installs ## 5. Air-Gapped Network Support 🌐 - Replace 8.8.8.8 ping check with `hostname -I` IP detection - Supports restricted/firewalled networks where external ping fails - More reliable for DHCP-only environments Changes: - install.sh: Refactor temperature prompt timing and mount setup - install.sh: Convert pct create to array-based args (lines 1018-1055) - install.sh: Add handle_install_interrupt trap (lines 38-48) - install.sh: Replace ping check with IP detection (line 1082) - scripts/install-sensor-proxy.sh: Add --skip-restart flag support - scripts/install-sensor-proxy.sh: Improve mount detection and updates Impact: - Fresh installs now complete without any container restarts - Temperature monitoring works immediately after first boot - Safer and more robust for automation/CI scenarios - Better experience on restricted networks Co-authored-by: Codex AI