From 64982d1b34a12dd83b0e18c20cf1f6f63eedc3c7 Mon Sep 17 00:00:00 2001 From: gauthiier Date: Sat, 19 Mar 2022 13:28:06 +0100 Subject: [PATCH] tabs --- vhost/vhost.py | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/vhost/vhost.py b/vhost/vhost.py index 3f0fc26..1131a88 100755 --- a/vhost/vhost.py +++ b/vhost/vhost.py @@ -194,31 +194,31 @@ def vhost_remove(domain: str, sv: str, dist: str): if __name__ == "__main__": - p = argparse.ArgumentParser(description='vhost helper') - p.add_argument('domain', metavar="domain", help="vhost domain(s)", nargs="+") - g = p.add_mutually_exclusive_group() - g.add_argument('-a', '--add', action='store_true', help="adds vhost for given domain(s)") - g.add_argument('-r', '--remove', action='store_true', help="removes vhost for given domain(s)") + p = argparse.ArgumentParser(description='vhost helper') + p.add_argument('domain', metavar="domain", help="vhost domain(s)", nargs="+") + g = p.add_mutually_exclusive_group() + g.add_argument('-a', '--add', action='store_true', help="adds vhost for given domain(s)") + g.add_argument('-r', '--remove', action='store_true', help="removes vhost for given domain(s)") - args = p.parse_args() + args = p.parse_args() - print('1. sanity checks') + print('1. sanity checks') - sv, dist = sanity_check_system() - sanity_check_platform() + sv, dist = sanity_check_system() + sanity_check_platform() - print('2. vhosting') + print('2. vhosting') - for d in args.domain: - if args.add: - vhost_add(d, sv, dist) - elif args.remove: - vhost_remove(d, sv, dist) + for d in args.domain: + if args.add: + vhost_add(d, sv, dist) + elif args.remove: + vhost_remove(d, sv, dist) - if y_n_question(f"Reload {sv}?"): + if y_n_question(f"Reload {sv}?"): subprocess.call(['sudo', 'service', sv.lower(), 'reload']) - - print('done.') + + print('done.')