fix windows build

This commit is contained in:
Daniel Theophanes
2021-06-10 09:36:42 -05:00
parent 17a2c7bcb5
commit a8dda22bce
+3 -2
View File
@@ -13,6 +13,7 @@ import (
"sync" "sync"
"time" "time"
"golang.org/x/sys/windows"
"golang.org/x/sys/windows/registry" "golang.org/x/sys/windows/registry"
"golang.org/x/sys/windows/svc" "golang.org/x/sys/windows/svc"
"golang.org/x/sys/windows/svc/eventlog" "golang.org/x/sys/windows/svc/eventlog"
@@ -245,7 +246,7 @@ func (ws *windowsService) Install() error {
} }
serviceType := windows.SERVICE_WIN32_OWN_PROCESS serviceType := windows.SERVICE_WIN32_OWN_PROCESS
if ws.Option.bool("Interactive") { if ws.Option.bool("Interactive", false) {
serviceType = serviceType | windows.SERVICE_INTERACTIVE_PROCESS serviceType = serviceType | windows.SERVICE_INTERACTIVE_PROCESS
} }
@@ -257,7 +258,7 @@ func (ws *windowsService) Install() error {
Password: ws.Option.string("Password", ""), Password: ws.Option.string("Password", ""),
Dependencies: ws.Dependencies, Dependencies: ws.Dependencies,
DelayedAutoStart: ws.Option.bool("DelayedAutoStart", false), DelayedAutoStart: ws.Option.bool("DelayedAutoStart", false),
ServiceType: serviceType, ServiceType: uint32(serviceType),
}, ws.Arguments...) }, ws.Arguments...)
if err != nil { if err != nil {
return err return err