mirror of
https://github.com/frappe/bench.git
synced 2025-01-24 15:38:25 +00:00
[fix] setup sudoers
This commit is contained in:
parent
8b5a1b7028
commit
8b76f2808b
@ -195,7 +195,7 @@ def update_bench():
|
|||||||
def setup_sudoers(user):
|
def setup_sudoers(user):
|
||||||
sudoers_file = '/etc/sudoers.d/frappe'
|
sudoers_file = '/etc/sudoers.d/frappe'
|
||||||
with open(sudoers_file, 'w') as f:
|
with open(sudoers_file, 'w') as f:
|
||||||
f.write("{user} ALL=(ALL) NOPASSWD: {supervisorctl} restart frappe\:\n".format(
|
f.write("{user} ALL=(ALL) NOPASSWD: {supervisorctl}\n".format(
|
||||||
user=user,
|
user=user,
|
||||||
supervisorctl=subprocess.check_output('which supervisorctl', shell=True).strip()))
|
supervisorctl=subprocess.check_output('which supervisorctl', shell=True).strip()))
|
||||||
os.chmod(sudoers_file, 0440)
|
os.chmod(sudoers_file, 0440)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user