update
This commit is contained in:
parent
d5663a4115
commit
a509f26503
|
|
@ -1,44 +1,16 @@
|
|||
<div class="bt-form">
|
||||
<div class="bt-w-main">
|
||||
<div class="bt-w-menu">
|
||||
<p class="bgw" onclick="infojson();">INFO说明</p>
|
||||
<p class="bgw" onclick="indexPy();">index.py说明</p>
|
||||
<p class="bgw" onclick="pluginService('mysql');">服务</p>
|
||||
<p onclick="indexPy();">自启动</p>
|
||||
</div>
|
||||
<div class="bt-w-con pd15">
|
||||
<div class="soft-man-con v1">
|
||||
<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 class="soft-man-con">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
function infojson() {
|
||||
$('.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();
|
||||
}
|
||||
$.getScript( "/plugins/file?name=mysql&f=js/mysql.js");
|
||||
</script>
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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