diff --git a/bench/commands/setup.py b/bench/commands/setup.py index 703e20fa..918aabe2 100755 --- a/bench/commands/setup.py +++ b/bench/commands/setup.py @@ -50,10 +50,11 @@ def setup_fonts(): @click.command('production') @click.argument('user') -def setup_production(user): +@click.option('--yes', help='Yes to regeneration config', is_flag=True, default=False) +def setup_production(user, yes=False): "setup bench for production" from bench.config.production_setup import setup_production - setup_production(user=user) + setup_production(user=user, yes=yes) @click.command('auto-update') diff --git a/bench/config/production_setup.py b/bench/config/production_setup.py index 3106f41f..afde3ff8 100755 --- a/bench/config/production_setup.py +++ b/bench/config/production_setup.py @@ -3,9 +3,9 @@ from bench.config.supervisor import generate_supervisor_config from bench.config.nginx import make_nginx_conf import os, subprocess -def setup_production(user, bench_path='.'): - generate_supervisor_config(bench_path=bench_path, user=user) - make_nginx_conf(bench_path=bench_path) +def setup_production(user, bench_path='.', yes=False): + generate_supervisor_config(bench_path=bench_path, user=user, yes=yes) + make_nginx_conf(bench_path=bench_path, yes=yes) fix_prod_setup_perms(bench_path, frappe_user=user) remove_default_nginx_configs()