net/haproxy: export required files before running syntax check

This commit is contained in:
Frank Wall
2016-04-19 11:36:19 +02:00
parent 2050ac7cb9
commit b0a39e7afa
@@ -161,7 +161,9 @@ class ServiceController extends ApiControllerBase
$backend = new Backend();
// first generate template based on current configuration
$backend->configdRun("template reload OPNsense.HAProxy");
// now run the syntax check
// now export all the required files (or syntax check will fail)
$backend->configdRun("haproxy setup");
// finally run the syntax check
$response = $backend->configdRun("haproxy configtest");
return array("result" => $response);
}