Commit Graph

106 Commits

Author SHA1 Message Date
Pulse Monitor 92ba0d334e fix: improve binary replacement reliability during updates (addresses #406)
- Add backup/restore mechanism for old binary during updates
- Add explicit error checking for binary copy operations
- Add version verification after installation to detect issues
- Force retry if version mismatch detected after update
- Ensure old binary is properly replaced, not just overwritten

This should resolve issues where updates appear to complete but the old version continues to run, particularly when the binary replacement fails silently.
2025-09-01 22:59:32 +00:00
Pulse Monitor be88faa9e0 fix: improve install script reliability in unprivileged containers (addresses #386)
- Add timeout command wrapper around all curl calls to prevent hanging
- Add multiple fallback mechanisms for GitHub API failures
- Use fallback to known stable version if all methods fail
- Add proper timeouts to prevent indefinite waiting
- Improve error handling to proceed when version verification fails

The script now handles network issues, rate limiting, and container
restrictions more gracefully, ensuring installation completes even
in restricted environments.
2025-08-31 20:34:09 +00:00
Pulse Monitor 4a5086b378 improve: clarify CIDR notation requirement in installer IP prompt
addresses #392 - make it clear that static IP should include CIDR notation
2025-08-30 22:44:29 +00:00
Pulse Monitor 76595e8865 fix: duplicate auto-update prompt when answering No (addresses #391)
- Set ENABLE_AUTO_UPDATES global variable when user responds in select_install_mode
- Only ask about auto-updates once during installation
- Fixed issue where answering No to auto-updates would prompt again later
2025-08-30 17:00:43 +00:00
Pulse Monitor 6e2348a6ae feat: add optional VLAN support to installer (addresses #392)
- Added optional VLAN ID prompt in both Quick and Advanced modes
- Regular users can just press Enter to skip VLAN configuration
- Validates VLAN ID range (1-4094)
- Adds tag parameter to network config when VLAN is specified
- Defaults to no VLAN, ensuring regular users aren't affected
2025-08-30 16:37:38 +00:00
Pulse Monitor 8a13e1e893 fix: restore port prompt in Quick installation mode
The Quick installation mode was no longer asking for the port number,
just using the default 7655. This regression was introduced when
the duplicate main function was removed.

Restored the port prompt to Quick mode so users can specify a custom
port if needed, matching the original behavior.
2025-08-30 16:29:50 +00:00
Pulse Monitor 0376076825 fix: remove duplicate main function in install script (fixes #391)
The install script had a duplicate mainmain() function that was causing
the installation to run twice. This resulted in:
- Double prompts for auto-updates configuration
- Confusing installation output with duplicate headers
- The script appearing to reinstall after initial installation

Removed the duplicate function (lines 2025-2467) and fixed the script
to run only once as intended.

Tested on fresh Debian 12 LXC container - confirmed single installation
with working web UI on port 7655.
2025-08-30 16:07:28 +00:00
Pulse Monitor 1ae976e4d4 fix: handle unbound container variable in install script (fixes #390)
The install script was failing with "container: unbound variable" error
when run with set -u. Fixed by using ${container:-} to provide a default
empty value when the variable is not set.
2025-08-30 13:56:19 +00:00
Pulse Monitor 7efcfa8d1f feat: install jq in containers for better JSON handling
- Containers created by the script now get jq installed
- Makes auto-update config more reliable
- Keeps JSON properly formatted
- Falls back gracefully if jq can't be installed
- Only affects fresh installs in containers, not existing systems
2025-08-30 08:03:05 +00:00
Pulse Monitor d18e7fc36e feat: re-ask about auto-updates for users with misconfigured settings
- Detects when auto-updates are disabled despite timer being installed
- Shows 'Auto-updates are currently disabled' message to be clear
- Offers to enable auto-updates during any update/reinstall operation
- Works with --version flag, regular updates, and reinstalls
- Helps users who had the broken config from before the sed fix
2025-08-30 07:37:54 +00:00
Pulse Monitor 63f8167002 fix: auto-update setup properly sets config when jq not installed
- Fixed sed fallback in setup_auto_updates to correctly update existing autoUpdateEnabled field
- Improved Docker detection with multiple methods for better reliability
- Auto-updates now work correctly in LXC containers when enabled
2025-08-30 07:26:10 +00:00
Pulse Monitor 315e3a811e fix: actually prompt for auto-updates in container installation
- Add auto-updates prompt to Quick mode (not just Advanced)
- Remove 'local' keyword so the flag variable is accessible later
- Previously the prompt appeared but the choice wasn't being passed through
2025-08-29 20:40:57 +00:00
Pulse Monitor 8bb49da95e fix: ensure auto-updates prompt appears during container installation
- Add auto-updates prompt to Proxmox container creation flow
- Pass the choice to container via --enable-auto-updates flag
- Previously the prompt was skipped entirely for container installs
2025-08-29 20:12:28 +00:00
Pulse Monitor 465f07b26b fix: prevent install script hanging in unprivileged containers
- Add safe_systemctl wrapper with 5-second timeout for systemctl commands
- Handle systemctl daemon-reload hanging in unprivileged LXC containers
- Provide clear messaging when systemctl fails (common in unprivileged mode)
- Installation continues successfully even when systemctl operations fail

This addresses #386 where the install script would hang indefinitely
in unprivileged containers due to systemctl daemon-reload never completing.
2025-08-29 19:51:41 +00:00
Pulse Monitor 6dc1b8abb4 fix: ask for space-separated DNS servers instead of converting
Simpler to just ask users to enter DNS servers space-separated
(the format Proxmox expects) rather than converting from commas
2025-08-29 18:53:48 +00:00
Pulse Monitor 925d3b7f70 fix: convert comma-separated DNS to space-separated for pct
The install script asks for comma-separated DNS servers but Proxmox expects
space-separated. Now properly converts the format before passing to pct create.
2025-08-29 18:53:08 +00:00
Pulse Monitor a18381a5c7 fix: correct template selection in install script
The script was incorrectly prefixing storage name twice when listing templates,
resulting in ISOs:ISOs:vztmpl/... format instead of ISOs:vztmpl/...
This caused template existence checks to fail and always trigger downloads.

addresses #381
2025-08-29 18:17:38 +00:00
Pulse Monitor ec220d49f5 fix: make installation mode prompt wait for Enter key
- Changed mode selection to require Enter instead of single character
- Makes behavior consistent with other prompts
- Less jarring user experience
2025-08-29 17:45:17 +00:00
Pulse Monitor 4eefc3b492 fix: restore missing main function and improve container installation
- Restored accidentally deleted main() function
- Fixed script not running at all due to missing main call
- Added IN_CONTAINER checks to skip prompts in container context
- Fixed network bridge detection parsing issue
- Script now completes installation properly without hanging
2025-08-29 17:43:14 +00:00
Pulse Monitor 2b533015b0 fix: prevent install script from exiting when Enter pressed at prompts
- Add safe_read_with_default wrapper to handle read failures gracefully
- Update all prompts to use the wrapper with appropriate defaults
- Script now continues with defaults instead of exiting on Enter key
- Addresses issue #383 installation problems
2025-08-29 17:23:40 +00:00
Pulse Monitor cd38215ca8 feat: improve install UX with numbered options for network and storage selection
- Users can now select bridges and storage by number (1, 2, 3, etc.)
- Much easier than typing out storage names like 'local-lvm'
- Shows default option in brackets [1]
- Still allows typing the name directly if preferred
- Works in both Quick and Advanced modes
- Improves installation experience significantly
2025-08-29 17:16:04 +00:00
Pulse Monitor 4fbe724013 fix: handle safe_read failures with set -e enabled
- Temporarily disable errexit when calling safe_read
- Prevents script from exiting when safe_read returns 1
- Properly handles non-interactive container installations
- Addresses #383
2025-08-29 17:05:20 +00:00
Pulse Monitor 81c6e3039c fix: handle non-interactive mode in container installations
- Fix safe_read failures when running --in-container without TTY
- Use defaults when prompts fail in non-interactive mode
- Prevents hanging when pct exec runs install script
- Addresses #383
2025-08-29 17:03:55 +00:00
Pulse Monitor 0102252cb4 fix: show real-time progress during container installation
- Show installation output in real-time instead of capturing silently
- Users can now see what's happening during download/install
- Still includes 5-minute timeout to prevent infinite hangs
- Better error messages with manual recovery instructions
- Addresses #383 - users can now see where installation gets stuck
2025-08-29 16:58:08 +00:00
Pulse Monitor 4ff33973ca fix: add timeouts to prevent installation hanging on network issues
- Add timeout to GitHub API calls when fetching releases
- Add timeout to wget when downloading release files
- Add timeout to container installation with better error messages
- Show helpful error messages when timeouts occur
- Addresses #383 - installation getting stuck
2025-08-29 16:52:08 +00:00
Pulse Monitor 04209d15a1 fix: prompt for gateway when static IP is entered in advanced mode
addresses #382 - installer now prompts for gateway IP when user enters a static IP.
validates IP is in CIDR format (e.g., 192.168.1.100/24) and gateway is valid.
if no gateway is provided, attempts to use .1 of the subnet as default.
this fixes the 'waiting for network' timeout when using static IPs.
2025-08-29 15:58:27 +00:00
Pulse Monitor 109d97afab fix: detect and use all available template storages for Proxmox installations
addresses #381 - installer now searches all storages that can contain templates
instead of assuming templates are in the same storage as the container rootfs.
when downloading templates, it uses the storage with the most free space.
2025-08-29 15:49:56 +00:00
Pulse Monitor 6d93fcd391 fix: ensure PATH and update command work for all installations
- Created setup_update_command() function to handle PATH and update script setup
- Adds /usr/local/bin to PATH in /etc/profile and /etc/bash.bashrc
- Creates /usr/local/bin/update script if it doesn't exist
- Called during all installation/update flows (fresh, update, reinstall)
- Fixes issue where existing users couldn't run 'update' command without full path
- Addresses #377
2025-08-29 07:59:03 +00:00
Pulse Monitor fa3bd2df0e fix: add /usr/local/bin to PATH in containers so 'update' command works
This addresses #377 where users couldn't run the 'update' command
without specifying the full path when using pct enter.
2025-08-29 07:55:11 +00:00
Pulse Monitor cad7656d76 fix: support non-local storage for templates in install.sh (addresses #368)
- Use selected storage instead of hardcoded 'local' for template listing
- Use storage:vztmpl/template format instead of hardcoded paths
- Downloads now go to the selected storage (btrfs, zfs, etc.)
- Check template existence using pveam list with correct storage
2025-08-28 14:07:09 +00:00
Pulse Monitor d9e0571605 fix: make install script interactive when piped from curl
- Modified safe_read to properly detect when no TTY is available
- Returns failure status when truly non-interactive (no /dev/tty)
- Only auto-selects update when safe_read actually fails
- Now curl | bash will show the interactive menu if terminal is available
2025-08-28 13:48:56 +00:00
Pulse Monitor 3f6451662f fix: detect fresh installs correctly for auto-update prompts
The script was checking if CONFIG_DIR existed to detect fresh installs, but we create that directory early in the process. Now checking for system.json file instead which only exists after a real installation.
2025-08-28 08:10:25 +00:00
Pulse Monitor 45267306eb fix: enable auto-update prompts for LXC containers
LXC containers are full Linux systems with systemd and can handle auto-updates perfectly fine. Only Docker containers should skip auto-update prompts since they're immutable and can't restart themselves.

- Separated IN_DOCKER flag from IN_CONTAINER
- LXC containers now get auto-update prompts like bare metal installs
- Docker containers still skip auto-updates as intended
2025-08-28 08:07:20 +00:00
Pulse Monitor 7c4207870e fix: add echo -e for proper color code rendering in install script 2025-08-27 20:34:40 +00:00
Pulse Monitor 3b9ec69f1e feat: prompt existing users about auto-updates when upgrading
Users upgrading from versions before auto-updates will now be prompted
to enable the new automatic update feature. The prompt defaults to 'Yes'
for convenience but allows users to opt-out if they prefer manual updates.

The prompt only appears when:
- Upgrading or reinstalling an existing installation
- The auto-update timer doesn't already exist
- Not running with --enable-auto-updates flag
- Not running in a container environment
2025-08-27 16:10:37 +00:00
Pulse Monitor 87a35f6fbc feat: add automatic stable update system
- Add systemd timer for daily update checks (2-6 AM window)
- Create pulse-auto-update.sh script with safe rollback on failure
- Add --enable-auto-updates flag to install script
- Prompt users during fresh install to enable auto-updates
- Respect autoUpdateEnabled flag in system.json
- Only install stable releases, never RCs
- Full logging to systemd journal
- Tested and verified working in container
2025-08-27 15:37:02 +00:00
Pulse Monitor ab1bee76ac feat: add --reset and --uninstall options to install script
The install script now provides convenient management options:
- --reset: Stops Pulse, removes config/data, restarts with fresh config
- --uninstall: Completely removes Pulse from the system

Also simplified the post-install message to show these one-liner commands instead of listing manual steps.
2025-08-25 14:01:59 +00:00
Pulse Monitor 749efa1b18 fix: install script no longer crashes when comparing RC versions
The version comparison function was attempting numeric comparisons on version parts containing RC suffixes (e.g., "0-rc" from "4.8.0-rc.2"), causing an "unbound variable" error due to set -u.

Now properly strips and handles pre-release suffixes separately, allowing correct comparison of RC versions.

Addresses discussion #344 comment from RLSinRFV
2025-08-25 13:55:17 +00:00
Pulse Monitor 99cef1584e improve: add reset and removal instructions to install script completion message
Users now see clear instructions for:
- Resetting configuration to start fresh (keeping Pulse installed)
- Complete removal of Pulse (uninstall everything)

This helps users who need to troubleshoot or start over with a clean slate.
2025-08-25 09:36:39 +00:00
Pulse Monitor 5a21341920 improve: storage pool display now shows available space in GB
- Changed from showing just percentage to "X.X GB free of Y.Y GB (Z% used)"
- Much more useful for users to see actual available space
- Applies to both Quick and Advanced installation modes
2025-08-24 22:52:25 +00:00
Pulse Monitor 3e1a34b2c8 improve: always prompt for network and storage in quick mode
addresses #352

quick mode now:
- shows available network bridges and prompts for selection
- shows available storage pools with usage info and prompts for selection
- properly handles cases where defaults (vmbr0, local-lvm) don't exist
- gives clear error messages when no bridges or storage pools are found

this ensures users always see what's available and can make informed choices
even in quick mode, preventing installation failures due to missing defaults
2025-08-24 17:00:33 +00:00
Pulse Monitor 6ed2a23541 fix: improve network bridge detection in install.sh
addresses #352

the installer now:
- detects the actual default network interface (not just vmbr*)
- uses the first available bridge if default isn't a bridge
- prompts user to select a bridge when vmbr0 doesn't exist
- shows helpful messages when no bridges are detected

this fixes issues on systems with non-standard network configurations
where vmbr0 doesn't exist or isn't the default gateway
2025-08-24 16:44:58 +00:00
Pulse Monitor a5c8021cb1 fix: ensure RC version variable is properly initialized
Initialize RC_VERSION to empty string before assignment to prevent
'unbound variable' errors when running with set -u. This ensures
the RC update option is shown when running a stable version.
2025-08-24 16:16:48 +00:00
Pulse Monitor 1ad1315e01 fix: install script now correctly detects RC/pre-release versions
The version detection regex now captures the full version string including
pre-release suffixes like -rc.1, -beta.2, etc. This prevents the script
from offering to update to a version that's already installed.
2025-08-24 16:09:10 +00:00
Pulse Monitor a2b81a1e26 fix: install script menu selection now works correctly when piped through curl
- Fixed safe_read function to properly handle TTY availability
- Added proper error handling for compare_versions return codes
- Script no longer exits silently when selecting menu options
2025-08-24 16:01:42 +00:00
Pulse Monitor 1c175d4e07 fix: menu options now actually execute instead of silently exiting
The update and reinstall cases in the menu were missing exit statements,
causing the script to continue running after completion and hit the fresh
install path. This made it appear as if nothing happened when selecting
menu options.

Added exit 0 after print_completion for both update and reinstall cases.
Removed debug output now that the issue is resolved.
2025-08-24 15:37:16 +00:00
Pulse Monitor 8d023bdad3 debug: add more detailed debug output for RC version selection
Adding debug to understand why RC version selection isn't working
2025-08-24 15:29:22 +00:00
Pulse Monitor 319b19d593 debug: add debug output to diagnose menu selection issue
Temporarily adding debug output to understand why menu selections aren't working
when the script is piped through curl.
2025-08-24 15:27:10 +00:00
Pulse Monitor cb11ffb221 fix: menu selection not working when script is piped through curl
- Simplified safe_read function to properly handle TTY input when script is piped
- Added error check if no option is selected

The menu now correctly reads user input when running:
curl -sSL .../install.sh | bash
2025-08-24 15:21:16 +00:00
Pulse Monitor a24e9f5216 fix: install script no longer prompts for port during updates
The script now properly detects update scenarios by checking for:
- Existing binary at /opt/pulse/bin/pulse or /opt/pulse/pulse
- Existing config directory at /etc/pulse
- --version flag being specified

This prevents the annoying port prompt when running updates or installing specific versions.
2025-08-24 15:16:46 +00:00