mirror of
https://github.com/frappe/bench.git
synced 2025-01-08 00:04:38 +00:00
feat: Allow skipping supervisord config check in setup supervisor
This commit is contained in:
parent
26e5630265
commit
a3af905d92
@ -49,7 +49,13 @@ def reload_nginx():
|
||||
@click.option(
|
||||
"--skip-redis", help="Skip redis configuration", is_flag=True, default=False
|
||||
)
|
||||
def setup_supervisor(user=None, yes=False, skip_redis=False):
|
||||
@click.option(
|
||||
"--skip-supervisord",
|
||||
help="Skip supervisord configuration",
|
||||
is_flag=True,
|
||||
default=False,
|
||||
)
|
||||
def setup_supervisor(user=None, yes=False, skip_redis=False, skip_supervisord=False):
|
||||
from bench.utils import get_cmd_output
|
||||
from bench.config.supervisor import (
|
||||
update_supervisord_config,
|
||||
@ -58,8 +64,10 @@ def setup_supervisor(user=None, yes=False, skip_redis=False):
|
||||
|
||||
which("supervisorctl", raise_err=True)
|
||||
|
||||
if "Permission denied" in get_cmd_output("supervisorctl status"):
|
||||
update_supervisord_config(user=user, yes=yes)
|
||||
if not skip_supervisord and "Permission denied" in get_cmd_output(
|
||||
"supervisorctl status"
|
||||
):
|
||||
update_supervisord_config(user=user)
|
||||
|
||||
generate_supervisor_config(bench_path=".", user=user, yes=yes, skip_redis=skip_redis)
|
||||
|
||||
|
@ -48,7 +48,7 @@ def setup_production(user, bench_path=".", yes=False):
|
||||
generate_systemd_config(bench_path=bench_path, user=user, yes=yes)
|
||||
else:
|
||||
print("Setting Up supervisor...")
|
||||
update_supervisord_config(user=user, yes=yes)
|
||||
update_supervisord_config(user=user)
|
||||
generate_supervisor_config(bench_path=bench_path, user=user, yes=yes)
|
||||
|
||||
print("Setting Up NGINX...")
|
||||
|
Loading…
Reference in New Issue
Block a user