Skip to content

Commit

Permalink
Restart Windows service on failure (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
patricksanders authored Nov 17, 2021
1 parent a229532 commit 2b04d58
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ func initService() error {
DisplayName: "Weep",
Description: "The ConsoleMe CLI",
Arguments: args,
Option: service.KeyValue{
"OnFailure": "restart", // Windows only
"OnFailureDelayDuration": "1m", // Windows only
},
}

weepService, err = service.New(svcProgram, svcConfig)
Expand Down

0 comments on commit 2b04d58

Please sign in to comment.