mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
Merge pull request #3022 from LaurensVergote/Windows
Allow nats-server to run as system user on Windows
This commit is contained in:
@@ -109,11 +109,11 @@ func Run(server *Server) error {
|
||||
server.Start()
|
||||
return nil
|
||||
}
|
||||
isInteractive, err := svc.IsAnInteractiveSession()
|
||||
isWindowsService, err := svc.IsWindowsService()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if isInteractive {
|
||||
if !isWindowsService {
|
||||
server.Start()
|
||||
return nil
|
||||
}
|
||||
@@ -125,6 +125,6 @@ func isWindowsService() bool {
|
||||
if dockerized {
|
||||
return false
|
||||
}
|
||||
isInteractive, _ := svc.IsAnInteractiveSession()
|
||||
return !isInteractive
|
||||
isWindowsService, _ := svc.IsWindowsService()
|
||||
return isWindowsService
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user