From 35c9ca7e4e81a9c995ae3c7fa2b570f761002899 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 7 Nov 2022 15:52:00 +0800 Subject: [PATCH] Update index.py --- plugins/mysql-apt/index.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/mysql-apt/index.py b/plugins/mysql-apt/index.py index a3913f42b..2bf4c9ef5 100755 --- a/plugins/mysql-apt/index.py +++ b/plugins/mysql-apt/index.py @@ -139,9 +139,9 @@ def pMysqlDb(): def initDreplace(version=''): - mysql_conf_dir = getServerDir() + '/etc' - if not os.path.exists(mysql_conf_dir): - os.mkdir(mysql_conf_dir) + my_dir = getServerDir() + '/etc' + if not os.path.exists(my_dir): + os.mkdir(my_dir) tmp_dir = getServerDir() + '/tmp' if not os.path.exists(tmp_dir): @@ -149,7 +149,7 @@ def initDreplace(version=''): mw.execShell("chown -R mysql:mysql " + tmp_dir) mw.execShell("chmod 750 " + tmp_dir) - mysql_conf = mysql_conf_dir + '/my.cnf' + mysql_conf = my_dir + '/my.cnf' if not os.path.exists(mysql_conf): mysql_conf_tpl = getPluginDir() + '/conf/my' + version + '.cnf' content = mw.readFile(mysql_conf_tpl)