diff --git a/plugins/mysql/index.html b/plugins/mysql/index.html index a0e4c13a3..851bb1fcd 100755 --- a/plugins/mysql/index.html +++ b/plugins/mysql/index.html @@ -1,44 +1,16 @@
-

INFO说明

-

index.py说明

+

服务

+

自启动

-
-

在每一个插件中,都必须包含一个info.json文件,格式如下:


-
{
-"title": "插件开发说明",
-"tip": "soft",
-"name": "readme",
-"type": "扩展",
-"ps": "(mdserver-web)插件产开发说明,每个版本可能有所变化!",
-"versions": "0.1",
-"shell": "install.sh",
-"checks": "server/readme",
-"path": "server/readme",
-"author": "mdserver-web",
-"home": "github.com/midoks/mdserver-web",
-"date": "2018-11-30",
-"pid": "5"
-}
-
- -
-

在每一个插件中,都必须包含一个index.py文件


+
\ No newline at end of file diff --git a/plugins/mysql/install.sh b/plugins/mysql/install.sh index 6965e237a..8f1d3919a 100755 --- a/plugins/mysql/install.sh +++ b/plugins/mysql/install.sh @@ -1,14 +1,14 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH -install_tmp='/tmp/bt_install.pl' -public_file=/www/server/panel/install/public.sh -if [ ! -f $public_file ];then - wget -O $public_file http://download.bt.cn/install/public.sh -T 5; -fi -. $public_file -download_Url=$NODE_URL +curPath=`pwd` +rootPath=$(dirname "$curPath") +rootPath=$(dirname "$rootPath") +serverPath=$(dirname "$rootPath") + + +install_tmp=${rootPath}/tmp/bt_install.pl Install_safelogin() { @@ -32,9 +32,16 @@ Uninstall_safelogin() action=$1 -host=$2; -if [ "${1}" == 'install' ];then - Install_safelogin -else - Uninstall_safelogin +type=$2 + +if [ "${2}" == "" ];then + echo '缺少安装脚本...' > $install_tmp + exit 0 +fi + +if [ ! -d $curPath/versions/$2 ];then + echo '缺少安装脚本2...' > $install_tmp + exit 0 fi + +sh -x $curPath/versions/$2/install.sh $1 diff --git a/plugins/mysql/version/5.5/install.sh b/plugins/mysql/version/5.5/install.sh new file mode 100755 index 000000000..88e6a1353 --- /dev/null +++ b/plugins/mysql/version/5.5/install.sh @@ -0,0 +1,46 @@ +#!/bin/bash +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin +export PATH + +curPath=`pwd` +rootPath=$(dirname "$curPath") +rootPath=$(dirname "$rootPath") +serverPath=$(dirname "$rootPath") + + +install_tmp=${rootPath}/tmp/bt_install.pl +openrestyDir=${serverPath}/source/openresty + +Install_mysql() +{ + mkdir -p ${openrestyDir} + echo '正在安装脚本文件...' > $install_tmp + + if [ ! -f ${openrestyDir}/openresty-1.11.2.5.tar.gz ];then + wget -O ${openrestyDir}/openresty-1.11.2.5.tar.gz https://openresty.org/download/openresty-1.11.2.5.tar.gz + fi + + + cd ${openrestyDir} && tar -zxvf openresty-1.11.2.5.tar.gz + + cd ${openrestyDir}/openresty-1.11.2.5 && ./configure --prefix=$serverPath/openresty \ + --with-openssl=$serverPath/source/lib/openssl-1.0.2q \ + --with-http_stub_status_module && make && make install && \ + echo '1.11.2' > $serverPath/openresty/version.pl + + + echo '安装完成' > $install_tmp +} + +Uninstall_mysql() +{ + rm -rf $serverPath/mysql + echo '卸载完成' > $install_tmp +} + +action=$1 +if [ "${1}" == 'install' ];then + Install_mysql +else + Uninstall_mysql +fi