From cd51df6a4c98e0472c5f1a4af855e0396e065ebf Mon Sep 17 00:00:00 2001 From: Pratik Vyas Date: Fri, 25 Jul 2014 12:20:26 +0530 Subject: [PATCH] re generate config on set-nginx-port --- bench/utils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bench/utils.py b/bench/utils.py index 3730b8be..2c459d09 100644 --- a/bench/utils.py +++ b/bench/utils.py @@ -11,6 +11,7 @@ logger = logging.getLogger(__name__) default_config = { 'restart_supervisor_on_update': False, 'auto_update': True, + 'serve_default_site': True, 'update_bench_on_update': True, 'shallow_clone': True } @@ -204,10 +205,13 @@ def update_site_config(site, new_config, bench='.'): config.update(new_config) put_site_config(site, config, bench=bench) -def set_nginx_port(site, port, bench='.'): +def set_nginx_port(site, port, bench='.', gen_config=True): + from .config import generate_nginx_config if site not in get_sites(bench=bench): raise Exception("No such site") update_site_config(site, {"nginx_port": port}, bench=bench) + if gen_config: + generate_nginx_config() def set_default_site(site, bench='.'): if not site in get_sites(bench=bench):