From 2509347b4de110894dbec08518a62ed9c4e40693 Mon Sep 17 00:00:00 2001 From: Pratik Vyas Date: Tue, 4 Nov 2014 18:13:18 +0530 Subject: [PATCH] fix setup production --- bench/cli.py | 2 +- bench/production_setup.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bench/cli.py b/bench/cli.py index 96d6b7bf..2daea818 100644 --- a/bench/cli.py +++ b/bench/cli.py @@ -230,7 +230,7 @@ def setup_supervisor(): @click.command('production') def setup_production(): "setup bench for production" - _setup_production + _setup_production() @click.command('auto-update') def setup_auto_update(): diff --git a/bench/production_setup.py b/bench/production_setup.py index 6aaf4e6d..4c03a63c 100644 --- a/bench/production_setup.py +++ b/bench/production_setup.py @@ -12,7 +12,7 @@ def restart_service(service): exec_cmd("{prog} {service} restart ".format(prog=program, service=service)) def get_supervisor_confdir(): - possiblities = ('/etc/supervisor/conf.d', '/etc/supervisor.d/', '/etc/supervisord/conf.d') + possiblities = ('/etc/supervisor/conf.d', '/etc/supervisor.d/', '/etc/supervisord/conf.d', '/etc/supervisord.d') for possiblity in possiblities: if os.path.exists(possiblity): return possiblity @@ -35,6 +35,6 @@ def setup_production(bench='.'): supervisor_conf_filename = 'frappe.conf' os.symlink(os.path.abspath(os.path.join(bench, 'config', 'supervisor.conf')), os.path.join(get_supervisor_confdir(), supervisor_conf_filename)) - os.symlink(os.path.abspath(os.path.join(bench, 'config', 'supervisor.conf')), '/etc/nginx/conf.d/frappe.conf') + os.symlink(os.path.abspath(os.path.join(bench, 'config', 'nginx.conf')), '/etc/nginx/conf.d/frappe.conf') exec_cmd('supervisorctl reload') restart_service('nginx')