From 2b04d5802facf1d7d01698f6e75e6571df404fc3 Mon Sep 17 00:00:00 2001 From: Patrick Sanders Date: Wed, 17 Nov 2021 13:23:34 -0800 Subject: [PATCH] Restart Windows service on failure (#102) --- cmd/service.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/service.go b/cmd/service.go index 83a23d3..f7da71b 100644 --- a/cmd/service.go +++ b/cmd/service.go @@ -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)