Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

windows restart service #1681

Draft
wants to merge 17 commits into
base: main
Choose a base branch
from
Draft

windows restart service #1681

wants to merge 17 commits into from

Conversation

zackattack01
Copy link
Contributor

sequenceDiagram
    participant LauncherKolideK2Svc
    Note right of LauncherKolideK2Svc: ./launcher.exe svc ...
    create participant WindowsServiceManager
    LauncherKolideK2Svc->>WindowsServiceManager: opens connection on startup
    create participant LauncherKolideRestartSvc
    WindowsServiceManager->>LauncherKolideRestartSvc: have we installed the restart service?
    Note left of LauncherKolideRestartSvc: ./launcher.exe restart-service
    alt yes the service already exists
        LauncherKolideK2Svc->>LauncherKolideRestartSvc: Restart to ensure latest
    else no the service does not exist
        LauncherKolideK2Svc->>WindowsServiceManager: 1 - create, configure, etc
        LauncherKolideK2Svc->>LauncherKolideRestartSvc: 2 - Start
        activate LauncherKolideRestartSvc
    end
    loop every n minutes
        LauncherKolideRestartSvc->>WindowsServiceManager: Query LauncherKolideK2Svc status
        LauncherKolideRestartSvc->>LauncherKolideK2Svc: Start if Stopped
    end

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.

None yet

1 participant