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 {
16
16
API api.HAProxyClient
17
17
}
18
18
19
- func (d * s6Control ) Service (action string ) ( err error ) {
19
+ func (d * s6Control ) Service (action string ) error {
20
20
if d .OSArgs .Test {
21
21
logger .Infof ("HAProxy would be %sed now" , action )
22
22
return nil
23
23
}
24
24
var cmd * exec.Cmd
25
25
26
- //nolint:gosec //checks on HAProxyBinary should be done in configuration module.
27
26
switch action {
28
27
case "start" :
29
28
// no need to start it is up already (s6)
30
29
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()*/
39
30
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
44
33
case "reload" :
45
34
logger .Error (saveServerState (d .Env .StateDir , d .API ))
46
35
cmd = exec .Command ("s6-svc" , "-2" , "/var/run/s6/services/haproxy" )
You can’t perform that action at this time.
0 commit comments