Fix my.cnf copy several time
This commit is contained in:
@@ -888,8 +888,9 @@ def post_pref(self, apt_packages, packages, upgrade=False):
|
|||||||
config_file.close()
|
config_file.close()
|
||||||
else:
|
else:
|
||||||
Log.info(self, "Tuning MariaDB configuration")
|
Log.info(self, "Tuning MariaDB configuration")
|
||||||
WOFileUtils.copyfile(self, "/etc/mysql/my.cnf",
|
if not os.path.isfile("/etc/mysql/my.cnf.default-pkg"):
|
||||||
"/etc/mysql/my.cnf.default-pkg")
|
WOFileUtils.copyfile(self, "/etc/mysql/my.cnf",
|
||||||
|
"/etc/mysql/my.cnf.default-pkg")
|
||||||
wo_ram = psutil.virtual_memory().total / (1024 * 1024)
|
wo_ram = psutil.virtual_memory().total / (1024 * 1024)
|
||||||
# set InnoDB variable depending on the RAM available
|
# set InnoDB variable depending on the RAM available
|
||||||
wo_ram_innodb = int(wo_ram*0.3)
|
wo_ram_innodb = int(wo_ram*0.3)
|
||||||
|
|||||||
Reference in New Issue
Block a user