Commit Graph

77 Commits

Author SHA1 Message Date
Pulse Monitor 90e56241d1 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 06c99ce88b 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 d0dae51e34 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 f407137d62 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 7f9a257961 fix: add echo -e for proper color code rendering in install script 2025-08-27 20:34:40 +00:00
Pulse Monitor 7bf627f019 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 60c60e5ed2 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 f34c9d689d 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 a2a72e806a 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 369004ea28 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 7df0c1c395 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 aed0aab9e4 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 c7eecd0d92 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 11084406b4 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 bb514e7530 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 ce9c135bc7 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 6f5abb85c4 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 65b3a1dfc5 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 4d86231c9a 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 543ef1812c 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 c3b7a7430e 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
Pulse Monitor 3d1d27b8f7 fix: don't show update option when already on that version
The menu now only shows update options for versions different from
the currently installed version. This prevents confusing situations
where users can 'update' to the version they already have.
2025-08-24 09:13:21 +00:00
Pulse Monitor 3f4457272c improve: suppress noisy output during installation
- Redirect apt-get update/install stderr to /dev/null to hide GPG warnings
- Suppress systemctl enable output (Created symlink message)
- Suppress systemctl daemon-reload output
- Makes the installation output cleaner and less scary for users
2025-08-24 09:10:28 +00:00
Pulse Monitor c68f731b82 improve: make uninstall process more thorough
The remove option now:
- Removes symlink at /usr/local/bin/pulse
- Asks before removing config/data in /etc/pulse
- Asks before removing the pulse user account
- Cleans up log files
- Removes all possible service file variations
- Runs systemctl daemon-reload after service removal
2025-08-24 08:56:56 +00:00
Pulse Monitor 3eecceca1a fix: handle non-zero return codes from compare_versions in install script
The install script was exiting when --version flag was used due to set -e
and compare_versions returning 2 for downgrades. Now properly captures
the return value and also detects the correct service name.
2025-08-24 08:36:16 +00:00
Pulse Monitor 31c6ccc935 fix: use correct terminology when installing different versions
- Says 'Updating to' when installing a newer version
- Says 'Downgrading to' when installing an older version
- Says 'Reinstalling' when installing the same version
- Says 'Installing' when current version is unknown

Added version comparison function to determine the right action word.
2025-08-24 07:48:01 +00:00
Pulse Monitor 7f9d8e26c1 fix: protect FRONTEND_PORT reference from unbound variable error
Added parameter expansion protection to prevent 'unbound variable' error when checking if FRONTEND_PORT is empty during updates.
2025-08-24 07:44:58 +00:00
Pulse Monitor 35df5d7444 fix: unbound FRONTEND_PORT variable error after update
The install script was failing with 'unbound variable' error after completing an update because FRONTEND_PORT is only set during fresh installations. Now extracts port from service file or uses default.
2025-08-23 23:34:26 +00:00
Pulse Monitor bf256b47bf fix: install script exiting early when updateChannel not in system.json
The install script was using 'set -e' which caused it to exit when grep didn't find updateChannel in system.json. Added '|| true' to prevent early exit.

Also improved version detection with fallback when GitHub API is rate-limited.
2025-08-23 23:23:25 +00:00
Pulse Monitor 868db0fdc8 fix: auto-update when --version flag is provided
Skip the interactive menu and directly update when a specific version
is requested via --version flag
2025-08-23 23:06:30 +00:00
Pulse Monitor 92466f4c36 fix: better TTY detection to avoid errors in pct exec 2025-08-23 23:04:08 +00:00
Pulse Monitor 5dc4c794b6 fix: improve TTY handling in install script for non-interactive environments 2025-08-23 23:03:28 +00:00
Pulse Monitor a6d085a46b fix: install script no longer prompts for port during updates
The script now checks for existing installations before asking for
configuration. Updates will skip all prompts and just update the binary.
2025-08-23 23:02:12 +00:00
Pulse Monitor 3585f04b28 remove deprecated V3 detection code from install script
addresses #350 - removes the pre-v4 installation check that was causing false positives when .env files were accidentally placed in /opt/pulse. V3 is no longer supported.
2025-08-23 19:16:58 +00:00
Pulse Monitor 3b0699f294 feat: auto-select update in non-interactive container mode
- Detect non-TTY environments when running with --in-container
- Automatically select appropriate update based on configured channel
- Prevents hanging on menu prompt in ProxmoxVE deployments
2025-08-22 08:55:12 +00:00
Pulse Monitor 1ceead418e fix: handle unset UPDATE_CHANNEL variable in download_pulse function
Use parameter expansion to prevent 'unbound variable' error when UPDATE_CHANNEL is not set
2025-08-22 08:50:07 +00:00
Pulse Monitor e18965eca4 feat: show both stable and RC version options in install script menu
- Users now see both stable and RC versions when updating
- Menu dynamically adjusts based on available versions
- Users can choose which version to install regardless of their update channel setting
- Addresses confusion about automatic RC updates
2025-08-22 08:39:11 +00:00
Pulse Monitor fcf8c434a1 fix: initialize UPDATE_CHANNEL variable before use in install script
addresses #345 - script was failing with 'unbound variable' error when UPDATE_CHANNEL was used before being initialized
2025-08-22 08:33:07 +00:00
Pulse Monitor e12c42104c fix: improve interactive detection for curl piped installations
Previous fix wasn't working properly - the menu showed but couldn't read input.
Now properly detects if we can write to /dev/tty to determine if interaction
is possible, even when stdin is piped from curl.
2025-08-21 22:44:42 +00:00
Pulse Monitor 2e79efd011 fix: allow interactive mode when using curl | bash for Proxmox installations
The script was detecting piped input and automatically going into non-interactive mode,
preventing users from choosing between Quick and Advanced installation modes.

