diff --git a/ee/cli/plugins/site_functions.py b/ee/cli/plugins/site_functions.py index 9087942b..955be22f 100644 --- a/ee/cli/plugins/site_functions.py +++ b/ee/cli/plugins/site_functions.py @@ -112,15 +112,15 @@ def setupdatabase(self, data): # create MySQL database Log.info(self, "Setting up database\t\t", end='') 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") # Create MySQL User 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)) 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, ee_db_password), errormsg="Cannot setup database user", log=False) @@ -128,7 +128,7 @@ def setupdatabase(self, data): # Grant permission Log.debug(self, "Setting up user privileges") 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), errormsg="Cannot setup database user privileges") Log.info(self, "[" + Log.ENDC + "Done" + Log.OKBLUE + "]") diff --git a/ee/cli/plugins/stack.py b/ee/cli/plugins/stack.py index 56535fb1..1d3fff20 100644 --- a/ee/cli/plugins/stack.py +++ b/ee/cli/plugins/stack.py @@ -155,8 +155,8 @@ class EEStackController(CementBaseController): EEService.reload_service(self, 'postfix') if set(EEVariables.ee_nginx).issubset(set(apt_packages)): - if ((not os.path.isfile('/etc/nginx/conf.d/ee-nginx.conf')) and - os.path.isfile('/etc/nginx/nginx.conf')): + if ((not EEShellExec.cmd_exec(self, "grep -Hr EasyEngine " + "/etc/nginx")) and os.path.isfile('/etc/nginx/nginx.conf')): nc = NginxConfig() Log.debug(self, 'Loading file /etc/nginx/nginx.conf ') nc.loadf('/etc/nginx/nginx.conf')