Skip to content

Commit 17580cb

Browse files
committed
autostart set
1 parent f174202 commit 17580cb

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

internal/commands/service.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,16 @@ func newServiceInstallCmd() *cobra.Command {
6161
}
6262

6363
ui.PrintStatus("success", status)
64-
ui.PrintStatus("info", "Run 'catops service start' to start monitoring")
64+
65+
// Auto-start the service after installation
66+
ui.PrintStatus("info", "Starting service...")
67+
startStatus, err := svc.Start()
68+
if err != nil {
69+
ui.PrintStatus("warning", fmt.Sprintf("Service installed but failed to start: %v", err))
70+
ui.PrintStatus("info", "Run 'catops service start' manually")
71+
} else {
72+
ui.PrintStatus("success", startStatus)
73+
}
6574
ui.PrintSectionEnd()
6675
},
6776
}

0 commit comments

Comments
 (0)