mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-10 04:59:25 +08:00
u
This commit is contained in:
@@ -7,36 +7,18 @@ rootPath=$(dirname "$curPath")
|
||||
rootPath=$(dirname "$rootPath")
|
||||
serverPath=$(dirname "$rootPath")
|
||||
|
||||
install_tmp=${rootPath}/tmp/bt_install.pl
|
||||
|
||||
openrestyDir=${serverPath}/source/openresty
|
||||
|
||||
Install_openresty()
|
||||
{
|
||||
mkdir -p ${openrestyDir}
|
||||
echo '正在安装脚本文件...' > $install_tmp
|
||||
|
||||
if [ ! -f ${openrestyDir}/openresty-1.13.6.2.tar.gz ];then
|
||||
wget -O ${openrestyDir}/openresty-1.13.6.2.tar.gz https://openresty.org/download/openresty-1.13.6.2.tar.gz
|
||||
fi
|
||||
cd ${openrestyDir} && tar -zxvf openresty-1.13.6.2.tar.gz
|
||||
|
||||
cd ${openrestyDir}/openresty* && ./configure --prefix=$serverPath/openresty \
|
||||
--with-openssl=$serverPath/source/lib/openssl-1.0.2q && make && make install
|
||||
|
||||
echo '安装完成' > $install_tmp
|
||||
}
|
||||
|
||||
Uninstall_openresty()
|
||||
{
|
||||
rm -rf $serverPath/openresty
|
||||
echo '卸载完成' > $install_tmp
|
||||
}
|
||||
|
||||
action=$1
|
||||
host=$2
|
||||
if [ "${1}" == 'install' ];then
|
||||
Install_openresty
|
||||
else
|
||||
Uninstall_openresty
|
||||
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
|
||||
|
||||
Executable
+42
@@ -0,0 +1,42 @@
|
||||
#!/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_openresty()
|
||||
{
|
||||
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* && ./configure --prefix=$serverPath/openresty \
|
||||
--with-openssl=$serverPath/source/lib/openssl-1.0.2q && make && make install
|
||||
echo '1.11.2' > ${openrestyDir}/version.pl
|
||||
echo '安装完成' > $install_tmp
|
||||
}
|
||||
|
||||
Uninstall_openresty()
|
||||
{
|
||||
rm -rf $serverPath/openresty
|
||||
echo '卸载完成' > $install_tmp
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
Install_openresty
|
||||
else
|
||||
Uninstall_openresty
|
||||
fi
|
||||
@@ -24,6 +24,7 @@ Install_openresty()
|
||||
cd ${openrestyDir}/openresty* && ./configure --prefix=$serverPath/openresty \
|
||||
--with-openssl=$serverPath/source/lib/openssl-1.0.2q && make && make install
|
||||
|
||||
echo
|
||||
|
||||
echo '安装完成' > $install_tmp
|
||||
}
|
||||
@@ -33,9 +34,7 @@ Uninstall_openresty()
|
||||
rm -rf $serverPath/openresty
|
||||
echo '卸载完成' > $install_tmp
|
||||
}
|
||||
|
||||
action=$1
|
||||
host=$2
|
||||
if [ "${1}" == 'install' ];then
|
||||
Install_openresty
|
||||
else
|
||||
|
||||
+4
-4
@@ -215,10 +215,10 @@ function getInfo() {
|
||||
$("#messageError").append('<p><span class="glyphicon glyphicon-alert" style="color: #ff4040; margin-right: 10px;">' + lan.index.mem_warning + '</span> </p>')
|
||||
}
|
||||
|
||||
if (info.isuser > 0) {
|
||||
$("#messageError").show();
|
||||
$("#messageError").append('<p><span class="glyphicon glyphicon-alert" style="color: #ff4040; margin-right: 10px;"></span>' + lan.index.user_warning + '<span class="c7 mr5" title="此安全问题不可忽略,请尽快处理" style="cursor:no-drop"> [不可忽略]</span><a class="btlink" href="javascript:setUserName();"> [立即修改]</a></p>')
|
||||
}
|
||||
// if (info.isuser > 0) {
|
||||
// $("#messageError").show();
|
||||
// $("#messageError").append('<p><span class="glyphicon glyphicon-alert" style="color: #ff4040; margin-right: 10px;"></span>' + lan.index.user_warning + '<span class="c7 mr5" title="此安全问题不可忽略,请尽快处理" style="cursor:no-drop"> [不可忽略]</span><a class="btlink" href="javascript:setUserName();"> [立即修改]</a></p>')
|
||||
// }
|
||||
setImg();
|
||||
},'json');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user