2
0
mirror of https://github.com/frappe/bench.git synced 2024-11-11 15:51:03 +00:00

fix setup production

This commit is contained in:
Pratik Vyas 2014-11-04 18:13:18 +05:30
parent c2d58a2789
commit 2509347b4d
2 changed files with 3 additions and 3 deletions

View File

@ -230,7 +230,7 @@ def setup_supervisor():
@click.command('production') @click.command('production')
def setup_production(): def setup_production():
"setup bench for production" "setup bench for production"
_setup_production _setup_production()
@click.command('auto-update') @click.command('auto-update')
def setup_auto_update(): def setup_auto_update():

View File

@ -12,7 +12,7 @@ def restart_service(service):
exec_cmd("{prog} {service} restart ".format(prog=program, service=service)) exec_cmd("{prog} {service} restart ".format(prog=program, service=service))
def get_supervisor_confdir(): 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: for possiblity in possiblities:
if os.path.exists(possiblity): if os.path.exists(possiblity):
return possiblity return possiblity
@ -35,6 +35,6 @@ def setup_production(bench='.'):
supervisor_conf_filename = 'frappe.conf' 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')), 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') exec_cmd('supervisorctl reload')
restart_service('nginx') restart_service('nginx')