mirror of
https://github.com/frappe/bench.git
synced 2024-11-12 00:06:36 +00:00
fix: restart supervisord process after change in conf
This commit is contained in:
parent
a8688db8dc
commit
ec1acec788
@ -5,7 +5,7 @@ import subprocess
|
|||||||
|
|
||||||
# imports - module imports
|
# imports - module imports
|
||||||
from bench.cli import change_uid_msg
|
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.config.common_site_config import get_config
|
||||||
from bench.utils import exec_cmd, get_bench_name, get_cmd_output
|
from bench.utils import exec_cmd, get_bench_name, get_cmd_output
|
||||||
|
|
||||||
@ -53,7 +53,8 @@ def execute(bench_path):
|
|||||||
user = get_config('.').get("frappe_user") or getpass.getuser()
|
user = get_config('.').get("frappe_user") or getpass.getuser()
|
||||||
|
|
||||||
if is_sudoers_set():
|
if is_sudoers_set():
|
||||||
exec_cmd("sudo bench setup sudoers {user}".format(user=user))
|
|
||||||
|
|
||||||
if is_production_set(bench_path):
|
if is_production_set(bench_path):
|
||||||
exec_cmd("sudo bench setup supervisor --yes --user {user}".format(user=user))
|
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))
|
||||||
|
Loading…
Reference in New Issue
Block a user