Skip to content

Commit

Permalink
fix: restart supervisord process after change in conf
Browse files Browse the repository at this point in the history
  • Loading branch information
gavindsouza committed May 11, 2020
1 parent a8688db commit ec1acec
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bench/patches/v5/fix_user_permissions.py
Expand Up @@ -5,7 +5,7 @@

# imports - module imports
from bench.cli import change_uid_msg
from bench.config.production_setup import get_supervisor_confdir, is_centos7
from bench.config.production_setup import get_supervisor_confdir, is_centos7, service
from bench.config.common_site_config import get_config
from bench.utils import exec_cmd, get_bench_name, get_cmd_output

Expand Down Expand Up @@ -53,7 +53,8 @@ def execute(bench_path):
user = get_config('.').get("frappe_user") or getpass.getuser()

if is_sudoers_set():
exec_cmd("sudo bench setup sudoers {user}".format(user=user))

if is_production_set(bench_path):
exec_cmd("sudo bench setup supervisor --yes --user {user}".format(user=user))
service("supervisord", "restart")

exec_cmd("sudo bench setup sudoers {user}".format(user=user))

0 comments on commit ec1acec

Please sign in to comment.