mirror of https://github.com/midoks/mdserver-web
parent
d5663a4115
commit
a509f26503
@ -1,44 +1,16 @@ |
|||||||
<div class="bt-form"> |
<div class="bt-form"> |
||||||
<div class="bt-w-main"> |
<div class="bt-w-main"> |
||||||
<div class="bt-w-menu"> |
<div class="bt-w-menu"> |
||||||
<p class="bgw" onclick="infojson();">INFO说明</p> |
<p class="bgw" onclick="pluginService('mysql');">服务</p> |
||||||
<p class="bgw" onclick="indexPy();">index.py说明</p> |
<p onclick="indexPy();">自启动</p> |
||||||
</div> |
</div> |
||||||
<div class="bt-w-con pd15"> |
<div class="bt-w-con pd15"> |
||||||
<div class="soft-man-con v1"> |
<div class="soft-man-con"> |
||||||
<div><p>在每一个插件中,都必须包含一个info.json文件,格式如下:</p><br/></div> |
|
||||||
<div><pre>{ |
|
||||||
"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" |
|
||||||
}</pre></div> |
|
||||||
</div> |
|
||||||
|
|
||||||
<div class="soft-man-con v2"> |
|
||||||
<div><p>在每一个插件中,都必须包含一个index.py文件</p><br/></div> |
|
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
|
|
||||||
</div> |
</div> |
||||||
<script type="text/javascript"> |
<script type="text/javascript"> |
||||||
function infojson() { |
$.getScript( "/plugins/file?name=mysql&f=js/mysql.js"); |
||||||
$('.bt-w-main .soft-man-con').hide(); |
|
||||||
$('.bt-w-main .v1').show(); |
|
||||||
} |
|
||||||
|
|
||||||
function indexPy() { |
|
||||||
$('.bt-w-main .soft-man-con').hide(); |
|
||||||
$('.bt-w-main .v2').show(); |
|
||||||
} |
|
||||||
</script> |
</script> |
@ -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 |
Loading…
Reference in new issue