mirror of
https://github.com/frappe/bench.git
synced 2025-01-24 07:28:25 +00:00
fix: Try setting supervisord conditionally
This commit is contained in:
parent
d89f19e02e
commit
7a4ade9192
@ -41,9 +41,12 @@ def reload_nginx():
|
|||||||
@click.option("--yes", help="Yes to regeneration of supervisor config", is_flag=True, default=False)
|
@click.option("--yes", help="Yes to regeneration of supervisor config", is_flag=True, default=False)
|
||||||
@click.option("--skip-redis", help="Skip redis configuration", is_flag=True, default=False)
|
@click.option("--skip-redis", help="Skip redis configuration", is_flag=True, default=False)
|
||||||
def setup_supervisor(user=None, yes=False, skip_redis=False):
|
def setup_supervisor(user=None, yes=False, skip_redis=False):
|
||||||
|
from bench.utils import get_cmd_output
|
||||||
from bench.config.supervisor import update_supervisord_config, generate_supervisor_config
|
from bench.config.supervisor import update_supervisord_config, generate_supervisor_config
|
||||||
|
|
||||||
update_supervisord_config(user=user, yes=yes)
|
if "Permission denied" in get_cmd_output("supervisorctl status"):
|
||||||
|
update_supervisord_config(user=user, yes=yes)
|
||||||
|
|
||||||
generate_supervisor_config(bench_path=".", user=user, yes=yes, skip_redis=skip_redis)
|
generate_supervisor_config(bench_path=".", user=user, yes=yes, skip_redis=skip_redis)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user