diff --git a/bench/config.py b/bench/config.py index 0309502f..1177aa76 100644 --- a/bench/config.py +++ b/bench/config.py @@ -37,7 +37,7 @@ def generate_supervisor_config(bench='.', user=None): "user": user, "http_timeout": config.get("http_timeout", 120), "redis_server": find_executable('redis-server'), - "node": find_executable('node'), + "node": find_executable('node') or find_executable('nodejs'), "redis_cache_config": os.path.join(bench_dir, 'config', 'redis_cache.conf'), "redis_async_broker_config": os.path.join(bench_dir, 'config', 'redis_async_broker.conf'), "frappe_version": get_current_frappe_version() diff --git a/bench/utils.py b/bench/utils.py index 12d8bb7d..a691440d 100644 --- a/bench/utils.py +++ b/bench/utils.py @@ -497,7 +497,7 @@ def get_frappe_cmd_output(*args, **kwargs): def validate_upgrade(from_ver, to_ver, bench='.'): if to_ver >= 6: - if not find_executable('npm') and not find_executable('node'): + if not find_executable('npm') and not (find_executable('node') or find_executable('nodejs')): raise Exception("Please install nodejs and npm") def pre_upgrade(from_ver, to_ver, bench='.'): @@ -520,14 +520,14 @@ def post_upgrade(from_ver, to_ver, bench='.'): print "Your bench was upgraded to version {0}".format(to_ver) if conf.get('restart_supervisor_on_update'): + generate_redis_cache_config(bench=bench) + generate_supervisor_config(bench=bench) + generate_nginx_config(bench=bench) + if from_ver == 4 and to_ver == 5: - generate_redis_cache_config(bench=bench) - generate_supervisor_config(bench=bench) - generate_nginx_config(bench=bench) setup_backups(bench=bench) if from_ver <= 5 and to_ver == 6: - generate_redis_cache_config(bench=bench) generate_redis_async_broker_config(bench=bench) print "As you have setup your bench for production, you will have to reload configuration for nginx and supervisor" @@ -536,7 +536,7 @@ def post_upgrade(from_ver, to_ver, bench='.'): print "sudo service nginx restart" print "sudo supervisorctl reload" - if (to_ver >= 5): + if to_ver >= 5: # For dev server. Always set this up incase someone wants to start a dev server. setup_procfile(bench=bench)