2
0
mirror of https://github.com/frappe/bench.git synced 2024-09-23 04:29:02 +00:00

[Fix] Fixed symlink creation for supervisor.conf and nginx.conf for already existing conf files

This commit is contained in:
shreyas 2016-02-22 14:43:33 +05:30
parent d8a4c303eb
commit d4b0e0f70d

View File

@ -61,8 +61,15 @@ def setup_production(user, bench='.'):
else:
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', 'nginx.conf')), '/etc/nginx/conf.d/frappe.conf')
supervisor_conf_path = os.path.join(get_supervisor_confdir(), supervisor_conf_filename)
nginx_conf_path = '/etc/nginx/conf.d/frappe.conf'
if not os.path.exists(supervisor_conf_path):
os.symlink(os.path.abspath(os.path.join(bench, 'config', 'supervisor.conf')), supervisor_conf_path)
if not os.path.exists(nginx_conf_path):
os.symlink(os.path.abspath(os.path.join(bench, 'config', 'nginx.conf')), nginx_conf_path)
exec_cmd('supervisorctl reload')
if os.environ.get('NO_SERVICE_RESTART'):
return