mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
net/haproxy: export required files before running syntax check
This commit is contained in:
+3
-1
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user