MEDIUM: peers: add the "localpeer" global option
localpeer <name>
Sets the local instance's peer name. It will be ignored if the "-L"
command line argument is specified or if used after "peers" section
definitions. In such cases, a warning message will be emitted during
the configuration parsing.
This option will also set the HAPROXY_LOCALPEER environment variable.
See also "-L" in the management guide and "peers" section in the
configuration manual.
diff --git a/src/haproxy.c b/src/haproxy.c
index 1efa3ac..06e5a22 100644
--- a/src/haproxy.c
+++ b/src/haproxy.c
@@ -1964,6 +1964,7 @@
exit(EXIT_FAILURE);
}
setenv("HAPROXY_LOCALPEER", localpeer, 1);
+ global.localpeer_cmdline = 1;
break;
case 'f' :
if (!list_append_word(&cfg_cfgfiles, *argv, &err_msg)) {