server: make 'restart' accept --disallow-list too

I should really move all the start/restart common arguments into a separate
place, to make it easier to avoid this problem in the future.
This commit is contained in:
Brian Warner 2017-06-26 14:13:38 +01:00
parent 4169545c28
commit 900c3f8c29

View File

@ -98,9 +98,13 @@ def start(cfg, signal_error, no_daemon, blur_usage, advertise_version,
"--signal-error", is_flag=True, "--signal-error", is_flag=True,
help="force all clients to fail with a message", help="force all clients to fail with a message",
) )
@click.option(
"--disallow-list", is_flag=True,
help="never send list of allocated nameplates",
)
@click.pass_obj @click.pass_obj
def restart(cfg, signal_error, no_daemon, blur_usage, advertise_version, def restart(cfg, signal_error, no_daemon, blur_usage, advertise_version,
transit, rendezvous): transit, rendezvous, disallow_list):
""" """
Re-start a relay server Re-start a relay server
""" """
@ -111,6 +115,7 @@ def restart(cfg, signal_error, no_daemon, blur_usage, advertise_version,
cfg.transit = str(transit) cfg.transit = str(transit)
cfg.rendezvous = str(rendezvous) cfg.rendezvous = str(rendezvous)
cfg.signal_error = signal_error cfg.signal_error = signal_error
cfg.allow_list = not disallow_list
restart_server(cfg) restart_server(cfg)