2
0
mirror of https://github.com/frappe/bench.git synced 2025-01-09 00:21:23 +00:00

Merge pull request #183 from shreyasp/master

[Fix] To disallow sym-link creation
This commit is contained in:
Rushabh Mehta 2016-02-22 15:05:09 +05:30
commit 4dc342100b

View File

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