We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f5560d0 commit d81fe70Copy full SHA for d81fe70
internal/pkg/agent/install/install.go
@@ -174,12 +174,18 @@ func StopService(topPath string) error {
174
175
// RestartService stops and starts the installed service.
176
func RestartService(topPath string) error {
177
- err := StopService(topPath)
+ svc, err := newService(topPath)
178
if err != nil {
179
return err
180
}
181
-
182
- return StartService(topPath)
+ err = svc.Restart()
+ if err != nil {
183
+ return errors.New(
184
+ err,
185
+ fmt.Sprintf("failed to restart service (%s)", paths.ServiceName),
186
+ errors.M("service", paths.ServiceName))
187
+ }
188
+ return nil
189
190
191
// FixPermissions fixes the permissions on the installed system.
0 commit comments