MINOR: haproxy: Add `-cc` argument
This patch adds the `-cc` (check condition) argument to evaluate conditions on
startup and return the result as the exit code.
As an example this can be used to easily check HAProxy's version in scripts:
haproxy -cc 'version_atleast(2.4)'
This resolves GitHub issue #1246.
Co-authored-by: Tim Duesterhus <tim@bastelstu.be>
diff --git a/doc/configuration.txt b/doc/configuration.txt
index 5b1768e..1fb6094 100644
--- a/doc/configuration.txt
+++ b/doc/configuration.txt
@@ -802,6 +802,9 @@
ignored. The directives are tokenized like other configuration directives, and
as such it is possible to use environment variables in conditions.
+Conditions can also be evaluated on startup with the -cc parameter.
+See "3. Starting HAProxy" in the management doc.
+
The conditions are currently limited to:
- an empty string, always returns "false"