From b5e27c22dbe37a9b52e7694c313a91358331c2dd Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 13 Jul 2022 16:15:17 +0800 Subject: [PATCH] Update index.py --- plugins/mariadb/index.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/mariadb/index.py b/plugins/mariadb/index.py index 37b7653c4..02f36dc26 100755 --- a/plugins/mariadb/index.py +++ b/plugins/mariadb/index.py @@ -180,11 +180,6 @@ def initDreplace(version=''): if not os.path.exists(mysql_conf_dir): os.mkdir(mysql_conf_dir) - mysql_tmp = getServerDir() + '/tmp' - if not os.path.exists(mysql_tmp): - os.mkdir(mysql_tmp) - mw.execShell("chown -R mysql:mysql " + mysql_tmp) - mysql_conf = mysql_conf_dir + '/my.cnf' if not os.path.exists(mysql_conf): mysql_conf_tpl = getPluginDir() + '/conf/my.cnf' @@ -192,6 +187,11 @@ def initDreplace(version=''): content = contentReplace(content) mw.writeFile(mysql_conf, content) + mysql_tmp = getServerDir() + '/tmp' + if not os.path.exists(mysql_tmp): + os.mkdir(mysql_tmp) + mw.execShell("chown -R mysql:mysql " + mysql_tmp) + # systemd systemDir = mw.systemdCfgDir() systemService = systemDir + '/mariadb.service'