Skip to content

Conversation

@kongfei605
Copy link
Collaborator

@kongfei605 kongfei605 commented Dec 10, 2025

Copilot AI review requested due to automatic review settings December 10, 2025 09:47
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enables proper systemd service configuration by adding support for the WantedBy option through a dependency replacement. The codebase already sets WantedBy to multi-user.target (for system services) or default.target (for user services) in service_linux.go, and this change provides the underlying library support to make that configuration functional.

  • Replaces github.com/kardianos/service with a fork github.com/kongfei605/service v1.2.2 that supports the WantedBy systemd option
  • Updates go.sum with the new dependency checksums and removes the original kardianos/service entries
  • Removes an unused golang.org/x/sys dependency entry

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.

File Description
go.mod Adds replace directive to use kongfei605/service fork v1.2.2 instead of kardianos/service
go.sum Updates checksums by removing kardianos/service entries and adding kongfei605/service v1.2.2 entries; also removes an unused golang.org/x/sys entry

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

sigs.k8s.io/yaml v1.3.0 // indirect
)

replace (
Copy link

Copilot AI Dec 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using a personal fork (github.com/kongfei605/service) without documentation raises maintainability and security concerns. Consider:

  1. Adding a comment in the code or README explaining why this fork is necessary and what features it adds (specifically WantedBy support for systemd)
  2. Linking to the upstream PR or issue if one exists
  3. If the changes are necessary long-term, consider contributing them back to the original kardianos/service repository

This helps future maintainers understand the dependency choice and reduces security risks from using unmaintained forks.

Suggested change
replace (
replace (
// NOTE: Using kongfei605's fork of kardianos/service for WantedBy support in systemd.
// See: https://github.com/kardianos/service/pull/410

Copilot uses AI. Check for mistakes.
@kongfei605 kongfei605 merged commit 0ff3ecd into flashcatcloud:main Dec 10, 2025
9 checks passed
@kongfei605 kongfei605 deleted the svc_up branch December 10, 2025 09:57
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