From 61cd0cdfb1cbfe5bba46b3f6d209ed5e479ba02c Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Fri, 15 Mar 2019 16:02:59 +0800 Subject: [PATCH] =?UTF-8?q?mysql=20=E8=87=AA=E5=90=AF=E5=8A=A8done?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- class/core/config_api.py | 3 ++- plugins/mysql/index.py | 2 ++ plugins/mysql/info.json | 3 ++- plugins/mysql/init.d/mysql.tpl | 4 ++++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/class/core/config_api.py b/class/core/config_api.py index 9ad508b4a..6bc6e7584 100755 --- a/class/core/config_api.py +++ b/class/core/config_api.py @@ -17,7 +17,8 @@ class config_api: # 本版解决自启动问题 # openresty 自启动 done - # php 自动 done + # php 自启动 done + # mysql 自启动 done __version = '0.5.2' def __init__(self): diff --git a/plugins/mysql/index.py b/plugins/mysql/index.py index aceff5ef6..65f0c3eee 100755 --- a/plugins/mysql/index.py +++ b/plugins/mysql/index.py @@ -293,6 +293,7 @@ def initdInstall(): initd_bin = getInitDFile() shutil.copyfile(mysql_bin, initd_bin) public.execShell('chmod +x ' + initd_bin) + public.execShell('chkconfig --add ' + getPluginName()) return 'ok' @@ -300,6 +301,7 @@ def initdUinstall(): if not app_debug: if public.isAppleSystem(): return "Apple Computer does not support" + public.execShell('chkconfig --del ' + getPluginName()) initd_bin = getInitDFile() os.remove(initd_bin) return 'ok' diff --git a/plugins/mysql/info.json b/plugins/mysql/info.json index f2575e982..9278a5a72 100755 --- a/plugins/mysql/info.json +++ b/plugins/mysql/info.json @@ -4,7 +4,8 @@ "name":"mysql", "type":"运行环境", "ps":"MySQL是一种关系数据库管理系统!", - "versions":["5.5","5.6","5.7","8.0"], + "todo_versions":["5.6","5.7","8.0"], + "versions":["5.5"], "updates":["5.5.62"], "shell":"install.sh", "checks":"server/mysql", diff --git a/plugins/mysql/init.d/mysql.tpl b/plugins/mysql/init.d/mysql.tpl index 6bc948f4b..ef861da5a 100644 --- a/plugins/mysql/init.d/mysql.tpl +++ b/plugins/mysql/init.d/mysql.tpl @@ -1,4 +1,8 @@ #!/bin/sh +# chkconfig: 2345 55 25 +# Description: mysql service +# distro. For CentOS/Redhat run: 'chkconfig --add mysql' + # Copyright Abandoned 1996 TCX DataKonsult AB & Monty Program KB & Detron HB # This file is public domain and comes with NO WARRANTY of any kind