File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,8 @@ func Status(name string) error {
7171 }
7272
7373 var state svc.State
74+ var accepts svc.Accepted
75+ accepts = 0
7476
7577 switch strings .ToLower (name ) {
7678 case "stopped" :
@@ -81,17 +83,19 @@ func Status(name string) error {
8183 state = svc .StopPending
8284 case "running" :
8385 state = svc .Running
86+ accepts = svc .AcceptStop | svc .AcceptShutdown
8487 case "continue_pending" :
8588 state = svc .ContinuePending
8689 case "pause_pending" :
8790 state = svc .PausePending
8891 case "paused" :
8992 state = svc .Paused
93+ accepts = svc .AcceptStop | svc .AcceptShutdown | svc .AcceptPauseAndContinue
9094 default :
9195 return fmt .Errorf ("unknown status: %s" , name )
9296 }
9397
94- globalStatus <- svc.Status {State : state }
98+ globalStatus <- svc.Status {State : state , Accepts : accepts }
9599 return nil
96100}
97101
You can’t perform that action at this time.
0 commit comments