File tree Expand file tree Collapse file tree 1 file changed +3
-14
lines changed Expand file tree Collapse file tree 1 file changed +3
-14
lines changed Original file line number Diff line number Diff line change @@ -16,31 +16,20 @@ type s6Control struct {
1616 API api.HAProxyClient
1717}
1818
19- func (d * s6Control ) Service (action string ) ( err error ) {
19+ func (d * s6Control ) Service (action string ) error {
2020 if d .OSArgs .Test {
2121 logger .Infof ("HAProxy would be %sed now" , action )
2222 return nil
2323 }
2424 var cmd * exec.Cmd
2525
26- //nolint:gosec //checks on HAProxyBinary should be done in configuration module.
2726 switch action {
2827 case "start" :
2928 // no need to start it is up already (s6)
3029 return nil
31- /*if processErr == nil {
32- logger.Error("haproxy is already running")
33- return nil
34- }
35- cmd = exec.Command("s6-svc", "-u", "/var/run/s6/services/haproxy")
36- cmd.Stdout = os.Stdout
37- cmd.Stderr = os.Stderr
38- return cmd.Start()*/
3930 case "stop" :
40- cmd = exec .Command ("s6-svc" , "-d" , "/var/run/s6/services/haproxy" )
41- cmd .Stdout = os .Stdout
42- cmd .Stderr = os .Stderr
43- return cmd .Run ()
31+ // no need to stop it (s6)
32+ return nil
4433 case "reload" :
4534 logger .Error (saveServerState (d .Env .StateDir , d .API ))
4635 cmd = exec .Command ("s6-svc" , "-2" , "/var/run/s6/services/haproxy" )
You can’t perform that action at this time.
0 commit comments