Skip to content

Add once background status - #80

Open
kevinmcconnell wants to merge 1 commit into
mainfrom
background-status-command
Open

Add once background status#80
kevinmcconnell wants to merge 1 commit into
mainfrom
background-status-command

Conversation

@kevinmcconnell

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings August 3, 2026 16:34

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds once background status to report whether the platform service is installed and running.

Changes:

  • Adds status command with exit code 3 for inactive services.
  • Adds systemd and launchd runtime checks.
  • Extends the service interface with IsRunning.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
internal/command/background.go Registers the status subcommand.
internal/command/background_status.go Implements status output and exit behavior.
internal/service/service.go Adds the runtime-status interface method.
internal/service/systemd.go Queries systemd active state.
internal/service/launchd.go Queries launchd job state.

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

Comment on lines +49 to +50
func (l *Launchd) IsRunning(ctx context.Context, name string) bool {
return exec.CommandContext(ctx, "launchctl", "print", "system/"+l.label(name)).Run() == nil

type Service interface {
IsInstalled(name string) bool
IsRunning(ctx context.Context, name string) bool
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.

2 participants