Skip to content

feat(services): add systemd reload support#72

Merged
Zorlin merged 2 commits into
mainfrom
sync/systemd-reload-and-state-fix
Jul 1, 2026
Merged

feat(services): add systemd reload support#72
Zorlin merged 2 commits into
mainfrom
sync/systemd-reload-and-state-fix

Conversation

@Zorlin

@Zorlin Zorlin commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a reload option to the sd_service task that runs systemctl reload <unit> — useful for picking up config changes (nginx, etc.) without a full restart.

Behavior

  • reload: "yes"systemctl reload (only when the service is running)
  • Mutually exclusive with restartreload:true + restart:true errors
  • Requires the service to be running; reload:true on a stopped service errors with a clear message
  • Adds a Field::Reload variant + test coverage

What happened to the rest of the diverged work

This branch was carved out of a larger diverged working tree. Two things were dropped:

  • Static/activating state detection — main already landed a cleaner version (classify_enablement / classify_activity with full test coverage), so that commit was redundant and dropped during rebase.
  • Gravity DNS + Proxmox Dragonfly precreate + Cargo.lock — also already in main; stashed locally (stash@{0}) rather than shipped.

Verification

  • cargo build — clean
  • cargo test --test integration_tests --test library_test — 279 passed, 0 failed
  • New test_systemd_service_task_reload_only confirmed running

🤖 Generated with Claude Code

Zorlin and others added 2 commits July 1, 2026 12:56
Add a `reload` option to the sd_service task that runs `systemctl
reload <unit>`. Reload is mutually exclusive with restart and requires
the service to be running (already started or started:true), matching
the semantics systemd itself enforces — conflicting combinations
return a clear error instead of silently picking one. Adds a
Field::Reload variant and test coverage for the new option.

Co-Authored-By: Claude <noreply@anthropic.com>
Pre-existing fmt violation on main (from the {profile} secrets_inventory
feature) that gates CI on this branch. Wraps the long assert to satisfy
`cargo fmt --check`. No behavior change.

Co-Authored-By: Claude <noreply@anthropic.com>
@Zorlin Zorlin merged commit 9dea488 into main Jul 1, 2026
9 checks passed
@Zorlin Zorlin deleted the sync/systemd-reload-and-state-fix branch July 1, 2026 14:42
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