~mdw
/
hippotat
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
hippotatd: support --print-config
[hippotat]
/
hippotatd
diff --git
a/hippotatd
b/hippotatd
index
e3e42fb
..
a235929
100755
(executable)
--- a/
hippotatd
+++ b/
hippotatd
@@
-326,6
+326,12
@@
def process_cfg(_opts, putative_servers, putative_clients):
('peer', 'vrelay'),
('rnets','vnetwork')))
('peer', 'vrelay'),
('rnets','vnetwork')))
+ if opts.printconfig is not None:
+ try: val = cfg.get(c.server, opts.printconfig)
+ except NoOptionError: pass
+ else: print(val)
+ sys.exit(0)
+
def catch_termination():
def run_cleanups():
for cleanup in cleanups:
def catch_termination():
def run_cleanups():
for cleanup in cleanups:
@@
-446,6
+452,12
@@
optparser.add_option('--syslog-facility',
default=None,
help='log to syslog, with specified facility')
default=None,
help='log to syslog, with specified facility')
+optparser.add_option('--print-config',
+ nargs=1, type='string',action='store',
+ metavar='OPTION', dest='printconfig',
+ default=None,
+ help='print one config option value and exit')
+
common_startup(process_cfg)
catch_termination()
start_http()
common_startup(process_cfg)
catch_termination()
start_http()