mirror of
https://github.com/frappe/bench.git
synced 2024-11-14 17:24:04 +00:00
[Fix] Create symlinks for supervisor and nginx only if they do not exist
This commit is contained in:
parent
b324bc422d
commit
a890be44b8
@ -16,8 +16,11 @@ def setup_production(user, bench='.'):
|
|||||||
supervisor_conf = os.path.join(get_supervisor_confdir(), '{bench_name}.{extn}'.format(
|
supervisor_conf = os.path.join(get_supervisor_confdir(), '{bench_name}.{extn}'.format(
|
||||||
bench_name=bench_name, extn=supervisor_conf_extn))
|
bench_name=bench_name, extn=supervisor_conf_extn))
|
||||||
|
|
||||||
|
# Check if symlink exists, If not then create it.
|
||||||
|
if not os.path.islink(supervisor_conf):
|
||||||
os.symlink(os.path.abspath(os.path.join(bench, 'config', 'supervisor.conf')), supervisor_conf)
|
os.symlink(os.path.abspath(os.path.join(bench, 'config', 'supervisor.conf')), supervisor_conf)
|
||||||
|
|
||||||
|
if not os.path.islink(nginx_conf):
|
||||||
os.symlink(os.path.abspath(os.path.join(bench, 'config', 'nginx.conf')), nginx_conf)
|
os.symlink(os.path.abspath(os.path.join(bench, 'config', 'nginx.conf')), nginx_conf)
|
||||||
|
|
||||||
exec_cmd('supervisorctl reload')
|
exec_cmd('supervisorctl reload')
|
||||||
|
Loading…
Reference in New Issue
Block a user