gerrit.wikimedia.org
Gitiles
Code ReviewSign In
gerrit.wikimedia.org / operations / debs / wmf-sre-laptop / da48c987fcf1a1b0191074bfe26d0e14dac7fceb^! / .
commitda48c987fcf1a1b0191074bfe26d0e14dac7fceb[log] [tgz]
authorMatthew Vernon <mvernon@wikimedia.org>Wed Aug 04 09:12:23 2021 +0100
committerMatthew Vernon <mvernon@wikimedia.org>Wed Aug 04 09:12:23 2021 +0100
treed41db51aa3e4ac67d766ce7d07a6a6fe4399b93f
parentdfc538dfb9e1e4931b86c979a6956a4537294df3 [diff]
wmf-update-ssh-config: add option to skip systemd activation People might either not want the systemd service activating or not be running systemd; so add an option to skip the systemd service activation. Change-Id: Ic6642e2381042fb1cb7373ee5c19acc329f9f2a1
diff --git a/scripts/wmf-update-ssh-config b/scripts/wmf-update-ssh-config index bbfecb2..4cedddd 100755 --- a/scripts/wmf-update-ssh-config +++ b/scripts/wmf-update-ssh-config
@@ -70,6 +70,9 @@ parser = argparse.ArgumentParser() parser.add_argument("configfile", metavar="OUTPUT_FILE", nargs="?", default="", help="File to write SSH config to (defaults to ~/.ssh/config)")+ parser.add_argument("-s", "--skip-systemd",+ help="Skip systemd service activation",+ action="store_true") args = parser.parse_args() ssh_dir = Path.home().joinpath(".ssh") keys = {}@@ -85,8 +88,9 @@ update_ssh_config(configfile, keys) make_known_hosts_dir(ssh_dir) # Now let's ensure the services are up and running.- for env in ENVS:- start_systemd(env)+ if args.skip_systemd == False:+ for env in ENVS:+ start_systemd(env) if __name__ == "__main__":
Powered by Gitiles
txt
json