Skip to content

Commit

Permalink
fix: added verbosity
Browse files Browse the repository at this point in the history
  • Loading branch information
gavindsouza committed Jul 13, 2020
1 parent 2fa84e6 commit fb5e150
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bench/config/production_setup.py
Expand Up @@ -28,22 +28,28 @@ def setup_production_prerequisites():


def setup_production(user, bench_path='.', yes=False):
print("Setting Up prerequisites...")
setup_production_prerequisites()
if get_config(bench_path).get('restart_supervisor_on_update') and get_config(bench_path).get('restart_systemd_on_update'):
raise Exception("You cannot use supervisor and systemd at the same time. Modify your common_site_config accordingly." )

if get_config(bench_path).get('restart_systemd_on_update'):
print("Setting Up systemd...")
generate_systemd_config(bench_path=bench_path, user=user, yes=yes)
else:
print("Setting Up supervisor...")
update_supervisord_config(user=user, yes=yes)
generate_supervisor_config(bench_path=bench_path, user=user, yes=yes)

print("Setting Up NGINX...")
make_nginx_conf(bench_path=bench_path, yes=yes)
fix_prod_setup_perms(bench_path, frappe_user=user)
remove_default_nginx_configs()

bench_name = get_bench_name(bench_path)
nginx_conf = '/etc/nginx/conf.d/{bench_name}.conf'.format(bench_name=bench_name)

print("Setting Up symlinks and reloading services...")
if get_config(bench_path).get('restart_supervisor_on_update'):
supervisor_conf_extn = "ini" if is_centos7() else "conf"
supervisor_conf = os.path.join(get_supervisor_confdir(), '{bench_name}.{extn}'.format(
Expand Down

0 comments on commit fb5e150

Please sign in to comment.