Skip to content

feat: add P2Poolv2 systemd service controls - #34

Open
R27-pixel wants to merge 8 commits into
p2poolv2:mainfrom
R27-pixel:p2poolv2_service
Open

R27-pixel wants to merge 8 commits into
p2poolv2:mainfrom
R27-pixel:p2poolv2_service

Conversation

@R27-pixel

@R27-pixel R27-pixel commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds systemd service controls for P2Poolv2 in PDM.

  • Added System tab under P2Pool Status
  • Start / Stop / Restart via systemctl --user
  • Shows current service status
  • Added systemd integration test

Setup

PDM expects a systemd user service named p2poolv2 to be configured at:

~/.config/systemd/user/p2poolv2.service

The service definition is responsible for the P2Poolv2 installation path, working directory, binary, and config file. PDM only controls the service lifecycle through systemctl --user.

image

Removing bitcoin_conf_path left several tests in settings.rs with
no remaining assertions - some passed trivially with zero checks.
Rebuilt using p2pool_conf_path as the differentiating field:

- load_settings_returns_default_when_file_missing/for_invalid_toml:
  restored default-field assertions
- load_settings_reads_valid_file: was writing/loading/asserting
  nothing; now round-trips a real p2pool_conf_path value
- save_with_override_writes_to_override_dir_and_default: assert
  override and default copies match
- load_settings_reads_from_override_dir_when_set /
  load_settings_falls_back_to_default_when_override_unreadable:
  pointer and authoritative Settings were identical, so nothing
  could prove which one loaded - gave each a distinct
  p2pool_conf_path and assert the correct one wins
@codecov

codecov Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.76898% with 20 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/p2poolv2_service.rs 85.71% 12 Missing ⚠️
src/main.rs 97.22% 3 Missing ⚠️
src/app.rs 98.98% 2 Missing ⚠️
src/components/p2pool_status_view.rs 94.44% 2 Missing ⚠️
src/ui.rs 92.85% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant