mirror of
https://github.com/frappe/bench.git
synced 2024-11-13 16:56:33 +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,9 +16,12 @@ def setup_production(user, bench='.'):
|
||||
supervisor_conf = os.path.join(get_supervisor_confdir(), '{bench_name}.{extn}'.format(
|
||||
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)
|
||||
os.symlink(os.path.abspath(os.path.join(bench, 'config', 'nginx.conf')), nginx_conf)
|
||||
if not os.path.islink(nginx_conf):
|
||||
os.symlink(os.path.abspath(os.path.join(bench, 'config', 'nginx.conf')), nginx_conf)
|
||||
|
||||
exec_cmd('supervisorctl reload')
|
||||
if os.environ.get('NO_SERVICE_RESTART'):
|
||||
|
Loading…
Reference in New Issue
Block a user