Skip to content

fix: update Pulse scripts for v4 Go rewrite support #6574

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Aug 6, 2025

Conversation

rcourtman
Copy link
Contributor

✍️ Description

Updates Pulse installation scripts to support v4, which is a complete rewrite in Go. The current scripts attempt to install v4 as a Node.js application, resulting in broken installations.

What this fixes:

  • Pulse v4 is now downloaded as a universal package (not Node.js)
  • Uses the built-in installer script included with v4
  • Preserves data directory during updates
  • Removes Node.js dependencies for v4 installations

Why this is critical:

  • Pulse v4.0.0 is already released
  • Current scripts create broken installations for all new users
  • v4 offers 87% less memory usage and 3x faster startup

🔗 Related PR / Issue

Link: #6568 (previous PR closed for template/formatting issues)

✅ Prerequisites (X in brackets)

  • Self-review completed – Code follows project standards.
  • Tested thoroughly – Changes work as expected.
  • No security risks – No hardcoded secrets, unnecessary privilege escalations, or permission issues.

🛠️ Type of Change (X in brackets)

  • 🐞 Bug fix – Resolves an issue without breaking functionality.
  • New feature – Adds new, non-breaking functionality.
  • 💥 Breaking change – Alters existing functionality in a way that may require updates.
  • 🆕 New script – A fully functional and tested script or script set.
  • 🌍 Website update – Changes to website-related JSON files or metadata.
  • 🔧 Refactoring / Code Cleanup – Improves readability or maintainability without changing functionality.
  • 📝 Documentation update – Changes to README, AppName.md, CONTRIBUTING.md, or other docs.

Testing performed:

  • ✅ Fresh v4 installation works correctly
  • ✅ Updates between v4 versions preserve configuration
  • ✅ Data directory is preserved during updates
  • ✅ Service starts and runs properly after installation

- Update install script to download universal package
- Update update_script to preserve data directory during updates
- Remove Node.js dependencies and use built-in installer
- Scripts now support v4 (Go) architecture
@rcourtman rcourtman requested a review from a team as a code owner August 5, 2025 06:44
@github-actions github-actions bot added bugfix update script A change that updates a script labels Aug 5, 2025
@MickLesk
Copy link
Member

MickLesk commented Aug 5, 2025

why do you execute an shellscript inside an shell? All of this are functions build in by us.

  • setup_go
  • fetch_and_deploy_gh_release "pulse" "rcourtman/Pulse" "prebuild" "latest" "/opt/pulse" "*-linux-amd64.tar.gz"

the whole thing is done in 5 lines

Edit: setup_go not needed, its an prebuild.
its just an one-liner script

fetch_and_deploy_gh_release "pulse" "rcourtman/Pulse" "prebuild" "latest" "/opt/pulse" "*-linux-amd64.tar.gz"
and create service part

image

@tremor021
Copy link
Member

tremor021 commented Aug 5, 2025

There, fixed it for ya @rcourtman :), you should do the same for the ct script

- Use fetch_and_deploy_gh_release as requested
- Add architecture detection for multi-arch support
- Simplify update script to use helper functions
- Remove unnecessary code and keep it minimal
@rcourtman
Copy link
Contributor Author

Thanks for the feedback @MickLesk! I've updated the PR to use the helper functions as requested:

✅ Now uses fetch_and_deploy_gh_release
✅ Added architecture detection to support ARM systems (amd64, arm64, armv7)
✅ Simplified to minimal code using your built-in functions
✅ Service creation follows the standard pattern

The script now properly handles all architectures that Pulse supports while using your helper functions.

@rcourtman
Copy link
Contributor Author

Quick update needed: The environment variable should be PULSE_DATA_DIR not PULSE_CONFIG_DIR. Just pushed v4.0.3 which clarifies the data directory structure - everything goes in one directory (config + runtime data).

For the helper script, just change:

-Environment="PULSE_CONFIG_DIR=/etc/pulse"
+Environment="PULSE_DATA_DIR=/etc/pulse"

This ensures Pulse knows where to store its data. The default is /etc/pulse anyway, but being explicit is good.

Changed from PULSE_CONFIG_DIR to PULSE_DATA_DIR to match
what Pulse v4.0.3 actually uses. The default is /etc/pulse
anyway, but being explicit ensures consistency.
@rcourtman
Copy link
Contributor Author

Fixed! Changed to PULSE_DATA_DIR=/etc/pulse in commit c1821a6

@MickLesk MickLesk mentioned this pull request Aug 6, 2025
2 tasks
CrazyWolf13
CrazyWolf13 previously approved these changes Aug 6, 2025
@rcourtman
Copy link
Contributor Author

@CrazyWolf13 pushed an update with the version file creation in ~/.pulse

To clarify on your questions:

  • ARM detection was removed in earlier commits (Proxmox is x86-only)
  • Update functionality is still there - the update_script function works the same way, just uses fetch_and_deploy_gh_release now
  • Version file now follows the standard ~/.pulse pattern
  • ENV file not needed - Pulse v4 uses a single data directory (defaults to /etc/pulse)

@MickLesk MickLesk merged commit 9250f9f into community-scripts:main Aug 6, 2025
2 checks passed
@rcourtman
Copy link
Contributor Author

hey @MickLesk @CrazyWolf13 - thanks for the quick merge and feedback on this

noticed the docs site at https://community-scripts.github.io/ProxmoxVE/scripts?id=pulse still shows old v3 info. needs updating:

  • Port: 7655 (not 3000)
  • Remove "Create Proxmox-API-Token first" link - uses username/password through UI
  • Config location: remove "/opt/pulse/.env" - doesn't use .env files, everything configured through web UI
  • Built with: Go (not Node.js if mentioned elsewhere)

where does the site pull this info from? couldn't find it in the repo. happy to update it if you point me to the right place

@MickLesk
Copy link
Member

MickLesk commented Aug 6, 2025

its your cache, at my system are 4.0.3. but the json can be fixed in next time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix update script A change that updates a script
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants