Browse Source

Merge branch 'python' of https://github.com/rtCamp/easyengine into python

bugfixes
shital.rtcamp 10 years ago
parent
commit
0e61618990
  1. 8
      ee/cli/plugins/site_functions.py
  2. 4
      ee/cli/plugins/stack.py

8
ee/cli/plugins/site_functions.py

@ -112,15 +112,15 @@ def setupdatabase(self, data):
# create MySQL database # create MySQL database
Log.info(self, "Setting up database\t\t", end='') Log.info(self, "Setting up database\t\t", end='')
Log.debug(self, "Creating databse {0}".format(ee_db_name)) Log.debug(self, "Creating databse {0}".format(ee_db_name))
EEMysql.execute(self, "create database {0}" EEMysql.execute(self, "create database `{0}`"
.format(ee_db_name), errormsg="Cannot create database") .format(ee_db_name), errormsg="Cannot create database")
# Create MySQL User # Create MySQL User
Log.debug(self, "Creating user {0}".format(ee_db_username)) Log.debug(self, "Creating user {0}".format(ee_db_username))
Log.debug(self, "create user {0}@{1} identified by ''" Log.debug(self, "create user `{0}`@`{1}` identified by ''"
.format(ee_db_username, ee_mysql_grant_host)) .format(ee_db_username, ee_mysql_grant_host))
EEMysql.execute(self, EEMysql.execute(self,
"create user {0}@{1} identified by '{2}'" "create user `{0}`@`{1}` identified by '{2}'"
.format(ee_db_username, ee_mysql_grant_host, .format(ee_db_username, ee_mysql_grant_host,
ee_db_password), ee_db_password),
errormsg="Cannot setup database user", log=False) errormsg="Cannot setup database user", log=False)
@ -128,7 +128,7 @@ def setupdatabase(self, data):
# Grant permission # Grant permission
Log.debug(self, "Setting up user privileges") Log.debug(self, "Setting up user privileges")
EEMysql.execute(self, EEMysql.execute(self,
"grant all privileges on {0}.* to {1}@{2}" "grant all privileges on `{0}`.* to `{1}`@`{2}`"
.format(ee_db_name, ee_db_username, ee_mysql_grant_host), .format(ee_db_name, ee_db_username, ee_mysql_grant_host),
errormsg="Cannot setup database user privileges") errormsg="Cannot setup database user privileges")
Log.info(self, "[" + Log.ENDC + "Done" + Log.OKBLUE + "]") Log.info(self, "[" + Log.ENDC + "Done" + Log.OKBLUE + "]")

4
ee/cli/plugins/stack.py

@ -155,8 +155,8 @@ class EEStackController(CementBaseController):
EEService.reload_service(self, 'postfix') EEService.reload_service(self, 'postfix')
if set(EEVariables.ee_nginx).issubset(set(apt_packages)): if set(EEVariables.ee_nginx).issubset(set(apt_packages)):
if ((not os.path.isfile('/etc/nginx/conf.d/ee-nginx.conf')) and if ((not EEShellExec.cmd_exec(self, "grep -Hr EasyEngine "
os.path.isfile('/etc/nginx/nginx.conf')): "/etc/nginx")) and os.path.isfile('/etc/nginx/nginx.conf')):
nc = NginxConfig() nc = NginxConfig()
Log.debug(self, 'Loading file /etc/nginx/nginx.conf ') Log.debug(self, 'Loading file /etc/nginx/nginx.conf ')
nc.loadf('/etc/nginx/nginx.conf') nc.loadf('/etc/nginx/nginx.conf')

Loading…
Cancel
Save