diff --git a/wo/cli/plugins/stack_pref.py b/wo/cli/plugins/stack_pref.py index e91f9fd..24c7c52 100644 --- a/wo/cli/plugins/stack_pref.py +++ b/wo/cli/plugins/stack_pref.py @@ -933,11 +933,8 @@ def post_pref(self, apt_packages, packages, upgrade=False): config_file.close() else: # make sure root account have all privileges - if "IDENTIFIED BY PASSWORD" not in WOShellExec.cmd_exec_stdout( - self, 'mysql -e "use mysql; show grants;"'): + if os.path.exists('/etc/mysql/conf.d/my.cnf.tmp'): try: - if not os.path.exists('/etc/mysql/conf.d/my.cnf.tmp'): - Log.error(self, 'my.cnf not found') config = configparser.ConfigParser() config.read('/etc/mysql/conf.d/my.cnf.tmp') chars = config['client']['password'] @@ -981,10 +978,11 @@ def post_pref(self, apt_packages, packages, upgrade=False): inno_buffer=wo_ram_innodb, inno_log_buffer=wo_ram_log_buffer, innodb_instances=wo_innodb_instance, - newmariadb=mariadbconf) + newmariadb=mariadbconf, release=WOVar.wo_version) if os.path.exists('/etc/mysql/mariadb.conf.d/50-server.cnf'): WOTemplate.deploy( - self, '/etc/mysql/my.cnf', 'my.mustache', data) + self, '/etc/mysql/mariadb.conf.d/50-server.cnf', + 'my.mustache', data) else: WOTemplate.deploy( self, '/etc/mysql/my.cnf', 'my.mustache', data) diff --git a/wo/cli/templates/my.mustache b/wo/cli/templates/my.mustache index 19ac2a8..00fc28d 100644 --- a/wo/cli/templates/my.mustache +++ b/wo/cli/templates/my.mustache @@ -1,4 +1,5 @@ # MariaDB database server configuration file. +# Optimized by WordOps {{release}} # # You can copy this file to one of: # - "/etc/mysql/my.cnf" to set global options,