Update index.py

This commit is contained in:
midoks 2022-07-13 16:15:17 +08:00
parent 39fcbebe4a
commit b5e27c22db
1 changed files with 5 additions and 5 deletions

View File

@ -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'