Add --listen-address flag to geard

Add the ability for an operator to control which interface to listen
on. By default we use None to maintain backwards compatibility.

Change-Id: I14c13ff500317d5a7b580e1b2a7f798a8db5de1d
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2018-04-16 15:48:25 -04:00
parent 5ad274a17e
commit c00ca944db
No known key found for this signature in database
GPG Key ID: 611A80832067AF38
1 changed files with 4 additions and 0 deletions

View File

@ -47,6 +47,9 @@ support.
help='do not run as a daemon')
parser.add_argument('-p', dest='port', default=4730,
help='port on which to listen')
parser.add_argument('--listen-address', dest='listen_address',
default=None,
help='IP address or domain name to listen on')
parser.add_argument('--log-config', dest='log_config',
help='logging config file')
parser.add_argument('--pidfile', dest='pidfile',
@ -122,6 +125,7 @@ support.
statsd_port,
statsd_prefix,
acl=acl,
host=self.args.listen_address,
keepalive=self.args.keepalive,
tcp_keepidle=self.args.tcp_keepidle,
tcp_keepintvl=self.args.tcp_keepintvl,