RestartHAProxy Should be called to commit every action to the running instance of HAProxy
()
| 98 | |
| 99 | // RestartHAProxy Should be called to commit every action to the running instance of HAProxy |
| 100 | func (api *API) RestartHAProxy() { |
| 101 | go func() { |
| 102 | logrus.Info("Restarting HAProxy...") |
| 103 | |
| 104 | err := exec.Command("sudo", "systemctl", "restart", "haproxy").Run() |
| 105 | if err != nil { |
| 106 | api.forceResetHAProxy() |
| 107 | } |
| 108 | }() |
| 109 | } |
| 110 | |
| 111 | func (api *API) forceResetHAProxy() { |
| 112 | go func() { |
no test coverage detected