From 91de45adf4a3caea59040334d1e1e1beb3cc2a15 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 7 Jul 2016 20:15:26 +0530 Subject: [PATCH] [fix] bench setup reload-nginx --- bench/commands/setup.py | 1 + bench/config/production_setup.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) 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')