2
0
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:
Gavin D'souza 2022-08-04 12:13:10 +05:30
parent 26e5630265
commit a3af905d92
2 changed files with 12 additions and 4 deletions

View File

@ -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)

View File

@ -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...")