mirror of
https://github.com/opnsense/plugins.git
synced 2026-06-08 16:34:18 -04:00
net/haproxy: export required files before running syntax check
This commit is contained in:
parent
2050ac7cb9
commit
b0a39e7afa
1 changed files with 3 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue