From e2bfcd326e1fac60988ecf3bcd453fee6c38f540 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Thu, 22 Oct 2020 16:46:42 +0200 Subject: [PATCH] Move old my.cnf after MariaDB upgrade --- wo/cli/plugins/stack_pref.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wo/cli/plugins/stack_pref.py b/wo/cli/plugins/stack_pref.py index 9c140cc..0cec9fd 100644 --- a/wo/cli/plugins/stack_pref.py +++ b/wo/cli/plugins/stack_pref.py @@ -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)