2
0
mirror of https://github.com/frappe/bench.git synced 2025-01-25 07:58:24 +00:00

[fix] reload supervisor instead of reread/update

This commit is contained in:
Anand Doshi 2016-07-07 21:05:01 +05:30
parent c9cdb2c2ee
commit cd5206a11a

View File

@ -23,7 +23,7 @@ def setup_production(user, bench_path='.'):
if not os.path.islink(nginx_conf): if not os.path.islink(nginx_conf):
os.symlink(os.path.abspath(os.path.join(bench_path, 'config', 'nginx.conf')), nginx_conf) os.symlink(os.path.abspath(os.path.join(bench_path, 'config', 'nginx.conf')), nginx_conf)
update_supervisor() reload_supervisor()
if os.environ.get('NO_SERVICE_RESTART'): if os.environ.get('NO_SERVICE_RESTART'):
return return
@ -94,9 +94,10 @@ def is_running_systemd():
return True return True
return False return False
def update_supervisor(): def reload_supervisor():
exec_cmd('sudo supervisorctl reread') exec_cmd('sudo supervisorctl reload')
exec_cmd('sudo supervisorctl update') # exec_cmd('sudo supervisorctl reread')
# exec_cmd('sudo supervisorctl update')
def reload_nginx(): def reload_nginx():
subprocess.check_output(['sudo', find_executable('nginx'), '-t']) subprocess.check_output(['sudo', find_executable('nginx'), '-t'])