Move old my.cnf after MariaDB upgrade

This commit is contained in:
VirtuBox
2020-10-22 16:46:42 +02:00
parent f3129f0774
commit e2bfcd326e

View File

@@ -994,6 +994,10 @@ def post_pref(self, apt_packages, packages, upgrade=False):
WOTemplate.deploy(
self, '/etc/mysql/mariadb.conf.d/50-server.cnf',
'my.mustache', data)
WOFileUtils.mvfile(
self, '/etc/mysql/my.cnf', '/etc/mysql/my.cnf.old')
WOFileUtils.create_symlink(
self, ['/etc/mysql/mariadb.cnf', '/etc/mysql/my.cnf'])
else:
WOTemplate.deploy(
self, '/etc/mysql/my.cnf', 'my.mustache', data)