Addresses #450, #451, #406
- Initialize all variables at top of script to prevent "unbound variable" errors with set -u
- BUILD_FROM_SOURCE, SKIP_DOWNLOAD, IN_CONTAINER, IN_DOCKER now set at line 20-27
- ENABLE_AUTO_UPDATES, FORCE_VERSION, FORCE_CHANNEL, SOURCE_BRANCH also moved to top
- Removed duplicate assignments from argument parsing section
- Restore /bin/update command creation for ProxmoxVE LXC installations
- Creates update script that re-runs install.sh for easy updates
- Allows backend to properly detect ProxmoxVE deployment type
- Users can now run "update" in LXC console as documented
- Update deployment detection to recognize install.sh in update command
- Previously only looked for legacy "pulse.sh" reference
- Now checks for both pulse.sh and install.sh
Addresses #459#461 - Consolidates variable initialization at the top
of the script alongside other defaults. Removes redundant BUILD_FROM_SOURCE
initialization from argument parsing section.
The build was failing because Go wasn't in PATH after installation. Now
exports PATH=/usr/local/go/bin:/home/pulse/.local/bin:/home/pulse/.local/bin:/home/pulse/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games before running make build.
The install script now correctly builds from source when --main is specified,
even if Pulse is already installed. Previously it would go into the update
prompt instead of building from source.
- Checks if system Go version meets minimum requirement (1.21+)
- Downloads and installs Go 1.23 from official releases if needed
- Supports amd64, arm64, and armv6l architectures
- Ensures Go is in PATH for the build process
This fixes build failures on Debian 12 which ships with Go 1.19
- --main is now the primary option (clearer intent)
- --source, --from-source, --branch remain as aliases
- Help text shows --main first for better discoverability
Usage: curl -fsSL https://raw.githubusercontent.com/rcourtman/Pulse/main/install.sh | bash -s -- --main
- Modified install.sh to avoid recursive chown on /etc/pulse during reinstalls
- This prevents custom thresholds in alerts.json from being lost during updates
- Only changes directory ownership, not existing file permissions
- Explicitly preserves permissions on critical config files
- Creates ~/.pulse marker file after successful install/update
- Addresses vhsdream's request in PR #7519
- Helps Community Scripts track that Pulse has been installed
- Improves compatibility between installation methods
The installer would exit abruptly on fresh Proxmox installations without any VMs due to commands failing with set -e enabled. Now wrapped the ID collection section with set +e/set -e to allow graceful handling of these cases.
- 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.
- 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.
- 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
- 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
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.
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.
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.
- 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
- 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
- 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
- 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
- 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
- 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.
The install script asks for comma-separated DNS servers but Proxmox expects
space-separated. Now properly converts the format before passing to pct create.
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
- 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
- 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
- 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
- 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
- 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
- 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
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.
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.
- 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
- 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
- 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
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.
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