diff --git a/bench/commands/setup.py b/bench/commands/setup.py index 2c9f3e04..e45347fd 100644 --- a/bench/commands/setup.py +++ b/bench/commands/setup.py @@ -155,6 +155,7 @@ def sync_domains(domains, site=None): setup.add_command(setup_sudoers) setup.add_command(setup_nginx) +setup.add_command(reload_nginx) setup.add_command(setup_supervisor) setup.add_command(setup_redis) setup.add_command(setup_letsencrypt) diff --git a/bench/config/production_setup.py b/bench/config/production_setup.py index 302df30e..f00559d8 100755 --- a/bench/config/production_setup.py +++ b/bench/config/production_setup.py @@ -1,4 +1,4 @@ -from bench.utils import get_program, exec_cmd, get_cmd_output, fix_prod_setup_perms, get_bench_name +from bench.utils import get_program, exec_cmd, get_cmd_output, fix_prod_setup_perms, get_bench_name, find_executable from bench.config.supervisor import generate_supervisor_config from bench.config.nginx import make_nginx_conf import os @@ -99,5 +99,5 @@ def update_supervisor(): exec_cmd('sudo supervisorctl update') def reload_nginx(): - exec_cmd(['sudo', 'nginx', '-t']) + exec_cmd(['sudo', find_executable('nginx'), '-t']) service('nginx', 'reload')