mirror of
https://github.com/frappe/bench.git
synced 2025-01-09 16:36:25 +00:00
Check if production dependencies are installed
This commit is contained in:
parent
8cb621cfdd
commit
d2c5e3d544
@ -55,9 +55,14 @@ def setup_production(user, yes=False):
|
||||
from bench.config.production_setup import setup_production
|
||||
from bench.utils import run_playbook
|
||||
# Install prereqs for production
|
||||
from distutils.spawn import find_executable
|
||||
if not find_executable('ansible'):
|
||||
exec_cmd("sudo pip install ansible")
|
||||
if not find_executable('fail2ban-client'):
|
||||
exec_cmd("bench setup role fail2ban")
|
||||
if not find_executable('nginx'):
|
||||
exec_cmd("bench setup role nginx")
|
||||
if not find_executable('supervisord'):
|
||||
exec_cmd("bench setup role supervisor")
|
||||
setup_production(user=user, yes=yes)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user