Now checks if /dev/tty is available even when stdin is piped, allowing interaction
through the terminal for curl-based installations while still supporting truly
non-interactive environments (like automation scripts without any TTY).
2025-08-21 22:41:02 +00:00
Pulse Monitor e0cc18ad51 fix: handle piped script execution for Proxmox container installs
When script is piped through curl, download a fresh copy to push
to the container instead of trying to use $0 which would be 'bash'
2025-08-21 22:26:48 +00:00
Pulse Monitor 00235f0691 fix: simplify non-interactive detection for curl installations
Use simple 'test -t 0' to detect when script is piped through curl
Also use portable test command instead of bash [[ ]] syntax
2025-08-21 22:24:08 +00:00
Pulse Monitor 2588622e44 fix: auto-select Quick mode for non-interactive Proxmox installations
When running via curl pipe, automatically use Quick installation mode
instead of waiting for input that will never come
2025-08-21 22:20:31 +00:00
Pulse Monitor 9aa15bdb37 fix: handle non-TTY environments in install script for Proxmox installations
- Add safe_read function to handle both TTY and non-TTY input
- Fix --in-container mode to skip prompts when no TTY available
- Allows installation via piped curl command on Proxmox hosts
2025-08-21 22:19:23 +00:00
Pulse Monitor bd9ebcada7 feat: add port configuration prompt to installer
- Install script now prompts for custom port (default: 7655)
- Can skip prompt with FRONTEND_PORT environment variable
- Fixed incorrect port configuration instructions in UI
- Updated documentation to reflect new installation options
- Fixed FAQ.md references to pulse-backend (should be pulse)

addresses #110
2025-08-21 22:06:18 +00:00
Pulse Monitor 35e3f986f4 improve: clarify configuration file separation and port setup
- Added comprehensive PORT_CONFIGURATION.md guide
- Updated CONFIGURATION.md to clarify .env is for auth only
- Install script no longer loads .env for environment variables
- Documented proper port configuration methods (systemd, system.json)
- Added port config guide to README documentation section

addresses #110 - helps users understand where to configure ports
2025-08-21 21:29:12 +00:00
Pulse Monitor f7840aae47 feat: major installer improvements for Proxmox environments
- Auto-detects Proxmox VE hosts and creates LXC containers
- Quick mode with sensible defaults (1GB RAM, 4GB disk)
- Advanced mode for full customization
- Automatic cleanup on failure
- Simple 'update' command in containers
- Improved error handling and network detection
- Professional, clean output without verbose noise
- Docker detection to prevent container-in-container
- Removed all references to community scripts

This is now the primary recommended installation method.
2025-08-21 20:43:56 +00:00
Pulse Monitor 8965e71ad2 feat: add quick and advanced modes for LXC container creation
Users now have two options when creating the LXC container:
1. Quick mode - Uses optimized defaults for production (2GB RAM, 16GB disk, etc)
2. Advanced mode - Full control over all settings like the community script

Advanced mode allows customization of:
- Memory, CPU cores, CPU limits, swap
- Static IP vs DHCP
- DNS servers
- Firewall settings
- Privileged vs unprivileged
- Auto-start on boot
- Startup order

This gives users the best of both worlds - quick setup with good defaults
or full control when needed.
2025-08-21 19:26:31 +00:00
Pulse Monitor d5045a0b67 optimize: improve LXC container settings for production use
- Increased default RAM to 2GB (handles 50+ nodes)
- Increased default disk to 16GB (logs and metrics storage)
- Added CPU limit to prevent resource hogging
- Added 512MB swap for memory flexibility
- Enabled firewall on network interface
- Set startup order to 99 (after critical services)
- Configure UTC timezone for consistent logging
- Optimize sysctl settings for monitoring workload
- Added clear documentation of optimizations applied
2025-08-21 19:01:17 +00:00
Pulse Monitor 02865e07f7 feat: add automatic LXC container creation for Proxmox hosts
The installer now detects when running on a Proxmox VE host and automatically:
- Creates a new LXC container with user-specified settings
- Installs Pulse inside the container
- Prevents unsafe installation directly on PVE hosts

This eliminates dependency on community scripts while ensuring proper isolation.
2025-08-21 18:43:40 +00:00