feat(services): add systemd reload support#72
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
reloadoption to thesd_servicetask that runssystemctl 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)restart—reload:true + restart:trueerrorsreload:trueon a stopped service errors with a clear messageField::Reloadvariant + test coverageWhat happened to the rest of the diverged work
This branch was carved out of a larger diverged working tree. Two things were dropped:
classify_enablement/classify_activitywith full test coverage), so that commit was redundant and dropped during rebase.stash@{0}) rather than shipped.Verification
cargo build— cleancargo test --test integration_tests --test library_test— 279 passed, 0 failedtest_systemd_service_task_reload_onlyconfirmed running🤖 Generated with Claude Code