mirror of
https://github.com/drakkan/sftpgo.git
synced 2024-11-22 07:30:25 +00:00
windows service: only restart twice
reset the service failure count to zero after 3600 seconds. Fixes #83
This commit is contained in:
parent
3ffddcba92
commit
7c115aa9c8
1 changed files with 2 additions and 3 deletions
|
@ -192,11 +192,10 @@ func (s *WindowsService) Install(args ...string) error {
|
|||
Delay: 60 * time.Second,
|
||||
},
|
||||
{
|
||||
Type: mgr.ServiceRestart,
|
||||
Delay: 90 * time.Second,
|
||||
Type: mgr.NoAction,
|
||||
},
|
||||
}
|
||||
err = service.SetRecoveryActions(recoveryActions, uint32(86400))
|
||||
err = service.SetRecoveryActions(recoveryActions, uint32(3600))
|
||||
if err != nil {
|
||||
service.Delete()
|
||||
return fmt.Errorf("unable to set recovery actions: %v", err)
|
||||
|
|
Loading…
Reference in a new issue