aboutsummaryrefslogtreecommitdiffstats
path: root/config/haproxy/haproxy.inc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2013-08-29 12:34:20 -0400
committerjim-p <jimp@pfsense.org>2013-08-29 12:34:20 -0400
commit4faa97a29e62d37ff7a75488c82e39cd909feb96 (patch)
tree8e4b75c4276375a76fd4a4c8779a57b8fcd65913 /config/haproxy/haproxy.inc
parent6f8bef0a95e943f35144b342f12013638dde27e3 (diff)
downloadpfsense-packages-4faa97a29e62d37ff7a75488c82e39cd909feb96.tar.gz
pfsense-packages-4faa97a29e62d37ff7a75488c82e39cd909feb96.tar.bz2
pfsense-packages-4faa97a29e62d37ff7a75488c82e39cd909feb96.zip
Add a manual config validation option to HAproxy (using -c to only check config file)
Diffstat (limited to 'config/haproxy/haproxy.inc')
-rw-r--r--config/haproxy/haproxy.inc5
1 files changed, 5 insertions, 0 deletions
diff --git a/config/haproxy/haproxy.inc b/config/haproxy/haproxy.inc
index 61957252..aa8d5a3e 100644
--- a/config/haproxy/haproxy.inc
+++ b/config/haproxy/haproxy.inc
@@ -637,6 +637,11 @@ function haproxy_is_running() {
return $running;
}
+function haproxy_check_config() {
+ exec("/usr/local/sbin/haproxy -c -f /var/etc/haproxy.cfg 2>&1", $output);
+ return implode("\n", $output);
+}
+
function haproxy_check_run($reload) {
global $config, $g;