mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-20 08:25:50 +08:00
Compare commits
101
Commits
36ca82c1b4
..
dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b100204b37 | ||
|
|
82ff3e3d0a | ||
|
|
0b2223bce0 | ||
|
|
a43b723b09 | ||
|
|
96551f49ca | ||
|
|
8e32d37985 | ||
|
|
d1da238ddc | ||
|
|
7260a2be21 | ||
|
|
7562d50e58 | ||
|
|
e77ae8763b | ||
|
|
a0e51c75fe | ||
|
|
6021a5e6e2 | ||
|
|
e50e222955 | ||
|
|
531dd665c9 | ||
|
|
a79c0a1a9b | ||
|
|
9ef144c304 | ||
|
|
5402af8df7 | ||
|
|
99802125dc | ||
|
|
705647cd3b | ||
|
|
0ea2eeab7f | ||
|
|
727cde1352 | ||
|
|
6ef6358cbb | ||
|
|
6acb303ac9 | ||
|
|
a80e5492b8 | ||
|
|
4358b1a520 | ||
|
|
ad1a7c22a6 | ||
|
|
2f3af23e6d | ||
|
|
89a26d294d | ||
|
|
f83faeacac | ||
|
|
fb7c27c205 | ||
|
|
3f958c7083 | ||
|
|
60b6689318 | ||
|
|
ba94e81367 | ||
|
|
89c8c68b88 | ||
|
|
e78ae7e4de | ||
|
|
f87cadd3ce | ||
|
|
1631e149ea | ||
|
|
d84f585bff | ||
|
|
7e9091b341 | ||
|
|
7020d3e198 | ||
|
|
9d8e0ded8f | ||
|
|
090e8fa160 | ||
|
|
83746675e7 | ||
|
|
74d73d76cd | ||
|
|
6bfedde66d | ||
|
|
554bee4040 | ||
|
|
a1005adf04 | ||
|
|
cbed47d825 | ||
|
|
abb7da896b | ||
|
|
e62a69ac45 | ||
|
|
769285736b | ||
|
|
8d2eaa94bd | ||
|
|
a31143e0e8 | ||
|
|
584551f764 | ||
|
|
8b60a65bbd | ||
|
|
c13df7c25b | ||
|
|
ad30ba776c | ||
|
|
de3451993f | ||
|
|
fde9b49f39 | ||
|
|
cff0e9442c | ||
|
|
5cb57d89de | ||
|
|
fadcbaa1bb | ||
|
|
911554f6df | ||
|
|
77b525d955 | ||
|
|
b872a2bb53 | ||
|
|
818444d4f4 | ||
|
|
63e16e05aa | ||
|
|
06743894a3 | ||
|
|
2d665235c8 | ||
|
|
72311a2801 | ||
|
|
d7ba290ed3 | ||
|
|
e0d2984bae | ||
|
|
ecdbe8d014 | ||
|
|
7d57e320b8 | ||
|
|
cf16b729f6 | ||
|
|
366c5c91aa | ||
|
|
173cf2985e | ||
|
|
0bdba73f25 | ||
|
|
24d25e69ad | ||
|
|
d3e6297503 | ||
|
|
76b5f15115 | ||
|
|
cfa92b637a | ||
|
|
f07e75e508 | ||
|
|
4220300731 | ||
|
|
43b464866f | ||
|
|
7bf5dbb4f3 | ||
|
|
9fe8453898 | ||
|
|
b421cf261f | ||
|
|
75d28763ee | ||
|
|
25533fa8bc | ||
|
|
04294e6cbe | ||
|
|
f0550ba6b3 | ||
|
|
88d0733d95 | ||
|
|
74633e155a | ||
|
|
7d8d7a8c6f | ||
|
|
32956578b2 | ||
|
|
4efdf7606c | ||
|
|
a61644861b | ||
|
|
e60570e380 | ||
|
|
ad160cb23e | ||
|
|
73f58ced9a |
@@ -19,12 +19,12 @@ fi
|
||||
mw_start_task()
|
||||
{
|
||||
isStart=$(ps aux |grep 'panel_task.py'|grep -v grep|awk '{print $2}')
|
||||
if [ "$isStart" == '' ];then
|
||||
if [ "$isStart" = '' ];then
|
||||
echo -e "starting mw-tasks... \c"
|
||||
cd $DIR && python3 panel_task.py >> ${DIR}/logs/panel_task.log 2>&1 &
|
||||
sleep 0.3
|
||||
isStart=$(ps aux |grep 'panel_task.py'|grep -v grep|awk '{print $2}')
|
||||
if [ "$isStart" == '' ];then
|
||||
if [ "$isStart" = '' ];then
|
||||
echo -e "\033[31mfailed\033[0m"
|
||||
echo '------------------------------------------------------'
|
||||
tail -n 20 $DIR/logs/panel_task.log
|
||||
|
||||
@@ -48,7 +48,7 @@ Install_gogs()
|
||||
|
||||
git config --global push.default simple
|
||||
|
||||
if [ "darwin" == "$os" ];then
|
||||
if [ "darwin" = "$os" ];then
|
||||
file=gogs_${version}_darwin_amd64.zip
|
||||
else
|
||||
file=gogs_${version}_linux_amd64.zip
|
||||
|
||||
@@ -18,11 +18,11 @@ sysName=`uname`
|
||||
echo "use system: ${sysName}"
|
||||
|
||||
OSNAME=`bash ${rootPath}/scripts/getos.sh`
|
||||
if [ "" == "$OSNAME" ];then
|
||||
if [ "" = "$OSNAME" ];then
|
||||
OSNAME=`cat ${rootPath}/data/osname.pl`
|
||||
fi
|
||||
|
||||
if [ "macos" == "$OSNAME" ];then
|
||||
if [ "macos" = "$OSNAME" ];then
|
||||
echo "不支持Macox"
|
||||
exit
|
||||
fi
|
||||
@@ -78,7 +78,7 @@ Uninstall_App()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_App
|
||||
else
|
||||
Uninstall_App
|
||||
|
||||
@@ -26,12 +26,12 @@ Install_App()
|
||||
|
||||
LOCAL_ADDR=common
|
||||
cn=$(curl -fsSL -m 10 -s http://ipinfo.io/json | grep "\"country\": \"CN\"")
|
||||
if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then
|
||||
if [ ! -z "$cn" ] || [ "$?" = "0" ] ;then
|
||||
LOCAL_ADDR=cn
|
||||
fi
|
||||
|
||||
|
||||
if [ "${LOCAL_ADDR}" == "cn" ];then
|
||||
if [ "${LOCAL_ADDR}" = "cn" ];then
|
||||
if [ ! -f ${APP_DIR}/haproxy-${VERSION}.tar.gz ];then
|
||||
wget -O ${APP_DIR}/haproxy-${VERSION}.tar.gz https://dl.midoks.icu/soft/haproxy/haproxy-${VERSION}.tar.gz
|
||||
fi
|
||||
@@ -39,7 +39,7 @@ Install_App()
|
||||
|
||||
|
||||
if [ ! -f ${APP_DIR}/haproxy-${VERSION}.tar.gz ];then
|
||||
if [ $sysName == 'Darwin' ]; then
|
||||
if [ $sysName = 'Darwin' ]; then
|
||||
wget --no-check-certificate -O ${APP_DIR}/haproxy-${VERSION}.tar.gz https://www.haproxy.org/download/${MIN_VERSION}/src/haproxy-${VERSION}.tar.gz
|
||||
else
|
||||
curl -sSLo ${APP_DIR}/haproxy-${VERSION}.tar.gz https://www.haproxy.org/download/${MIN_VERSION}/src/haproxy-${VERSION}.tar.gz
|
||||
@@ -53,7 +53,7 @@ Install_App()
|
||||
|
||||
cd ${APP_DIR} && tar -zxvf haproxy-${VERSION}.tar.gz
|
||||
|
||||
if [ "$OSNAME" == "macos" ];then
|
||||
if [ "$OSNAME" = "macos" ];then
|
||||
cd ${APP_DIR}/haproxy-${VERSION} && make TARGET=osx && make install PREFIX=$serverPath/haproxy
|
||||
else
|
||||
cd ${APP_DIR}/haproxy-${VERSION} && make TARGET=linux-glibc && make install PREFIX=$serverPath/haproxy
|
||||
@@ -94,7 +94,7 @@ Uninstall_App()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_App
|
||||
else
|
||||
Uninstall_App
|
||||
|
||||
@@ -26,7 +26,7 @@ Install_App()
|
||||
|
||||
LOCAL_ADDR=common
|
||||
cn=$(curl -fsSL -m 10 -s http://ipinfo.io/json | grep "\"country\": \"CN\"")
|
||||
if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then
|
||||
if [ ! -z "$cn" ] || [ "$?" = "0" ] ;then
|
||||
LOCAL_ADDR=cn
|
||||
fi
|
||||
|
||||
@@ -53,7 +53,7 @@ Install_App()
|
||||
|
||||
cd ${APP_DIR} && tar -zxvf haproxy-${VERSION}.tar.gz
|
||||
|
||||
if [ "$OSNAME" == "macos" ];then
|
||||
if [ "$OSNAME" = "macos" ];then
|
||||
cd ${APP_DIR}/haproxy-${VERSION} && make TARGET=osx && make install PREFIX=$serverPath/haproxy
|
||||
else
|
||||
cd ${APP_DIR}/haproxy-${VERSION} && make TARGET=linux-glibc && make install PREFIX=$serverPath/haproxy
|
||||
|
||||
@@ -17,11 +17,11 @@ sysArch=`arch`
|
||||
sysName=`uname`
|
||||
|
||||
ARCH_NAME=amd64
|
||||
if [ "$sysArch" == "arm64" ];then
|
||||
if [ "$sysArch" = "arm64" ];then
|
||||
ARCH_NAME=arm64
|
||||
elif [ "$sysArch" == "x86_64" ]; then
|
||||
elif [ "$sysArch" = "x86_64" ]; then
|
||||
ARCH_NAME=amd64
|
||||
elif [ "$sysArch" == "aarch64" ]; then
|
||||
elif [ "$sysArch" = "aarch64" ]; then
|
||||
ARCH_NAME=aarch64
|
||||
fi
|
||||
|
||||
@@ -77,7 +77,7 @@ curl -v -H "Content-Type: application/json" -XPOST "http://localhost:3100/loki/
|
||||
-d "{\"streams\": [{\"stream\": {\"test\": \"test\"}, \"values\": [[\"$timestamp\", \"test message\"]]}]}"
|
||||
|
||||
action=${1}
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_App
|
||||
else
|
||||
Uninstall_App
|
||||
|
||||
@@ -64,7 +64,7 @@ Uninstall_App()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_App
|
||||
else
|
||||
Uninstall_App
|
||||
|
||||
@@ -65,7 +65,7 @@ Install_app()
|
||||
fi
|
||||
|
||||
OPTIONS=''
|
||||
if [ "$sysName" == "Darwin" ];then
|
||||
if [ "$sysName" = "Darwin" ];then
|
||||
OPTIONS='-DPLUGIN_TOKUDB=NO'
|
||||
fi
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ Uninstall_app()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_app
|
||||
else
|
||||
Uninstall_app
|
||||
|
||||
@@ -34,7 +34,7 @@ echo "use system: ${sysName}"
|
||||
|
||||
OSNAME=`bash ${rootPath}/scripts/getos.sh`
|
||||
|
||||
if [ "" == "$OSNAME" ];then
|
||||
if [ "" = "$OSNAME" ];then
|
||||
OSNAME=`cat ${rootPath}/data/osname.pl`
|
||||
fi
|
||||
|
||||
|
||||
@@ -20,11 +20,11 @@ SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | a
|
||||
SYS_NAME=${SYS_VERSION_ID/./}
|
||||
SYS_NAME_LEN=`echo "$SYS_NAME" | wc -L`
|
||||
|
||||
if [ "$SYS_NAME_LEN" == "1" ];then
|
||||
if [ "$SYS_NAME_LEN" = "1" ];then
|
||||
SYS_NAME=${SYS_NAME}0
|
||||
fi
|
||||
|
||||
if [ "$SYS_ARCH" == "aarch64" ];then
|
||||
if [ "$SYS_ARCH" = "aarch64" ];then
|
||||
if [ "$SYS_NAME" -gt "82" ];then
|
||||
SYS_NAME="82"
|
||||
fi
|
||||
|
||||
@@ -15,7 +15,7 @@ SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | a
|
||||
SYS_NAME=${SYS_VERSION_ID/./}
|
||||
SYS_NAME_LEN=`echo "$SYS_NAME" | wc -L`
|
||||
|
||||
if [ "$SYS_NAME_LEN" == "1" ];then
|
||||
if [ "$SYS_NAME_LEN" = "1" ];then
|
||||
SYS_NAME=${SYS_NAME}0
|
||||
fi
|
||||
|
||||
|
||||
@@ -15,11 +15,11 @@ SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | a
|
||||
SYS_NAME=${SYS_VERSION_ID/./}
|
||||
SYS_NAME_LEN=`echo "$SYS_NAME" | wc -L`
|
||||
|
||||
if [ "$SYS_NAME_LEN" == "1" ];then
|
||||
if [ "$SYS_NAME_LEN" = "1" ];then
|
||||
SYS_NAME=${SYS_NAME}0
|
||||
fi
|
||||
|
||||
if [ "$SYS_ARCH" == "aarch64" ];then
|
||||
if [ "$SYS_ARCH" = "aarch64" ];then
|
||||
if [ "$SYS_NAME" -gt "82" ];then
|
||||
SYS_NAME="82"
|
||||
fi
|
||||
@@ -70,7 +70,7 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
|
||||
#--------------- mongosh tool install ------------------ #
|
||||
TOOL_VERSION=2.2.5
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
|
||||
fi
|
||||
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
|
||||
|
||||
@@ -47,7 +47,7 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
|
||||
#--------------- mongosh tool install ------------------ #
|
||||
TOOL_VERSION=2.2.5
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
|
||||
fi
|
||||
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
|
||||
@@ -67,11 +67,11 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
|
||||
#--------------- mongodb database install ------------------ #
|
||||
TOOL_VERSION=100.16.1
|
||||
TOOL_FILE_NAME=mongodb-database-tools-debian${SYS_NAME}-x86_64-${TOOL_VERSION}
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-debian${SYS_NAME}-arm64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
if [ "arm64" == ${SYS_ARCH} ];then
|
||||
if [ "arm64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-debian${SYS_NAME}-arm64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
|
||||
@@ -30,11 +30,11 @@ fi
|
||||
#--------------- mongosh tool install ------------------ #
|
||||
TOOL_VERSION=2.2.5
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-darwin-x64
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-darwin-arm64
|
||||
fi
|
||||
|
||||
if [ "arm64" == ${SYS_ARCH} ];then
|
||||
if [ "arm64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-darwin-arm64
|
||||
fi
|
||||
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.zip
|
||||
@@ -54,11 +54,11 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
|
||||
# https://fastdl.mongodb.org/tools/db/mongodb-database-tools-macos-arm64-100.9.4.zip
|
||||
TOOL_VERSION=100.9.4
|
||||
TOOL_FILE_NAME=mongodb-database-tools-macos-x86_64-${TOOL_VERSION}
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-macos-arm64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
if [ "arm64" == ${SYS_ARCH} ];then
|
||||
if [ "arm64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-macos-arm64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
|
||||
#--------------- mongosh tool install ------------------ #
|
||||
TOOL_VERSION=2.2.5
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
|
||||
fi
|
||||
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
|
||||
@@ -71,11 +71,11 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
|
||||
#--------------- mongodb database install ------------------ #
|
||||
TOOL_VERSION=100.9.4
|
||||
TOOL_FILE_NAME=mongodb-database-tools-suse${SYS_NAME}-x86_64-${TOOL_VERSION}
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-suse${SYS_NAME}-arm64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
if [ "arm64" == ${SYS_ARCH} ];then
|
||||
if [ "arm64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-suse${SYS_NAME}-arm64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | a
|
||||
SYS_NAME=${SYS_VERSION_ID/./}
|
||||
SYS_NAME_LEN=`echo "$SYS_NAME" | wc -L`
|
||||
|
||||
if [ "$SYS_NAME_LEN" == "1" ];then
|
||||
if [ "$SYS_NAME_LEN" = "1" ];then
|
||||
SYS_NAME=${SYS_NAME}0
|
||||
fi
|
||||
|
||||
@@ -46,7 +46,7 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
|
||||
#--------------- mongosh tool install ------------------ #
|
||||
TOOL_VERSION=2.2.5
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
|
||||
fi
|
||||
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
|
||||
|
||||
@@ -15,11 +15,11 @@ SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | a
|
||||
SYS_NAME=${SYS_VERSION_ID/./}
|
||||
SYS_NAME_LEN=`echo "$SYS_NAME" | wc -L`
|
||||
|
||||
if [ "$SYS_NAME_LEN" == "1" ];then
|
||||
if [ "$SYS_NAME_LEN" = "1" ];then
|
||||
SYS_NAME=${SYS_NAME}0
|
||||
fi
|
||||
|
||||
if [ "$SYS_ARCH" == "aarch64" ];then
|
||||
if [ "$SYS_ARCH" = "aarch64" ];then
|
||||
if [ "$SYS_NAME" -gt "90" ];then
|
||||
SYS_NAME="90"
|
||||
fi
|
||||
@@ -64,7 +64,7 @@ rm -rf ${MG_DIR}/${FILE_NAME}
|
||||
#--------------- mongosh tool install ------------------ #
|
||||
TOOL_VERSION=2.2.5
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
|
||||
fi
|
||||
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
|
||||
@@ -84,11 +84,11 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
|
||||
#--------------- mongodb database install ------------------ #
|
||||
TOOL_VERSION=100.9.4
|
||||
TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-x86_64-${TOOL_VERSION}
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-aarch64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
if [ "arm64" == ${SYS_ARCH} ];then
|
||||
if [ "arm64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-arm64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
|
||||
#--------------- mongosh tool install ------------------ #
|
||||
TOOL_VERSION=2.2.5
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
|
||||
fi
|
||||
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
|
||||
@@ -67,11 +67,11 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
|
||||
#--------------- mongodb database install ------------------ #
|
||||
TOOL_VERSION=100.9.4
|
||||
TOOL_FILE_NAME=mongodb-database-tools-debian${SYS_NAME}-x86_64-${TOOL_VERSION}
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-debian${SYS_NAME}-arm64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
if [ "arm64" == ${SYS_ARCH} ];then
|
||||
if [ "arm64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-debian${SYS_NAME}-arm64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-darwin-arm64
|
||||
fi
|
||||
|
||||
if [ "arm64" == ${SYS_ARCH} ];then
|
||||
if [ "arm64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-darwin-arm64
|
||||
fi
|
||||
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.zip
|
||||
|
||||
@@ -48,7 +48,7 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
|
||||
#--------------- mongosh tool install ------------------ #
|
||||
TOOL_VERSION=2.2.5
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
|
||||
fi
|
||||
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
|
||||
@@ -68,11 +68,11 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
|
||||
#--------------- mongodb database install ------------------ #
|
||||
TOOL_VERSION=100.9.4
|
||||
TOOL_FILE_NAME=mongodb-database-tools-ubuntu${SYS_NAME}-x86_64-${TOOL_VERSION}
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-ubuntu${SYS_NAME}-arm64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
if [ "arm64" == ${SYS_ARCH} ];then
|
||||
if [ "arm64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-ubuntu${SYS_NAME}-arm64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
|
||||
@@ -15,11 +15,11 @@ SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | a
|
||||
SYS_NAME=${SYS_VERSION_ID/./}
|
||||
SYS_NAME_LEN=`echo "$SYS_NAME" | wc -L`
|
||||
|
||||
if [ "$SYS_NAME_LEN" == "1" ];then
|
||||
if [ "$SYS_NAME_LEN" = "1" ];then
|
||||
SYS_NAME=${SYS_NAME}0
|
||||
fi
|
||||
|
||||
if [ "$SYS_ARCH" == "aarch64" ];then
|
||||
if [ "$SYS_ARCH" = "aarch64" ];then
|
||||
if [ "$SYS_NAME" -gt "90" ];then
|
||||
SYS_NAME="90"
|
||||
fi
|
||||
|
||||
@@ -22,7 +22,7 @@ if [ "$SYS_NAME" -lt "11" ];then
|
||||
SYS_NAME="11"
|
||||
fi
|
||||
|
||||
if [ "$SYS_NAME" == "" ];then
|
||||
if [ "$SYS_NAME" = "" ];then
|
||||
SYS_NAME="11"
|
||||
fi
|
||||
|
||||
@@ -53,7 +53,7 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
|
||||
#--------------- mongosh tool install ------------------ #
|
||||
TOOL_VERSION=2.2.5
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
|
||||
fi
|
||||
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
|
||||
@@ -73,11 +73,11 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
|
||||
#--------------- mongodb database install ------------------ #
|
||||
TOOL_VERSION=100.9.4
|
||||
TOOL_FILE_NAME=mongodb-database-tools-debian${SYS_NAME}-x86_64-${TOOL_VERSION}
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-debian${SYS_NAME}-arm64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
if [ "arm64" == ${SYS_ARCH} ];then
|
||||
if [ "arm64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-debian${SYS_NAME}-arm64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
|
||||
@@ -15,11 +15,11 @@ SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | a
|
||||
SYS_NAME=${SYS_VERSION_ID/./}
|
||||
SYS_NAME_LEN=`echo "$SYS_NAME" | wc -L`
|
||||
|
||||
if [ "$SYS_NAME_LEN" == "1" ];then
|
||||
if [ "$SYS_NAME_LEN" = "1" ];then
|
||||
SYS_NAME=${SYS_NAME}0
|
||||
fi
|
||||
|
||||
if [ "$SYS_ARCH" == "aarch64" ];then
|
||||
if [ "$SYS_ARCH" = "aarch64" ];then
|
||||
if [ "$SYS_NAME" -gt "90" ];then
|
||||
SYS_NAME="90"
|
||||
fi
|
||||
|
||||
@@ -51,7 +51,7 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
|
||||
#--------------- mongosh tool install ------------------ #
|
||||
TOOL_VERSION=2.2.5
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
|
||||
fi
|
||||
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
|
||||
@@ -72,11 +72,11 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
|
||||
#--------------- mongodb database install ------------------ #
|
||||
TOOL_VERSION=100.9.4
|
||||
TOOL_FILE_NAME=mongodb-database-tools-suse${SYS_NAME}-x86_64-${TOOL_VERSION}
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-suse${SYS_NAME}-arm64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
if [ "arm64" == ${SYS_ARCH} ];then
|
||||
if [ "arm64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-suse${SYS_NAME}-arm64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
|
||||
@@ -15,11 +15,11 @@ SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | a
|
||||
SYS_NAME=${SYS_VERSION_ID/./}
|
||||
SYS_NAME_LEN=`echo "$SYS_NAME" | wc -L`
|
||||
|
||||
if [ "$SYS_NAME_LEN" == "1" ];then
|
||||
if [ "$SYS_NAME_LEN" = "1" ];then
|
||||
SYS_NAME=${SYS_NAME}0
|
||||
fi
|
||||
|
||||
if [ "$SYS_ARCH" == "aarch64" ];then
|
||||
if [ "$SYS_ARCH" = "aarch64" ];then
|
||||
if [ "$SYS_NAME" -gt "90" ];then
|
||||
SYS_NAME="90"
|
||||
fi
|
||||
@@ -63,7 +63,7 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
|
||||
#--------------- mongosh tool install ------------------ #
|
||||
TOOL_VERSION=2.2.5
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
|
||||
fi
|
||||
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
|
||||
@@ -85,11 +85,11 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
|
||||
#--------------- mongodb database install ------------------ #
|
||||
TOOL_VERSION=100.9.4
|
||||
TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-x86_64-${TOOL_VERSION}
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-aarch64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
if [ "arm64" == ${SYS_ARCH} ];then
|
||||
if [ "arm64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-arm64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
|
||||
@@ -15,11 +15,11 @@ SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | a
|
||||
SYS_NAME=${SYS_VERSION_ID/./}
|
||||
SYS_NAME_LEN=`echo "$SYS_NAME" | wc -L`
|
||||
|
||||
if [ "$SYS_NAME_LEN" == "1" ];then
|
||||
if [ "$SYS_NAME_LEN" = "1" ];then
|
||||
SYS_NAME=${SYS_NAME}0
|
||||
fi
|
||||
|
||||
if [ "$SYS_ARCH" == "aarch64" ];then
|
||||
if [ "$SYS_ARCH" = "aarch64" ];then
|
||||
if [ "$SYS_NAME" -gt "90" ];then
|
||||
SYS_NAME="90"
|
||||
fi
|
||||
@@ -63,7 +63,7 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
|
||||
#--------------- mongosh tool install ------------------ #
|
||||
TOOL_VERSION=2.2.5
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
|
||||
fi
|
||||
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
|
||||
@@ -85,11 +85,11 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
|
||||
#--------------- mongodb database install ------------------ #
|
||||
TOOL_VERSION=100.9.4
|
||||
TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-x86_64-${TOOL_VERSION}
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-aarch64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
if [ "arm64" == ${SYS_ARCH} ];then
|
||||
if [ "arm64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-arm64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
|
||||
#--------------- mongosh tool install ------------------ #
|
||||
TOOL_VERSION=2.2.5
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
|
||||
fi
|
||||
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
|
||||
@@ -72,11 +72,11 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
|
||||
#--------------- mongodb database install ------------------ #
|
||||
TOOL_VERSION=100.9.4
|
||||
TOOL_FILE_NAME=mongodb-database-tools-suse${SYS_NAME}-x86_64-${TOOL_VERSION}
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-suse${SYS_NAME}-arm64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
if [ "arm64" == ${SYS_ARCH} ];then
|
||||
if [ "arm64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-suse${SYS_NAME}-arm64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
|
||||
#--------------- mongosh tool install ------------------ #
|
||||
TOOL_VERSION=2.2.5
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
|
||||
fi
|
||||
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
|
||||
|
||||
@@ -15,11 +15,11 @@ SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | a
|
||||
SYS_NAME=${SYS_VERSION_ID/./}
|
||||
SYS_NAME_LEN=`echo "$SYS_NAME" | wc -L`
|
||||
|
||||
if [ "$SYS_NAME_LEN" == "1" ];then
|
||||
if [ "$SYS_NAME_LEN" = "1" ];then
|
||||
SYS_NAME=${SYS_NAME}0
|
||||
fi
|
||||
|
||||
if [ "$SYS_ARCH" == "aarch64" ];then
|
||||
if [ "$SYS_ARCH" = "aarch64" ];then
|
||||
if [ "$SYS_NAME" -gt "90" ];then
|
||||
SYS_NAME="90"
|
||||
fi
|
||||
@@ -63,7 +63,7 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
|
||||
#--------------- mongosh tool install ------------------ #
|
||||
TOOL_VERSION=2.2.5
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
|
||||
fi
|
||||
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
|
||||
@@ -85,11 +85,11 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
|
||||
#--------------- mongodb database install ------------------ #
|
||||
TOOL_VERSION=100.9.4
|
||||
TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-x86_64-${TOOL_VERSION}
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-aarch64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
if [ "arm64" == ${SYS_ARCH} ];then
|
||||
if [ "arm64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-arm64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
|
||||
@@ -62,11 +62,11 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
|
||||
#--------------- mongodb database install ------------------ #
|
||||
TOOL_VERSION=100.9.4
|
||||
TOOL_FILE_NAME=mongodb-database-tools-debian${SYS_NAME}-x86_64-${TOOL_VERSION}
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-debian${SYS_NAME}-arm64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
if [ "arm64" == ${SYS_ARCH} ];then
|
||||
if [ "arm64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-debian${SYS_NAME}-arm64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
|
||||
@@ -15,11 +15,11 @@ SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | a
|
||||
SYS_NAME=${SYS_VERSION_ID/./}
|
||||
SYS_NAME_LEN=`echo "$SYS_NAME" | wc -L`
|
||||
|
||||
if [ "$SYS_NAME_LEN" == "1" ];then
|
||||
if [ "$SYS_NAME_LEN" = "1" ];then
|
||||
SYS_NAME=${SYS_NAME}0
|
||||
fi
|
||||
|
||||
if [ "$SYS_ARCH" == "aarch64" ];then
|
||||
if [ "$SYS_ARCH" = "aarch64" ];then
|
||||
if [ "$SYS_NAME" -gt "90" ];then
|
||||
SYS_NAME="90"
|
||||
fi
|
||||
@@ -63,7 +63,7 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
|
||||
#--------------- mongosh tool install ------------------ #
|
||||
TOOL_VERSION=2.2.5
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
|
||||
fi
|
||||
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
|
||||
@@ -85,11 +85,11 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
|
||||
#--------------- mongodb database install ------------------ #
|
||||
TOOL_VERSION=100.9.4
|
||||
TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-x86_64-${TOOL_VERSION}
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-aarch64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
if [ "arm64" == ${SYS_ARCH} ];then
|
||||
if [ "arm64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-arm64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ mkdir -p $MG_DIR
|
||||
|
||||
# https://fastdl.mongodb.org/osx/mongodb-macos-arm64-8.0.3.tgz
|
||||
FILE_NAME=mongodb-macos-x86_64-${VERSION}
|
||||
if [ "arm64" == "${SYS_ARCH}" ];then
|
||||
if [ "arm64" = "${SYS_ARCH}" ];then
|
||||
FILE_NAME=mongodb-macos-arm64-${VERSION}
|
||||
fi
|
||||
FILE_NAME_TGZ=${FILE_NAME}.tgz
|
||||
@@ -40,11 +40,11 @@ fi
|
||||
#--------------- mongosh tool install ------------------ #
|
||||
TOOL_VERSION=2.2.5
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-darwin-x64
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-darwin-arm64
|
||||
fi
|
||||
|
||||
if [ "arm64" == ${SYS_ARCH} ];then
|
||||
if [ "arm64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-darwin-arm64
|
||||
fi
|
||||
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.zip
|
||||
@@ -65,11 +65,11 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
|
||||
# https://fastdl.mongodb.org/tools/db/mongodb-database-tools-macos-arm64-100.9.4.zip
|
||||
TOOL_VERSION=100.9.4
|
||||
TOOL_FILE_NAME=mongodb-database-tools-macos-x86_64-${TOOL_VERSION}
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-macos-arm64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
if [ "arm64" == ${SYS_ARCH} ];then
|
||||
if [ "arm64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-macos-arm64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
|
||||
#--------------- mongosh tool install ------------------ #
|
||||
TOOL_VERSION=2.2.5
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
|
||||
fi
|
||||
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
|
||||
@@ -72,11 +72,11 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
|
||||
#--------------- mongodb database install ------------------ #
|
||||
TOOL_VERSION=100.9.4
|
||||
TOOL_FILE_NAME=mongodb-database-tools-suse${SYS_NAME}-x86_64-${TOOL_VERSION}
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-suse${SYS_NAME}-arm64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
if [ "arm64" == ${SYS_ARCH} ];then
|
||||
if [ "arm64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-suse${SYS_NAME}-arm64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
|
||||
@@ -33,9 +33,9 @@ Uninstall_App()
|
||||
rm -rf $serverPath/msonedrive
|
||||
}
|
||||
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_App
|
||||
elif [ "${1}" == 'uninstall' ];then
|
||||
elif [ "${1}" = 'uninstall' ];then
|
||||
Uninstall_App
|
||||
else
|
||||
echo 'Error!';
|
||||
|
||||
@@ -100,7 +100,7 @@ Install_app()
|
||||
apt install -y golang golang-src
|
||||
fi
|
||||
|
||||
if [ "$sysName" == "darwin" ]; then
|
||||
if [ "$sysName" = "darwin" ]; then
|
||||
ARCH=arm64
|
||||
DOWNLOAD_URL="https://github.com/9seconds/mtg/releases/download/$VERSION/mtg-${VERSION_MIN}-${sysName}-arm64.tar.gz"
|
||||
elif [ "$sysName" != "macos" ]; then
|
||||
|
||||
@@ -43,7 +43,7 @@ fi
|
||||
|
||||
_os=`uname`
|
||||
echo "use system: ${_os}"
|
||||
if [ ${_os} == "Darwin" ]; then
|
||||
if [ ${_os} = "Darwin" ]; then
|
||||
OSNAME='macos'
|
||||
elif grep -Eq "openSUSE" /etc/*-release; then
|
||||
OSNAME='opensuse'
|
||||
@@ -70,7 +70,7 @@ fi
|
||||
VERSION_ID=`cat /etc/*-release | grep 'VERSION_ID' | awk -F = '{print $2}' | awk -F "\"" '{print $2}'`
|
||||
|
||||
# 针对ubuntu24,26进行优化
|
||||
if [[ "$OSNAME" == "ubuntu" ]] && [[ "$VERSION_ID" =~ ^(24|26)$ ]]; then
|
||||
if [[ "$OSNAME" = "ubuntu" ]] && [[ "$VERSION_ID" =~ ^(24|26)$ ]]; then
|
||||
cur_dir=`pwd`
|
||||
if [ -d /usr/lib/x86_64-linux-gnu ];then
|
||||
cd /usr/lib/x86_64-linux-gnu
|
||||
@@ -93,7 +93,7 @@ if [[ "$OSNAME" == "ubuntu" ]] && [[ "$VERSION_ID" =~ ^(24|26)$ ]]; then
|
||||
cd $cur_dir
|
||||
fi
|
||||
|
||||
if [[ "$OSNAME" == "debian" ]] && [[ "$VERSION_ID" =~ "13" ]]; then
|
||||
if [[ "$OSNAME" = "debian" ]] && [[ "$VERSION_ID" =~ "13" ]]; then
|
||||
cur_dir=`pwd`
|
||||
if [ -d /usr/lib/x86_64-linux-gnu ];then
|
||||
cd /usr/lib/x86_64-linux-gnu
|
||||
@@ -111,7 +111,7 @@ if [[ "$OSNAME" == "debian" ]] && [[ "$VERSION_ID" =~ "13" ]]; then
|
||||
cd $cur_dir
|
||||
fi
|
||||
|
||||
if [ "${2}" == "" ];then
|
||||
if [ "${2}" = "" ];then
|
||||
echo '缺少安装脚本...'
|
||||
exit 0
|
||||
fi
|
||||
@@ -121,7 +121,7 @@ if [ ! -d $curPath/versions/$2 ];then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "${action}" == "uninstall" ];then
|
||||
if [ "${action}" = "uninstall" ];then
|
||||
|
||||
cd ${rootPath} && python3 ${rootPath}/plugins/mysql-community/index.py stop ${type}
|
||||
cd ${rootPath} && python3 ${rootPath}/plugins/mysql-community/index.py initd_uninstall ${type}
|
||||
@@ -139,7 +139,7 @@ fi
|
||||
|
||||
sh -x $curPath/versions/$2/install_generic.sh $1
|
||||
|
||||
if [ "${action}" == "install" ];then
|
||||
if [ "${action}" = "install" ];then
|
||||
#初始化
|
||||
|
||||
if [ "$?" != "0" ];then
|
||||
|
||||
@@ -57,7 +57,7 @@ Install_mysql()
|
||||
|
||||
COMMUNITY_INSTALL
|
||||
|
||||
if [ "$?" == "0" ];then
|
||||
if [ "$?" = "0" ];then
|
||||
mkdir -p $serverPath/mysql-community
|
||||
echo '8.0' > $serverPath/mysql-community/version.pl
|
||||
echo '安装完成'
|
||||
@@ -76,7 +76,7 @@ Uninstall_mysql()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_mysql
|
||||
else
|
||||
Uninstall_mysql
|
||||
|
||||
@@ -55,7 +55,7 @@ Install_mysql()
|
||||
{
|
||||
echo '正在安装脚本文件...'
|
||||
COMMUNITY_INSTALL
|
||||
if [ "$?" == "0" ];then
|
||||
if [ "$?" = "0" ];then
|
||||
mkdir -p $serverPath/mysql-community
|
||||
echo '8.4' > $serverPath/mysql-community/version.pl
|
||||
echo '安装完成'
|
||||
@@ -73,7 +73,7 @@ Uninstall_mysql()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_mysql
|
||||
else
|
||||
Uninstall_mysql
|
||||
|
||||
@@ -55,7 +55,7 @@ Install_mysql()
|
||||
{
|
||||
echo '正在安装脚本文件...'
|
||||
COMMUNITY_INSTALL
|
||||
if [ "$?" == "0" ];then
|
||||
if [ "$?" = "0" ];then
|
||||
mkdir -p $serverPath/mysql-community
|
||||
echo '9.0' > $serverPath/mysql-community/version.pl
|
||||
echo '安装完成'
|
||||
@@ -73,7 +73,7 @@ Uninstall_mysql()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_mysql
|
||||
else
|
||||
Uninstall_mysql
|
||||
|
||||
@@ -58,7 +58,7 @@ Install_mysql()
|
||||
{
|
||||
echo '正在安装脚本文件...'
|
||||
COMMUNITY_INSTALL
|
||||
if [ "$?" == "0" ];then
|
||||
if [ "$?" = "0" ];then
|
||||
mkdir -p $serverPath/mysql-community
|
||||
echo '9.1' > $serverPath/mysql-community/version.pl
|
||||
echo '安装完成'
|
||||
@@ -76,7 +76,7 @@ Uninstall_mysql()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_mysql
|
||||
else
|
||||
Uninstall_mysql
|
||||
|
||||
@@ -58,7 +58,7 @@ Install_mysql()
|
||||
{
|
||||
echo '正在安装脚本文件...'
|
||||
COMMUNITY_INSTALL
|
||||
if [ "$?" == "0" ];then
|
||||
if [ "$?" = "0" ];then
|
||||
mkdir -p $serverPath/mysql-community
|
||||
echo '9.2' > $serverPath/mysql-community/version.pl
|
||||
echo '安装完成'
|
||||
@@ -76,7 +76,7 @@ Uninstall_mysql()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_mysql
|
||||
else
|
||||
Uninstall_mysql
|
||||
|
||||
@@ -58,7 +58,7 @@ Install_mysql()
|
||||
{
|
||||
echo '正在安装脚本文件...'
|
||||
COMMUNITY_INSTALL
|
||||
if [ "$?" == "0" ];then
|
||||
if [ "$?" = "0" ];then
|
||||
mkdir -p $serverPath/mysql-community
|
||||
echo '9.3' > $serverPath/mysql-community/version.pl
|
||||
echo '安装完成'
|
||||
|
||||
@@ -152,13 +152,13 @@ Install_mysql()
|
||||
cd ${mysqlDir}/mysql-5.5.62 && patch -p1 < ${rootPath}/plugins/mysql/patch/mysql-5.5-fix-arm-client_plugin.patch
|
||||
fi
|
||||
|
||||
if [ "$OSNAME" == "ubuntu" ];then
|
||||
if [ "$OSNAME" = "ubuntu" ];then
|
||||
Install_dep
|
||||
fi
|
||||
|
||||
OPTIONS=''
|
||||
|
||||
if [ "$OSNAME" == "debian" ] && [ "$VERSION_ID" == "13" ];then
|
||||
if [ "$OSNAME" = "debian" ] && [ "$VERSION_ID" = "13" ];then
|
||||
Install_dep_debain13
|
||||
# export CFLAGS="-D__s64=long long -D__u64='unsigned long long' -D__s32=int -D__u32='unsigned int' -D__u16='unsigned short'"
|
||||
# export CXXFLAGS="$CFLAGS"
|
||||
|
||||
@@ -151,7 +151,7 @@ Install_mysql()
|
||||
md5_mysql_ok=1a637fce4599d9bf5f1c81699f086274
|
||||
if [ -f ${mysqlDir}/mysql-boost-${VERSION}.tar.gz ];then
|
||||
md5_mysql=`md5sum ${mysqlDir}/mysql-boost-${VERSION}.tar.gz | awk '{print $1}'`
|
||||
if [ "${md5_mysql_ok}" == "${md5_mysql}" ]; then
|
||||
if [ "${md5_mysql_ok}" = "${md5_mysql}" ]; then
|
||||
echo "mysql5.7 file check ok"
|
||||
else
|
||||
# 重新下载
|
||||
@@ -174,11 +174,11 @@ Install_mysql()
|
||||
WHERE_DIR_GPP=`which g++`
|
||||
fi
|
||||
|
||||
if [ "$OSNAME" == "ubuntu" ];then
|
||||
if [ "$OSNAME" = "ubuntu" ];then
|
||||
Install_dep
|
||||
fi
|
||||
|
||||
if [ "$OSNAME" == "debian" ] && [ "$VERSION_ID" == "13" ];then
|
||||
if [ "$OSNAME" = "debian" ] && [ "$VERSION_ID" = "13" ];then
|
||||
Install_dep_debain13
|
||||
fi
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ Install_mysql()
|
||||
md5_mysql_ok=6707beb0d46a9e08a19aa596329ca79d
|
||||
if [ -f ${mysqlDir}/mysql-boost-${VERSION}.tar.gz ];then
|
||||
md5_mysql=`md5sum ${mysqlDir}/mysql-boost-${VERSION}.tar.gz | awk '{print $1}'`
|
||||
if [ "${md5_mysql_ok}" == "${md5_mysql}" ]; then
|
||||
if [ "${md5_mysql_ok}" = "${md5_mysql}" ]; then
|
||||
echo "mysql8.0 file check ok"
|
||||
else
|
||||
# 重新下载
|
||||
@@ -130,7 +130,7 @@ Install_mysql()
|
||||
|
||||
WHERE_DIR_GCC=/usr/bin/gcc
|
||||
WHERE_DIR_GPP=/usr/bin/g++
|
||||
if [ "$OSNAME" == "centos" ] && [ "$VERSION_ID" == "7" ];then
|
||||
if [ "$OSNAME" = "centos" ] && [ "$VERSION_ID" = "7" ];then
|
||||
yum install -y libudev-devel
|
||||
yum install -y centos-release-scl
|
||||
yum install -y devtoolset-11-gcc devtoolset-11-gcc-c++ devtoolset-11-binutils
|
||||
@@ -142,7 +142,7 @@ Install_mysql()
|
||||
echo $WHERE_DIR_GPP
|
||||
fi
|
||||
|
||||
if [ "$OSNAME" == "ubuntu" ] && [ "$VERSION_ID" == "18.04" ];then
|
||||
if [ "$OSNAME" = "ubuntu" ] && [ "$VERSION_ID" = "18.04" ];then
|
||||
apt install -y libudev-dev
|
||||
apt install -y libtirpc-dev
|
||||
apt install -y libssl-dev
|
||||
@@ -164,7 +164,7 @@ Install_mysql()
|
||||
fi
|
||||
|
||||
|
||||
if [ "$OSNAME" == "opensuse" ];then
|
||||
if [ "$OSNAME" = "opensuse" ];then
|
||||
zypper install -y gcc11
|
||||
zypper install -y gcc11-c++
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ Install_mysql()
|
||||
md5_mysql_ok=704ad9fb4779e76ce5e327285813c97c
|
||||
if [ -f ${mysqlDir}/mysql-boost-${VERSION}.tar.gz ];then
|
||||
md5_mysql=`md5sum ${mysqlDir}/mysql-boost-${VERSION}.tar.gz | awk '{print $1}'`
|
||||
if [ "${md5_mysql_ok}" == "${md5_mysql}" ]; then
|
||||
if [ "${md5_mysql_ok}" = "${md5_mysql}" ]; then
|
||||
echo "mysql8.2 file check ok"
|
||||
else
|
||||
# 重新下载
|
||||
@@ -130,7 +130,7 @@ Install_mysql()
|
||||
|
||||
WHERE_DIR_GCC=/usr/bin/gcc
|
||||
WHERE_DIR_GPP=/usr/bin/g++
|
||||
if [ "$OSNAME" == "centos" ] && [ "$VERSION_ID" == "7" ];then
|
||||
if [ "$OSNAME" = "centos" ] && [ "$VERSION_ID" = "7" ];then
|
||||
yum install -y libudev-devel
|
||||
yum install -y centos-release-scl
|
||||
yum install -y devtoolset-11-gcc devtoolset-11-gcc-c++ devtoolset-11-binutils
|
||||
@@ -142,7 +142,7 @@ Install_mysql()
|
||||
echo $WHERE_DIR_GPP
|
||||
fi
|
||||
|
||||
if [ "$OSNAME" == "ubuntu" ];then
|
||||
if [ "$OSNAME" = "ubuntu" ];then
|
||||
apt install -y libudev-dev
|
||||
apt install -y libtirpc-dev
|
||||
apt install -y libssl-dev
|
||||
@@ -164,7 +164,7 @@ Install_mysql()
|
||||
fi
|
||||
|
||||
|
||||
if [ "$OSNAME" == "opensuse" ];then
|
||||
if [ "$OSNAME" = "opensuse" ];then
|
||||
zypper install -y gcc11
|
||||
zypper install -y gcc11-c++
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ Install_mysql()
|
||||
md5_mysql_ok=8c2399782217f5391322751c66ea261b
|
||||
if [ -f ${mysqlDir}/mysql-boost-${VERSION}.tar.gz ];then
|
||||
md5_mysql=`md5sum ${mysqlDir}/mysql-boost-${VERSION}.tar.gz | awk '{print $1}'`
|
||||
if [ "${md5_mysql_ok}" == "${md5_mysql}" ]; then
|
||||
if [ "${md5_mysql_ok}" = "${md5_mysql}" ]; then
|
||||
echo "mysql8.3 file check ok"
|
||||
else
|
||||
# 重新下载
|
||||
@@ -163,7 +163,7 @@ Install_mysql()
|
||||
fi
|
||||
|
||||
|
||||
if [ "$OSNAME" == "opensuse" ];then
|
||||
if [ "$OSNAME" = "opensuse" ];then
|
||||
zypper install -y gcc11
|
||||
zypper install -y gcc11-c++
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ Install_mysql()
|
||||
md5_mysql_ok=90dc27a8b64eee938a0bb045c580b80c
|
||||
if [ -f ${mysqlDir}/mysql-${VERSION}.tar.gz ];then
|
||||
md5_mysql=`md5sum ${mysqlDir}/mysql-${VERSION}.tar.gz | awk '{print $1}'`
|
||||
if [ "${md5_mysql_ok}" == "${md5_mysql}" ]; then
|
||||
if [ "${md5_mysql_ok}" = "${md5_mysql}" ]; then
|
||||
echo "mysql9.0 file check ok"
|
||||
else
|
||||
# 重新下载
|
||||
@@ -133,7 +133,7 @@ Install_mysql()
|
||||
|
||||
WHERE_DIR_GCC=/usr/bin/gcc
|
||||
WHERE_DIR_GPP=/usr/bin/g++
|
||||
if [ "$OSNAME" == "centos" ] && [ "$VERSION_ID" == "7" ];then
|
||||
if [ "$OSNAME" = "centos" ] && [ "$VERSION_ID" = "7" ];then
|
||||
yum install -y libudev-devel
|
||||
yum install -y centos-release-scl
|
||||
yum install -y devtoolset-11-gcc devtoolset-11-gcc-c++ devtoolset-11-binutils
|
||||
@@ -145,7 +145,7 @@ Install_mysql()
|
||||
echo $WHERE_DIR_GPP
|
||||
fi
|
||||
|
||||
if [ "$OSNAME" == "ubuntu" ];then
|
||||
if [ "$OSNAME" = "ubuntu" ];then
|
||||
apt install -y libudev-dev
|
||||
apt install -y libtirpc-dev
|
||||
apt install -y libssl-dev
|
||||
@@ -171,7 +171,7 @@ Install_mysql()
|
||||
fi
|
||||
|
||||
|
||||
if [ "$OSNAME" == "opensuse" ];then
|
||||
if [ "$OSNAME" = "opensuse" ];then
|
||||
zypper install -y gcc11
|
||||
zypper install -y gcc11-c++
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ Install_mysql()
|
||||
md5_mysql_ok=eb2c6bbd20569d2690bc7e34312f5210
|
||||
if [ -f ${mysqlDir}/mysql-${VERSION}.tar.gz ];then
|
||||
md5_mysql=`md5sum ${mysqlDir}/mysql-${VERSION}.tar.gz | awk '{print $1}'`
|
||||
if [ "${md5_mysql_ok}" == "${md5_mysql}" ]; then
|
||||
if [ "${md5_mysql_ok}" = "${md5_mysql}" ]; then
|
||||
echo "mysql9.1 file check ok"
|
||||
else
|
||||
# 重新下载
|
||||
@@ -144,7 +144,7 @@ Install_mysql()
|
||||
echo $WHERE_DIR_GPP
|
||||
fi
|
||||
|
||||
if [ "$OSNAME" == "ubuntu" ];then
|
||||
if [ "$OSNAME" = "ubuntu" ];then
|
||||
apt install -y libudev-dev
|
||||
apt install -y libtirpc-dev
|
||||
apt install -y libssl-dev
|
||||
|
||||
@@ -107,7 +107,7 @@ Install_mysql()
|
||||
md5_mysql_ok=acabc8aa764a94a8b10f90284c6e60c5
|
||||
if [ -f ${mysqlDir}/mysql-${VERSION}.tar.gz ];then
|
||||
md5_mysql=`md5sum ${mysqlDir}/mysql-${VERSION}.tar.gz | awk '{print $1}'`
|
||||
if [ "${md5_mysql_ok}" == "${md5_mysql}" ]; then
|
||||
if [ "${md5_mysql_ok}" = "${md5_mysql}" ]; then
|
||||
echo "mysql9.2 file check ok"
|
||||
else
|
||||
# 重新下载
|
||||
@@ -132,7 +132,7 @@ Install_mysql()
|
||||
|
||||
WHERE_DIR_GCC=/usr/bin/gcc
|
||||
WHERE_DIR_GPP=/usr/bin/g++
|
||||
if [ "$OSNAME" == "centos" ] && [ "$VERSION_ID" == "7" ];then
|
||||
if [ "$OSNAME" = "centos" ] && [ "$VERSION_ID" = "7" ];then
|
||||
yum install -y libudev-devel
|
||||
yum install -y centos-release-scl
|
||||
yum install -y devtoolset-11-gcc devtoolset-11-gcc-c++ devtoolset-11-binutils
|
||||
@@ -144,7 +144,7 @@ Install_mysql()
|
||||
echo $WHERE_DIR_GPP
|
||||
fi
|
||||
|
||||
if [ "$OSNAME" == "ubuntu" ];then
|
||||
if [ "$OSNAME" = "ubuntu" ];then
|
||||
apt install -y libudev-dev
|
||||
apt install -y libtirpc-dev
|
||||
apt install -y libssl-dev
|
||||
@@ -170,7 +170,7 @@ Install_mysql()
|
||||
fi
|
||||
|
||||
|
||||
if [ "$OSNAME" == "opensuse" ];then
|
||||
if [ "$OSNAME" = "opensuse" ];then
|
||||
zypper install -y gcc11
|
||||
zypper install -y gcc11-c++
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ Install_mysql()
|
||||
md5_mysql_ok=acabc8aa764a94a8b10f90284c6e60c5
|
||||
if [ -f ${mysqlDir}/mysql-${VERSION}.tar.gz ];then
|
||||
md5_mysql=`md5sum ${mysqlDir}/mysql-${VERSION}.tar.gz | awk '{print $1}'`
|
||||
if [ "${md5_mysql_ok}" == "${md5_mysql}" ]; then
|
||||
if [ "${md5_mysql_ok}" = "${md5_mysql}" ]; then
|
||||
echo "mysql9.3 file check ok"
|
||||
else
|
||||
# 重新下载
|
||||
|
||||
@@ -107,7 +107,7 @@ Install_mysql()
|
||||
md5_mysql_ok=c770f276fb84019be6fbe0a57b32efbc
|
||||
if [ -f ${mysqlDir}/mysql-${VERSION}.tar.gz ];then
|
||||
md5_mysql=`md5sum ${mysqlDir}/mysql-${VERSION}.tar.gz | awk '{print $1}'`
|
||||
if [ "${md5_mysql_ok}" == "${md5_mysql}" ]; then
|
||||
if [ "${md5_mysql_ok}" = "${md5_mysql}" ]; then
|
||||
echo "mysql9.4 file check ok"
|
||||
else
|
||||
# 重新下载
|
||||
@@ -132,7 +132,7 @@ Install_mysql()
|
||||
|
||||
WHERE_DIR_GCC=/usr/bin/gcc
|
||||
WHERE_DIR_GPP=/usr/bin/g++
|
||||
if [ "$OSNAME" == "centos" ] && [ "$VERSION_ID" == "7" ];then
|
||||
if [ "$OSNAME" = "centos" ] && [ "$VERSION_ID" = "7" ];then
|
||||
yum install -y libudev-devel
|
||||
yum install -y centos-release-scl
|
||||
yum install -y devtoolset-11-gcc devtoolset-11-gcc-c++ devtoolset-11-binutils
|
||||
@@ -144,7 +144,7 @@ Install_mysql()
|
||||
echo $WHERE_DIR_GPP
|
||||
fi
|
||||
|
||||
if [ "$OSNAME" == "ubuntu" ];then
|
||||
if [ "$OSNAME" = "ubuntu" ];then
|
||||
apt install -y libudev-dev
|
||||
apt install -y libtirpc-dev
|
||||
apt install -y libssl-dev
|
||||
@@ -170,7 +170,7 @@ Install_mysql()
|
||||
fi
|
||||
|
||||
|
||||
if [ "$OSNAME" == "opensuse" ];then
|
||||
if [ "$OSNAME" = "opensuse" ];then
|
||||
zypper install -y gcc11
|
||||
zypper install -y gcc11-c++
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ Install_mysql()
|
||||
md5_mysql_ok=5d2f4c9568a0e01d20dc5442c772de9f
|
||||
if [ -f ${mysqlDir}/mysql-${VERSION}.tar.gz ];then
|
||||
md5_mysql=`md5sum ${mysqlDir}/mysql-${VERSION}.tar.gz | awk '{print $1}'`
|
||||
if [ "${md5_mysql_ok}" == "${md5_mysql}" ]; then
|
||||
if [ "${md5_mysql_ok}" = "${md5_mysql}" ]; then
|
||||
echo "mysql9.4 file check ok"
|
||||
else
|
||||
# 重新下载
|
||||
@@ -132,7 +132,7 @@ Install_mysql()
|
||||
|
||||
WHERE_DIR_GCC=/usr/bin/gcc
|
||||
WHERE_DIR_GPP=/usr/bin/g++
|
||||
if [ "$OSNAME" == "centos" ] && [ "$VERSION_ID" == "7" ];then
|
||||
if [ "$OSNAME" = "centos" ] && [ "$VERSION_ID" = "7" ];then
|
||||
yum install -y libudev-devel
|
||||
yum install -y centos-release-scl
|
||||
yum install -y devtoolset-11-gcc devtoolset-11-gcc-c++ devtoolset-11-binutils
|
||||
@@ -144,7 +144,7 @@ Install_mysql()
|
||||
echo $WHERE_DIR_GPP
|
||||
fi
|
||||
|
||||
if [ "$OSNAME" == "ubuntu" ];then
|
||||
if [ "$OSNAME" = "ubuntu" ];then
|
||||
apt install -y libudev-dev
|
||||
apt install -y libtirpc-dev
|
||||
apt install -y libssl-dev
|
||||
@@ -170,7 +170,7 @@ Install_mysql()
|
||||
fi
|
||||
|
||||
|
||||
if [ "$OSNAME" == "opensuse" ];then
|
||||
if [ "$OSNAME" = "opensuse" ];then
|
||||
zypper install -y gcc11
|
||||
zypper install -y gcc11-c++
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ fi
|
||||
|
||||
sh -x $curPath/versions/$2/install.sh $1
|
||||
|
||||
if [ "${action}" == "uninstall" ];then
|
||||
if [ "${action}" = "uninstall" ];then
|
||||
if [ -f /usr/lib/systemd/system/nezha.service ] || [ -f /lib/systemd/system/nezha.service ] ;then
|
||||
systemctl stop nezha
|
||||
systemctl disable nezha
|
||||
|
||||
@@ -25,7 +25,7 @@ if [ -d /www/server/nezha ];then
|
||||
echo "$INSTALL_VERSION" > /www/server/nezha/version.pl
|
||||
fi
|
||||
|
||||
if [ "$INSTALL_VERSION" == "$NUMBER_LATEST_VERSION" ];then
|
||||
if [ "$INSTALL_VERSION" = "$NUMBER_LATEST_VERSION" ];then
|
||||
echo "已经是最新!!!"
|
||||
exit
|
||||
fi
|
||||
|
||||
@@ -173,7 +173,7 @@ Uninstall_App()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_App
|
||||
else
|
||||
Uninstall_App
|
||||
|
||||
@@ -173,7 +173,7 @@ Uninstall_App()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_App
|
||||
else
|
||||
Uninstall_App
|
||||
|
||||
@@ -26,9 +26,9 @@ ARCH="amd64"
|
||||
|
||||
get_arch() {
|
||||
TMP_ARCH=`arch`
|
||||
if [ "$TMP_ARCH" == "x86_64" ];then
|
||||
if [ "$TMP_ARCH" = "x86_64" ];then
|
||||
ARCH="amd64"
|
||||
elif [ "$TMP_ARCH" == "aarch64" ];then
|
||||
elif [ "$TMP_ARCH" = "aarch64" ];then
|
||||
ARCH="arm64"
|
||||
else
|
||||
echo $ARCH
|
||||
@@ -70,7 +70,7 @@ Uninstall_App()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_App
|
||||
else
|
||||
Uninstall_App
|
||||
|
||||
@@ -16,7 +16,7 @@ if [ -f ${rootPath}/bin/activate ];then
|
||||
. ${rootPath}/bin/activate
|
||||
fi
|
||||
|
||||
if [ "$sys_os" == "Darwin" ];then
|
||||
if [ "$sys_os" = "Darwin" ];then
|
||||
BAK='_bak'
|
||||
else
|
||||
BAK=''
|
||||
@@ -37,7 +37,7 @@ Uninstall_App(){
|
||||
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_App
|
||||
else
|
||||
Uninstall_App
|
||||
|
||||
@@ -17,7 +17,7 @@ if [ -f ${rootPath}/bin/activate ];then
|
||||
. ${rootPath}/bin/activate
|
||||
fi
|
||||
|
||||
if [ "$sys_os" == "Darwin" ];then
|
||||
if [ "$sys_os" = "Darwin" ];then
|
||||
BAK='_bak'
|
||||
else
|
||||
BAK=''
|
||||
@@ -65,10 +65,10 @@ Install_App(){
|
||||
export PATH=$PATH:$serverPath/op_waf/luarocks/bin
|
||||
|
||||
if [ ! -f $serverPath/op_waf/waf/conf/lsqlite3.so ];then
|
||||
if [ "${sys_os}" == "Darwin" ];then
|
||||
if [ "${sys_os}" = "Darwin" ];then
|
||||
cd $serverPath/source/op_waf/lsqlite3_fsl09y
|
||||
find_cfg=`cat Makefile | grep 'SQLITE_DIR'`
|
||||
if [ "$find_cfg" == "" ];then
|
||||
if [ "$find_cfg" = "" ];then
|
||||
LIB_SQLITE_DIR=`brew info sqlite | grep /usr/local/Cellar/sqlite | cut -d \ -f 1 | awk 'END {print}'`
|
||||
echo $LIB_SQLITE_DIR
|
||||
sed -i $BAK "s#\$(ROCKSPEC)#\$(ROCKSPEC) SQLITE_DIR=${LIB_SQLITE_DIR}#g" Makefile
|
||||
@@ -127,14 +127,14 @@ Install_App(){
|
||||
Uninstall_App(){
|
||||
|
||||
cd ${rootPath} && python3 ${rootPath}/plugins/op_waf/index.py stop
|
||||
if [ "$?" == "0" ];then
|
||||
if [ "$?" = "0" ];then
|
||||
rm -rf $serverPath/op_waf
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_App
|
||||
else
|
||||
Uninstall_App
|
||||
|
||||
@@ -20,7 +20,7 @@ if [ -f ${rootPath}/bin/activate ];then
|
||||
. ${rootPath}/bin/activate
|
||||
fi
|
||||
|
||||
if [ "$sys_os" == "Darwin" ];then
|
||||
if [ "$sys_os" = "Darwin" ];then
|
||||
BAK='_bak'
|
||||
else
|
||||
BAK=''
|
||||
@@ -71,10 +71,10 @@ Install_App(){
|
||||
export PATH=$PATH:$serverPath/op_waf/luarocks/bin
|
||||
|
||||
if [ ! -f $serverPath/op_waf/waf/conf/lsqlite3.so ];then
|
||||
if [ "${sys_os}" == "Darwin" ];then
|
||||
if [ "${sys_os}" = "Darwin" ];then
|
||||
cd $serverPath/source/op_waf/lsqlite3_v096
|
||||
find_cfg=`cat Makefile | grep 'SQLITE_DIR'`
|
||||
if [ "$find_cfg" == "" ];then
|
||||
if [ "$find_cfg" = "" ];then
|
||||
LIB_SQLITE_DIR=`brew info sqlite | grep /opt/homebrew/Cellar/sqlite | cut -d \ -f 1 | awk 'END {print}'`
|
||||
echo $LIB_SQLITE_DIR
|
||||
sed -i $BAK "s#\$(ROCKSPEC)#\$(ROCKSPEC) SQLITE_DIR=${LIB_SQLITE_DIR}#g" Makefile
|
||||
@@ -141,14 +141,14 @@ Install_App(){
|
||||
|
||||
Uninstall_App(){
|
||||
cd ${rootPath} && python3 ${rootPath}/plugins/op_waf/index.py stop
|
||||
if [ "$?" == "0" ];then
|
||||
if [ "$?" = "0" ];then
|
||||
rm -rf $serverPath/op_waf
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_App
|
||||
else
|
||||
Uninstall_App
|
||||
|
||||
@@ -8,7 +8,7 @@ function GetCpuUsage(){
|
||||
idle_cpu=`echo $cpu_info|awk '{print $2}'`
|
||||
cpu_total_time=0
|
||||
for ci in ${cpu_info[@]}; do
|
||||
if [ "$ci" == "cpu" ];then
|
||||
if [ "$ci" = "cpu" ];then
|
||||
continue
|
||||
else
|
||||
#echo $ci
|
||||
|
||||
@@ -5,7 +5,7 @@ export PATH=$PATH:/opt/stap/bin:/opt/stapxx
|
||||
# cd /www/server/mdserver-web/plugins/op_waf/t && bash ngx_debug.sh c ok
|
||||
|
||||
|
||||
if [ ${_os} == "Darwin" ]; then
|
||||
if [ ${_os} = "Darwin" ]; then
|
||||
OSNAME='macos'
|
||||
elif grep -Eq "openSUSE" /etc/*-release; then
|
||||
OSNAME='opensuse'
|
||||
@@ -73,11 +73,11 @@ name=$2
|
||||
# apt install -y kernel-debuginfo-common kernel-debuginfo
|
||||
# apt install -y kernel-*
|
||||
|
||||
if [ "$OSNAME" == "debian" ];then
|
||||
if [ "$OSNAME" = "debian" ];then
|
||||
apt install -y systemtap
|
||||
apt-get install -y build-essential
|
||||
apt-get install -y linux-headers-$(uname -r)
|
||||
elif [ "$OSNAME" == "centos" ];then
|
||||
elif [ "$OSNAME" = "centos" ];then
|
||||
yum install -y kernel-devel-$(uname -r)
|
||||
fi
|
||||
|
||||
@@ -106,11 +106,11 @@ fi
|
||||
|
||||
for pid in ${pids[@]}; do
|
||||
echo "strace:$pid"
|
||||
if [ $1 == "lua" ]; then
|
||||
if [ $1 = "lua" ]; then
|
||||
# --without-luajit-gc64 | lua 模式编译时需要使用此参数
|
||||
/opt/openresty-systemtap-toolkit/ngx-sample-lua-bt -p $pid --luajit20 -t 30 >temp.bt
|
||||
/opt/openresty-systemtap-toolkit/fix-lua-bt temp.bt >${name}_${pid}.bt
|
||||
elif [ $1 == "c" ]; then
|
||||
elif [ $1 = "c" ]; then
|
||||
/opt/openresty-systemtap-toolkit/sample-bt -p $pid -t 10 -u > ${name}_${pid}.bt
|
||||
else
|
||||
echo "type is only lua/c"
|
||||
@@ -124,12 +124,12 @@ for pid in ${pids[@]}; do
|
||||
echo "${name}_${pid}.svg -- make ok"
|
||||
done
|
||||
|
||||
# if [ $1 == "lua" ]; then
|
||||
# if [ $1 = "lua" ]; then
|
||||
# # /opt/openresty-systemtap-toolkit/ngx-sample-lua-bt -p 377452 --luajit20 -t 30 >temp.bt
|
||||
# /opt/openresty-systemtap-toolkit/ngx-sample-lua-bt -p $pid --luajit20 -t 30 >temp.bt
|
||||
# # /opt/openresty-systemtap-toolkit/fix-lua-bt temp.bt >t1.bt
|
||||
# /opt/openresty-systemtap-toolkit/fix-lua-bt temp.bt >${name}.bt
|
||||
# elif [ $1 == "c" ]; then
|
||||
# elif [ $1 = "c" ]; then
|
||||
# # /opt/openresty-systemtap-toolkit/sample-bt -p 496435 -t 10 -u > t2.bt
|
||||
# /opt/openresty-systemtap-toolkit/sample-bt -p $pid -t 10 -u > ${name}.bt
|
||||
# else
|
||||
|
||||
@@ -27,7 +27,7 @@ else
|
||||
fi
|
||||
|
||||
NGINX_IDS=`ps -ef|grep nginx | grep -v grep| awk '{print $2}'`
|
||||
if [ "$NGINX_IDS" == "" ];then
|
||||
if [ "$NGINX_IDS" = "" ];then
|
||||
ps -ef|grep nginx| grep -v grep| awk '{print $2}' | xargs kill -9
|
||||
systemctl start "$service_name"
|
||||
echo "OpenResty未运行,正在启动服务..."
|
||||
|
||||
@@ -19,7 +19,7 @@ openrestyDir=${serverPath}/source/openresty
|
||||
|
||||
Install_openresty()
|
||||
{
|
||||
if [ "${action}" == "install" ];then
|
||||
if [ "${action}" = "install" ];then
|
||||
if [ -d $serverPath/openresty ];then
|
||||
exit 0
|
||||
fi
|
||||
@@ -59,7 +59,7 @@ Install_openresty()
|
||||
fi
|
||||
|
||||
DOWNLOAD_SIZE=`wc -c ${openrestyDir}/openresty-${VERSION}.tar.gz | awk '{print $1}'`
|
||||
if [ "$DOWNLOAD_SIZE" == "0" ];then
|
||||
if [ "$DOWNLOAD_SIZE" = "0" ];then
|
||||
echo 'download failed, download again'
|
||||
rm -rf ${openrestyDir}/openresty-${VERSION}.tar.gz
|
||||
fi
|
||||
@@ -76,7 +76,7 @@ Install_openresty()
|
||||
opensslVersion="1.1.1p"
|
||||
libresslVersion="3.9.1"
|
||||
pcreVersion='8.38'
|
||||
if [ "$sysName" == "Darwin" ];then
|
||||
if [ "$sysName" = "Darwin" ];then
|
||||
|
||||
if [ ! -f ${openrestyDir}/pcre-${pcreVersion}.tar.gz ];then
|
||||
wget --no-check-certificate -O ${openrestyDir}/pcre-${pcreVersion}.tar.gz https://netix.dl.sourceforge.net/project/pcre/pcre/${pcreVersion}/pcre-${pcreVersion}.tar.gz
|
||||
@@ -144,13 +144,13 @@ Install_openresty()
|
||||
cd ${openrestyDir} && wget -O $openrestyDir/zstd-nginx-module.tar.gz https://github.com/tokers/zstd-nginx-module/archive/refs/heads/master.tar.gz
|
||||
cd ${openrestyDir} && tar -zxvf zstd-nginx-module.tar.gz
|
||||
|
||||
if [ "$sysName" == "Darwin" ];then
|
||||
if [ "$sysName" = "Darwin" ];then
|
||||
export ZSTD_INC=/opt/homebrew/include
|
||||
export ZSTD_LIB=/opt/homebrew/lib
|
||||
fi
|
||||
|
||||
pkg-config --exists --print-errors libzstd
|
||||
if [ "$?" == "0" ];then
|
||||
if [ "$?" = "0" ];then
|
||||
OPTIONS="${OPTIONS} --add-module=${openrestyDir}/zstd-nginx-module-master"
|
||||
fi
|
||||
fi
|
||||
@@ -171,7 +171,7 @@ Install_openresty()
|
||||
# 用于调式
|
||||
|
||||
CMD_MAKE=`which gmake`
|
||||
if [ "$?" == "0" ];then
|
||||
if [ "$?" = "0" ];then
|
||||
gmake -j${cpuCore} && gmake install && gmake clean
|
||||
else
|
||||
make -j${cpuCore} && make install && make clean
|
||||
@@ -202,9 +202,9 @@ Uninstall_openresty()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == "install" ];then
|
||||
if [ "${1}" = "install" ];then
|
||||
Install_openresty
|
||||
elif [ "${1}" == "upgrade" ];then
|
||||
elif [ "${1}" = "upgrade" ];then
|
||||
Install_openresty
|
||||
else
|
||||
Uninstall_openresty
|
||||
|
||||
@@ -59,7 +59,7 @@ Install_openresty()
|
||||
fi
|
||||
|
||||
DOWNLOAD_SIZE=`wc -c ${openrestyDir}/openresty-${VERSION}.tar.gz | awk '{print $1}'`
|
||||
if [ "$DOWNLOAD_SIZE" == "0" ];then
|
||||
if [ "$DOWNLOAD_SIZE" = "0" ];then
|
||||
echo 'download failed, download again'
|
||||
rm -rf ${openrestyDir}/openresty-${VERSION}.tar.gz
|
||||
fi
|
||||
@@ -173,7 +173,7 @@ Install_openresty()
|
||||
# 用于调式
|
||||
|
||||
CMD_MAKE=`which gmake`
|
||||
if [ "$?" == "0" ];then
|
||||
if [ "$?" = "0" ];then
|
||||
gmake -j${cpuCore} && gmake install && gmake clean
|
||||
else
|
||||
make -j${cpuCore} && make install && make clean
|
||||
|
||||
@@ -144,13 +144,13 @@ Install_openresty()
|
||||
cd ${openrestyDir} && wget -O $openrestyDir/zstd-nginx-module.tar.gz https://github.com/tokers/zstd-nginx-module/archive/refs/heads/master.tar.gz
|
||||
cd ${openrestyDir} && tar -zxvf zstd-nginx-module.tar.gz
|
||||
|
||||
if [ "$sysName" == "Darwin" ];then
|
||||
if [ "$sysName" = "Darwin" ];then
|
||||
export ZSTD_INC=/opt/homebrew/include
|
||||
export ZSTD_LIB=/opt/homebrew/lib
|
||||
fi
|
||||
|
||||
pkg-config --exists --print-errors libzstd
|
||||
if [ "$?" == "0" ];then
|
||||
if [ "$?" = "0" ];then
|
||||
OPTIONS="${OPTIONS} --add-module=${openrestyDir}/zstd-nginx-module-master"
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -20,7 +20,7 @@ openrestyDir=${serverPath}/source/openresty
|
||||
|
||||
Install_openresty()
|
||||
{
|
||||
if [ "${action}" == "install" ];then
|
||||
if [ "${action}" = "install" ];then
|
||||
if [ -d $serverPath/openresty ];then
|
||||
exit 0
|
||||
fi
|
||||
@@ -60,7 +60,7 @@ Install_openresty()
|
||||
fi
|
||||
|
||||
DOWNLOAD_SIZE=`wc -c ${openrestyDir}/openresty-${VERSION}.tar.gz | awk '{print $1}'`
|
||||
if [ "$DOWNLOAD_SIZE" == "0" ];then
|
||||
if [ "$DOWNLOAD_SIZE" = "0" ];then
|
||||
echo 'download failed, download again'
|
||||
rm -rf ${openrestyDir}/openresty-${VERSION}.tar.gz
|
||||
fi
|
||||
@@ -77,7 +77,7 @@ Install_openresty()
|
||||
opensslVersion="3.4.4"
|
||||
libresslVersion="3.9.1"
|
||||
pcreVersion='8.45'
|
||||
if [ "$sysName" == "Darwin" ];then
|
||||
if [ "$sysName" = "Darwin" ];then
|
||||
|
||||
if [ ! -f ${openrestyDir}/pcre-${pcreVersion}.tar.gz ];then
|
||||
wget --no-check-certificate -O ${openrestyDir}/pcre-${pcreVersion}.tar.gz https://netix.dl.sourceforge.net/project/pcre/pcre/${pcreVersion}/pcre-${pcreVersion}.tar.gz
|
||||
@@ -160,13 +160,13 @@ Install_openresty()
|
||||
cd ${openrestyDir} && wget -O $openrestyDir/zstd-nginx-module.tar.gz https://github.com/tokers/zstd-nginx-module/archive/refs/heads/master.tar.gz
|
||||
cd ${openrestyDir} && tar -zxvf zstd-nginx-module.tar.gz
|
||||
|
||||
if [ "$sysName" == "Darwin" ];then
|
||||
if [ "$sysName" = "Darwin" ];then
|
||||
export ZSTD_INC=/opt/homebrew/include
|
||||
export ZSTD_LIB=/opt/homebrew/lib
|
||||
fi
|
||||
|
||||
pkg-config --exists --print-errors libzstd
|
||||
if [ "$?" == "0" ];then
|
||||
if [ "$?" = "0" ];then
|
||||
OPTIONS="${OPTIONS} --add-module=${openrestyDir}/zstd-nginx-module-master"
|
||||
fi
|
||||
fi
|
||||
@@ -186,7 +186,7 @@ Install_openresty()
|
||||
# 用于调式
|
||||
|
||||
CMD_MAKE=`which gmake`
|
||||
if [ "$?" == "0" ];then
|
||||
if [ "$?" = "0" ];then
|
||||
gmake -j${cpuCore} && gmake install && gmake clean
|
||||
else
|
||||
make -j${cpuCore} && make install && make clean
|
||||
@@ -217,9 +217,9 @@ Uninstall_openresty()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == "install" ];then
|
||||
if [ "${1}" = "install" ];then
|
||||
Install_openresty
|
||||
elif [ "${1}" == "upgrade" ];then
|
||||
elif [ "${1}" = "upgrade" ];then
|
||||
Install_openresty
|
||||
else
|
||||
Uninstall_openresty
|
||||
|
||||
@@ -20,7 +20,7 @@ openrestyDir=${serverPath}/source/openresty
|
||||
|
||||
Install_openresty()
|
||||
{
|
||||
if [ "${action}" == "install" ];then
|
||||
if [ "${action}" = "install" ];then
|
||||
if [ -d $serverPath/openresty ];then
|
||||
exit 0
|
||||
fi
|
||||
@@ -60,7 +60,7 @@ Install_openresty()
|
||||
fi
|
||||
|
||||
DOWNLOAD_SIZE=`wc -c ${openrestyDir}/openresty-${VERSION}.tar.gz | awk '{print $1}'`
|
||||
if [ "$DOWNLOAD_SIZE" == "0" ];then
|
||||
if [ "$DOWNLOAD_SIZE" = "0" ];then
|
||||
echo 'download failed, download again'
|
||||
rm -rf ${openrestyDir}/openresty-${VERSION}.tar.gz
|
||||
fi
|
||||
@@ -77,7 +77,7 @@ Install_openresty()
|
||||
opensslVersion="3.4.4"
|
||||
libresslVersion="3.9.1"
|
||||
pcreVersion='8.45'
|
||||
if [ "$sysName" == "Darwin" ];then
|
||||
if [ "$sysName" = "Darwin" ];then
|
||||
|
||||
if [ ! -f ${openrestyDir}/pcre-${pcreVersion}.tar.gz ];then
|
||||
wget --no-check-certificate -O ${openrestyDir}/pcre-${pcreVersion}.tar.gz https://netix.dl.sourceforge.net/project/pcre/pcre/${pcreVersion}/pcre-${pcreVersion}.tar.gz
|
||||
@@ -152,13 +152,13 @@ Install_openresty()
|
||||
cd ${openrestyDir} && wget -O $openrestyDir/zstd-nginx-module.tar.gz https://github.com/tokers/zstd-nginx-module/archive/refs/heads/master.tar.gz
|
||||
cd ${openrestyDir} && tar -zxvf zstd-nginx-module.tar.gz
|
||||
|
||||
if [ "$sysName" == "Darwin" ];then
|
||||
if [ "$sysName" = "Darwin" ];then
|
||||
export ZSTD_INC=/opt/homebrew/include
|
||||
export ZSTD_LIB=/opt/homebrew/lib
|
||||
fi
|
||||
|
||||
pkg-config --exists --print-errors libzstd
|
||||
if [ "$?" == "0" ];then
|
||||
if [ "$?" = "0" ];then
|
||||
OPTIONS="${OPTIONS} --add-module=${openrestyDir}/zstd-nginx-module-master"
|
||||
fi
|
||||
fi
|
||||
@@ -179,7 +179,7 @@ Install_openresty()
|
||||
# 用于调式
|
||||
|
||||
CMD_MAKE=`which gmake`
|
||||
if [ "$?" == "0" ];then
|
||||
if [ "$?" = "0" ];then
|
||||
gmake -j${cpuCore} && gmake install && gmake clean
|
||||
else
|
||||
make -j${cpuCore} && make install && make clean
|
||||
@@ -210,9 +210,9 @@ Uninstall_openresty()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == "install" ];then
|
||||
if [ "${1}" = "install" ];then
|
||||
Install_openresty
|
||||
elif [ "${1}" == "upgrade" ];then
|
||||
elif [ "${1}" = "upgrade" ];then
|
||||
Install_openresty
|
||||
else
|
||||
Uninstall_openresty
|
||||
|
||||
@@ -20,7 +20,7 @@ openrestyDir=${serverPath}/source/openresty
|
||||
|
||||
Install_openresty()
|
||||
{
|
||||
if [ "${action}" == "install" ];then
|
||||
if [ "${action}" = "install" ];then
|
||||
if [ -d $serverPath/openresty ];then
|
||||
exit 0
|
||||
fi
|
||||
@@ -60,7 +60,7 @@ Install_openresty()
|
||||
fi
|
||||
|
||||
DOWNLOAD_SIZE=`wc -c ${openrestyDir}/openresty-${VERSION}.tar.gz | awk '{print $1}'`
|
||||
if [ "$DOWNLOAD_SIZE" == "0" ];then
|
||||
if [ "$DOWNLOAD_SIZE" = "0" ];then
|
||||
echo 'download failed, download again'
|
||||
rm -rf ${openrestyDir}/openresty-${VERSION}.tar.gz
|
||||
fi
|
||||
@@ -77,7 +77,7 @@ Install_openresty()
|
||||
opensslVersion="3.5.5"
|
||||
libresslVersion="3.9.1"
|
||||
pcreVersion='8.45'
|
||||
if [ "$sysName" == "Darwin" ];then
|
||||
if [ "$sysName" = "Darwin" ];then
|
||||
|
||||
if [ ! -f ${openrestyDir}/pcre-${pcreVersion}.tar.gz ];then
|
||||
wget --no-check-certificate -O ${openrestyDir}/pcre-${pcreVersion}.tar.gz https://netix.dl.sourceforge.net/project/pcre/pcre/${pcreVersion}/pcre-${pcreVersion}.tar.gz
|
||||
@@ -152,13 +152,13 @@ Install_openresty()
|
||||
cd ${openrestyDir} && wget -O $openrestyDir/zstd-nginx-module.tar.gz https://github.com/tokers/zstd-nginx-module/archive/refs/heads/master.tar.gz
|
||||
cd ${openrestyDir} && tar -zxvf zstd-nginx-module.tar.gz
|
||||
|
||||
if [ "$sysName" == "Darwin" ];then
|
||||
if [ "$sysName" = "Darwin" ];then
|
||||
export ZSTD_INC=/opt/homebrew/include
|
||||
export ZSTD_LIB=/opt/homebrew/lib
|
||||
fi
|
||||
|
||||
pkg-config --exists --print-errors libzstd
|
||||
if [ "$?" == "0" ];then
|
||||
if [ "$?" = "0" ];then
|
||||
OPTIONS="${OPTIONS} --add-module=${openrestyDir}/zstd-nginx-module-master"
|
||||
fi
|
||||
fi
|
||||
@@ -180,7 +180,7 @@ Install_openresty()
|
||||
# 用于调式
|
||||
|
||||
CMD_MAKE=`which gmake`
|
||||
if [ "$?" == "0" ];then
|
||||
if [ "$?" = "0" ];then
|
||||
gmake -j${cpuCore} && gmake install && gmake clean
|
||||
else
|
||||
make -j${cpuCore} && make install && make clean
|
||||
@@ -219,9 +219,9 @@ Uninstall_openresty()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == "install" ];then
|
||||
if [ "${1}" = "install" ];then
|
||||
Install_openresty
|
||||
elif [ "${1}" == "upgrade" ];then
|
||||
elif [ "${1}" = "upgrade" ];then
|
||||
Install_openresty
|
||||
else
|
||||
Uninstall_openresty
|
||||
|
||||
@@ -60,7 +60,7 @@ Install_openresty()
|
||||
fi
|
||||
|
||||
DOWNLOAD_SIZE=`wc -c ${openrestyDir}/openresty-${VERSION}.tar.gz | awk '{print $1}'`
|
||||
if [ "$DOWNLOAD_SIZE" == "0" ];then
|
||||
if [ "$DOWNLOAD_SIZE" = "0" ];then
|
||||
echo 'download failed, download again'
|
||||
rm -rf ${openrestyDir}/openresty-${VERSION}.tar.gz
|
||||
fi
|
||||
@@ -74,7 +74,7 @@ Install_openresty()
|
||||
|
||||
OPTIONS=''
|
||||
|
||||
opensslVersion="3.5.5"
|
||||
opensslVersion="4.0.2"
|
||||
libresslVersion="3.9.1"
|
||||
pcreVersion='8.45'
|
||||
if [ "$sysName" = "Darwin" ];then
|
||||
@@ -152,13 +152,13 @@ Install_openresty()
|
||||
cd ${openrestyDir} && wget -O $openrestyDir/zstd-nginx-module.tar.gz https://github.com/tokers/zstd-nginx-module/archive/refs/heads/master.tar.gz
|
||||
cd ${openrestyDir} && tar -zxvf zstd-nginx-module.tar.gz
|
||||
|
||||
if [ "$sysName" == "Darwin" ];then
|
||||
if [ "$sysName" = "Darwin" ];then
|
||||
export ZSTD_INC=/opt/homebrew/include
|
||||
export ZSTD_LIB=/opt/homebrew/lib
|
||||
fi
|
||||
|
||||
pkg-config --exists --print-errors libzstd
|
||||
if [ "$?" == "0" ];then
|
||||
if [ "$?" = "0" ];then
|
||||
OPTIONS="${OPTIONS} --add-module=${openrestyDir}/zstd-nginx-module-master"
|
||||
fi
|
||||
fi
|
||||
@@ -180,7 +180,7 @@ Install_openresty()
|
||||
# 用于调式
|
||||
|
||||
CMD_MAKE=`which gmake`
|
||||
if [ "$?" == "0" ];then
|
||||
if [ "$?" = "0" ];then
|
||||
gmake -j${cpuCore} && gmake install && gmake clean
|
||||
else
|
||||
make -j${cpuCore} && make install && make clean
|
||||
|
||||
@@ -58,7 +58,7 @@ Install_openresty()
|
||||
fi
|
||||
|
||||
DOWNLOAD_SIZE=`wc -c ${openrestyDir}/openresty-${VERSION}.tar.gz | awk '{print $1}'`
|
||||
if [ "$DOWNLOAD_SIZE" == "0" ];then
|
||||
if [ "$DOWNLOAD_SIZE" = "0" ];then
|
||||
echo 'download failed, download again'
|
||||
rm -rf ${openrestyDir}/openresty-${VERSION}.tar.gz
|
||||
fi
|
||||
@@ -75,7 +75,7 @@ Install_openresty()
|
||||
opensslVersion="3.4.4"
|
||||
libresslVersion="3.9.1"
|
||||
pcreVersion='8.45'
|
||||
if [ "$sysName" == "Darwin" ];then
|
||||
if [ "$sysName" = "Darwin" ];then
|
||||
|
||||
if [ ! -f ${openrestyDir}/pcre-${pcreVersion}.tar.gz ];then
|
||||
wget --no-check-certificate -O ${openrestyDir}/pcre-${pcreVersion}.tar.gz https://netix.dl.sourceforge.net/project/pcre/pcre/${pcreVersion}/pcre-${pcreVersion}.tar.gz
|
||||
@@ -169,7 +169,7 @@ Install_openresty()
|
||||
# 用于调式
|
||||
|
||||
CMD_MAKE=`which gmake`
|
||||
if [ "$?" == "0" ];then
|
||||
if [ "$?" = "0" ];then
|
||||
gmake -j${cpuCore} && gmake install && gmake clean
|
||||
else
|
||||
make -j${cpuCore} && make install && make clean
|
||||
@@ -205,7 +205,7 @@ Uninstall_openresty()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_openresty
|
||||
else
|
||||
Uninstall_openresty
|
||||
|
||||
@@ -24,7 +24,7 @@ fi
|
||||
action=$1
|
||||
type=$2
|
||||
|
||||
if [ "${2}" == "" ];then
|
||||
if [ "${2}" = "" ];then
|
||||
echo '缺少安装脚本...'
|
||||
exit 0
|
||||
fi
|
||||
@@ -35,7 +35,7 @@ if [ ! -d $curPath/versions/$2 ];then
|
||||
fi
|
||||
|
||||
|
||||
# if [ "${action}" == "install" ] && [ -d $serverPath/php/${type} ];then
|
||||
# if [ "${action}" = "install" ] && [ -d $serverPath/php/${type} ];then
|
||||
# exit 0
|
||||
# fi
|
||||
|
||||
@@ -53,7 +53,7 @@ fi
|
||||
cd ${curPath} && sh -x $curPath/versions/$2/install.sh $1
|
||||
|
||||
|
||||
if [ "${action}" == "install" ] && [ -d ${serverPath}/php/${type} ];then
|
||||
if [ "${action}" = "install" ] && [ -d ${serverPath}/php/${type} ];then
|
||||
|
||||
#初始化
|
||||
cd ${rootPath} && python3 ${rootPath}/plugins/php/index.py start ${type}
|
||||
|
||||
@@ -16,7 +16,7 @@ SOURCE_ROOT=$rootPath/source/lib
|
||||
HTTP_PREFIX="https://"
|
||||
LOCAL_ADDR=common
|
||||
cn=$(curl -fsSL -m 10 http://ipinfo.io/json | grep "\"country\": \"CN\"")
|
||||
if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then
|
||||
if [ ! -z "$cn" ] || [ "$?" = "0" ] ;then
|
||||
LOCAL_ADDR=cn
|
||||
HTTP_PREFIX="https://mirror.ghproxy.com/"
|
||||
fi
|
||||
@@ -25,7 +25,7 @@ if [ ! -d ${SERVER_ROOT}/icu ];then
|
||||
|
||||
cd ${SOURCE_ROOT}
|
||||
|
||||
if [ "$LOCAL_ADDR" == 'cn' ];then
|
||||
if [ "$LOCAL_ADDR" = 'cn' ];then
|
||||
if [ ! -f ${SOURCE_ROOT}/icu4c-52_2-src.tgz ];then
|
||||
wget --no-check-certificate -O ${SOURCE_ROOT}/icu4c-52_2-src.tgz https://dl.midoks.icu/lib/icu4c-52_2-src.tgz -T 20
|
||||
fi
|
||||
|
||||
@@ -18,7 +18,7 @@ SOURCE_ROOT=$rootPath/source/lib
|
||||
|
||||
# LOCAL_ADDR=common
|
||||
# cn=$(curl -fsSL -m 10 http://ipinfo.io/json | grep "\"country\": \"CN\"")
|
||||
# if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then
|
||||
# if [ ! -z "$cn" ] || [ "$?" = "0" ] ;then
|
||||
# LOCAL_ADDR=cn
|
||||
# fi
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ SOURCE_ROOT=$rootPath/source/lib
|
||||
HTTP_PREFIX="https://"
|
||||
LOCAL_ADDR=common
|
||||
cn=$(curl -fsSL -m 10 http://ipinfo.io/json | grep "\"country\": \"CN\"")
|
||||
if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then
|
||||
if [ ! -z "$cn" ] || [ "$?" = "0" ] ;then
|
||||
LOCAL_ADDR=cn
|
||||
HTTP_PREFIX="https://mirror.ghproxy.com/"
|
||||
fi
|
||||
@@ -26,7 +26,7 @@ fi
|
||||
if [ ! -d ${SERVER_ROOT}/libiconv ];then
|
||||
cd $SOURCE_ROOT
|
||||
|
||||
if [ "$LOCAL_ADDR" == 'cn' ];then
|
||||
if [ "$LOCAL_ADDR" = 'cn' ];then
|
||||
if [ ! -f ${SOURCE_ROOT}/libiconv-1.15.tar.gz ];then
|
||||
wget --no-check-certificate -O ${SOURCE_ROOT}/libiconv-1.15.tar.gz https://dl.midoks.icu/lib/libiconv-1.15.tar.gz -T 20
|
||||
fi
|
||||
|
||||
@@ -22,7 +22,7 @@ for S_DIR in ${SYS_DIR[@]}; do
|
||||
fi
|
||||
done
|
||||
|
||||
if [ $ISFIND == "0" ];then
|
||||
if [ $ISFIND = "0" ];then
|
||||
cd $SOURCE_ROOT
|
||||
if [ ! -f ${SOURCE_ROOT}/libmcrypt-2.5.8.tar.gz ];then
|
||||
wget --no-check-certificate -O libmcrypt-2.5.8.tar.gz https://sourceforge.net/projects/mcrypt/files/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz -T 20
|
||||
|
||||
@@ -18,7 +18,7 @@ mkdir -p $SOURCE_ROOT
|
||||
HTTP_PREFIX="https://"
|
||||
LOCAL_ADDR=common
|
||||
cn=$(curl -fsSL -m 10 http://ipinfo.io/json | grep "\"country\": \"CN\"")
|
||||
if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then
|
||||
if [ ! -z "$cn" ] || [ "$?" = "0" ] ;then
|
||||
LOCAL_ADDR=cn
|
||||
HTTP_PREFIX="https://mirror.ghproxy.com/"
|
||||
fi
|
||||
@@ -28,7 +28,7 @@ if [ ! -d ${SERVER_ROOT}/libzip ];then
|
||||
|
||||
cd $SOURCE_ROOT
|
||||
|
||||
if [ "$LOCAL_ADDR" == 'cn' ];then
|
||||
if [ "$LOCAL_ADDR" = 'cn' ];then
|
||||
if [ ! -f ${SOURCE_ROOT}/libzip-1.3.2.tar.gz ];then
|
||||
wget --no-check-certificate -O libzip-1.3.2.tar.gz https://dl.midoks.icu/lib/libzip-1.3.2.tar.gz -T 20
|
||||
fi
|
||||
@@ -51,7 +51,7 @@ if [ ! -d ${SERVER_ROOT}/libzip ];then
|
||||
./configure --prefix=${SERVER_ROOT}/libzip && make && make install
|
||||
#cd $SOURCE_ROOT
|
||||
|
||||
if [ "$?" == "0" ];then
|
||||
if [ "$?" = "0" ];then
|
||||
rm -rf ${SOURCE_ROOT}/libzip-1.3.2
|
||||
rm -rf ${SOURCE_ROOT}/libzip-1.3.2.tar.gz
|
||||
fi
|
||||
|
||||
@@ -15,7 +15,7 @@ SOURCE_ROOT=$rootPath/source/lib
|
||||
|
||||
HTTP_PREFIX="https://"
|
||||
cn=$(curl -fsSL -m 10 http://ipinfo.io/json | grep "\"country\": \"CN\"")
|
||||
if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then
|
||||
if [ ! -z "$cn" ] || [ "$?" = "0" ] ;then
|
||||
HTTP_PREFIX="https://mirror.ghproxy.com/"
|
||||
fi
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ SOURCE_ROOT=$rootPath/source/lib
|
||||
HTTP_PREFIX="https://"
|
||||
LOCAL_ADDR=common
|
||||
cn=$(curl -fsSL -m 10 http://ipinfo.io/json | grep "\"country\": \"CN\"")
|
||||
if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then
|
||||
if [ ! -z "$cn" ] || [ "$?" = "0" ] ;then
|
||||
LOCAL_ADDR=cn
|
||||
HTTP_PREFIX="https://mirror.ghproxy.com/"
|
||||
fi
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
#!/bin/bash
|
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
|
||||
export PATH
|
||||
|
||||
curPath=`pwd`
|
||||
rootPath=$(dirname "$curPath")
|
||||
rootPath=$(dirname "$rootPath")
|
||||
rootPath=$(dirname "$rootPath")
|
||||
rootPath=$(dirname "$rootPath")
|
||||
|
||||
opensslVersion="4.0.2"
|
||||
# echo $rootPath
|
||||
|
||||
SERVER_ROOT=$rootPath/lib
|
||||
SOURCE_ROOT=$rootPath/source/lib
|
||||
mkdir -p $SOURCE_ROOT
|
||||
|
||||
if [ ! -d ${SERVER_ROOT}/openssl35 ];then
|
||||
cd ${SOURCE_ROOT}
|
||||
if [ ! -f ${SOURCE_ROOT}/openssl-${opensslVersion}.tar.gz ];then
|
||||
wget --no-check-certificate -O ${SOURCE_ROOT}/openssl-${opensslVersion}.tar.gz https://www.openssl.org/source/openssl-${opensslVersion}.tar.gz
|
||||
fi
|
||||
tar -zxvf openssl-${opensslVersion}.tar.gz
|
||||
cd openssl-${opensslVersion}
|
||||
./config --prefix=${SERVER_ROOT}/openssl35 zlib-dynamic shared
|
||||
make && make install
|
||||
|
||||
|
||||
# export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/www/server/lib/openssl35/lib
|
||||
# if [ -d /etc/ld.so.conf.d ];then
|
||||
# echo "/www/server/lib/openssl35/lib64" > /etc/ld.so.conf.d/openssl35.conf
|
||||
# elif [ -f /etc/ld.so.conf ]; then
|
||||
# echo "/www/server/lib/openssl35/lib64" >> /etc/ld.so.conf
|
||||
# fi
|
||||
|
||||
# ldconfig
|
||||
# ldconfig -p | grep openssl
|
||||
|
||||
cd $SOURCE_ROOT && rm -rf $SOURCE_ROOT/openssl-${opensslVersion}
|
||||
fi
|
||||
|
||||
@@ -18,7 +18,7 @@ mkdir -p $SOURCE_ROOT
|
||||
HTTP_PREFIX="https://"
|
||||
LOCAL_ADDR=common
|
||||
cn=$(curl -fsSL -m 10 http://ipinfo.io/json | grep "\"country\": \"CN\"")
|
||||
if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then
|
||||
if [ ! -z "$cn" ] || [ "$?" = "0" ] ;then
|
||||
LOCAL_ADDR=cn
|
||||
HTTP_PREFIX="https://mirror.ghproxy.com/"
|
||||
fi
|
||||
@@ -28,7 +28,7 @@ if [ ! -d ${SERVER_ROOT}/zlib ];then
|
||||
|
||||
cd $SOURCE_ROOT
|
||||
|
||||
if [ "$LOCAL_ADDR" == 'cn' ];then
|
||||
if [ "$LOCAL_ADDR" = 'cn' ];then
|
||||
if [ ! -f ${SOURCE_ROOT}/${SOURCE_ROOT}/zlib-1.2.11.tar.gz ];then
|
||||
wget --no-check-certificate -O ${SOURCE_ROOT}/zlib-1.2.11.tar.gz https://dl.midoks.icu/lib/zlib-1.2.11.tar.gz -T 20
|
||||
fi
|
||||
|
||||
@@ -25,7 +25,7 @@ version=$2
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts`
|
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so
|
||||
|
||||
if [ "$sysName" == "Darwin" ];then
|
||||
if [ "$sysName" = "Darwin" ];then
|
||||
BAK='_bak'
|
||||
else
|
||||
BAK=''
|
||||
@@ -108,8 +108,8 @@ Uninstall_lib()
|
||||
}
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then
|
||||
if [ "$actionType" = 'install' ];then
|
||||
Install_lib
|
||||
elif [ "$actionType" == 'uninstall' ];then
|
||||
elif [ "$actionType" = 'uninstall' ];then
|
||||
Uninstall_lib
|
||||
fi
|
||||
@@ -21,7 +21,7 @@ NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-deb
|
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so
|
||||
|
||||
sysName=`uname`
|
||||
if [ "$sysName" == "Darwin" ];then
|
||||
if [ "$sysName" = "Darwin" ];then
|
||||
BAK='_bak'
|
||||
else
|
||||
BAK=''
|
||||
|
||||
@@ -27,11 +27,11 @@ if [ ! -d $sourcePath/php/php${PHP_VER} ];then
|
||||
# 中国优化安装
|
||||
cn=$(curl -fsSL -m 10 -s http://ipinfo.io/json | grep "\"country\": \"CN\"")
|
||||
LOCAL_ADDR=common
|
||||
if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then
|
||||
if [ ! -z "$cn" ] || [ "$?" = "0" ] ;then
|
||||
LOCAL_ADDR=cn
|
||||
fi
|
||||
|
||||
if [ "$LOCAL_ADDR" == "cn" ];then
|
||||
if [ "$LOCAL_ADDR" = "cn" ];then
|
||||
if [ ! -f $sourcePath/php/php-${version}.tar.xz ];then
|
||||
wget --no-check-certificate -O $sourcePath/php/php-${version}.tar.xz https://mirrors.nju.edu.cn/php/php-${version}.tar.xz
|
||||
fi
|
||||
|
||||
@@ -21,7 +21,7 @@ version=$2
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts`
|
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so
|
||||
|
||||
if [ "$sysName" == "Darwin" ];then
|
||||
if [ "$sysName" = "Darwin" ];then
|
||||
BAK='_bak'
|
||||
else
|
||||
BAK=''
|
||||
@@ -93,8 +93,8 @@ Uninstall_lib()
|
||||
}
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then
|
||||
if [ "$actionType" = 'install' ];then
|
||||
Install_lib
|
||||
elif [ "$actionType" == 'uninstall' ];then
|
||||
elif [ "$actionType" = 'uninstall' ];then
|
||||
Uninstall_lib
|
||||
fi
|
||||
@@ -21,7 +21,7 @@ version=$2
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts`
|
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so
|
||||
|
||||
if [ "$sysName" == "Darwin" ];then
|
||||
if [ "$sysName" = "Darwin" ];then
|
||||
BAK='_bak'
|
||||
else
|
||||
BAK=''
|
||||
@@ -87,8 +87,8 @@ Uninstall_lib()
|
||||
}
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then
|
||||
if [ "$actionType" = 'install' ];then
|
||||
Install_lib
|
||||
elif [ "$actionType" == 'uninstall' ];then
|
||||
elif [ "$actionType" = 'uninstall' ];then
|
||||
Uninstall_lib
|
||||
fi
|
||||
@@ -21,7 +21,7 @@ NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-deb
|
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/ZendOptimizer.so
|
||||
|
||||
|
||||
if [ "$sysName" == "Darwin" ];then
|
||||
if [ "$sysName" = "Darwin" ];then
|
||||
BAK='_bak'
|
||||
else
|
||||
BAK=''
|
||||
@@ -42,7 +42,7 @@ Install_lib()
|
||||
php_lib=$sourcePath/php_lib
|
||||
mkdir -p $php_lib
|
||||
|
||||
if [ $sysName == 'Darwin' ]; then
|
||||
if [ $sysName = 'Darwin' ]; then
|
||||
wget -O $php_lib/zend-loader-php5.3.tar.gz http://downloads.zend.com/guard/5.5.0/ZendGuardLoader-php-5.3-darwin-i386.tar.gz
|
||||
else
|
||||
wget -O $php_lib/ZendOptimizer-3.3.3-linux-glibc23-x86_64.tar.gz http://downloads.zend.com/optimizer/3.3.3/ZendOptimizer-3.3.3-linux-glibc23-x86_64.tar.gz
|
||||
@@ -97,8 +97,8 @@ Uninstall_lib()
|
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then
|
||||
if [ "$actionType" = 'install' ];then
|
||||
Install_lib
|
||||
elif [ "$actionType" == 'uninstall' ];then
|
||||
elif [ "$actionType" = 'uninstall' ];then
|
||||
Uninstall_lib
|
||||
fi
|
||||
@@ -20,7 +20,7 @@ version=$2
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts`
|
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so
|
||||
|
||||
if [ "$sysName" == "Darwin" ];then
|
||||
if [ "$sysName" = "Darwin" ];then
|
||||
BAK='_bak'
|
||||
else
|
||||
BAK=''
|
||||
@@ -47,7 +47,7 @@ Install_lib()
|
||||
cd $php_lib/${_LIBNAME}-${LIBV}
|
||||
|
||||
OPTIONS=''
|
||||
if [ "${SYS_ARCH}" == "aarch64" ] && [ "$version" -lt "56" ];then
|
||||
if [ "${SYS_ARCH}" = "aarch64" ] && [ "$version" -lt "56" ];then
|
||||
OPTIONS="$OPTIONS --build=aarch64-unknown-linux-gnu --host=aarch64-unknown-linux-gnu"
|
||||
fi
|
||||
|
||||
@@ -98,8 +98,8 @@ Uninstall_lib()
|
||||
}
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then
|
||||
if [ "$actionType" = 'install' ];then
|
||||
Install_lib
|
||||
elif [ "$actionType" == 'uninstall' ];then
|
||||
elif [ "$actionType" = 'uninstall' ];then
|
||||
Uninstall_lib
|
||||
fi
|
||||
@@ -52,7 +52,7 @@ Install_lib()
|
||||
cd $php_lib/${LIBNAME}-${LIBV}
|
||||
|
||||
OPTIONS=""
|
||||
if [ "${SYS_ARCH}" == "aarch64" ] && [ "$version" -lt "56" ];then
|
||||
if [ "${SYS_ARCH}" = "aarch64" ] && [ "$version" -lt "56" ];then
|
||||
OPTIONS="$OPTIONS --build=aarch64-unknown-linux-gnu --host=aarch64-unknown-linux-gnu"
|
||||
fi
|
||||
|
||||
|
||||
@@ -28,11 +28,11 @@ if [ ! -d $sourcePath/php/php${PHP_VER} ];then
|
||||
# 中国优化安装
|
||||
cn=$(curl -fsSL -m 10 -s http://ipinfo.io/json | grep "\"country\": \"CN\"")
|
||||
LOCAL_ADDR=common
|
||||
if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then
|
||||
if [ ! -z "$cn" ] || [ "$?" = "0" ] ;then
|
||||
LOCAL_ADDR=cn
|
||||
fi
|
||||
|
||||
if [ "$LOCAL_ADDR" == "cn" ];then
|
||||
if [ "$LOCAL_ADDR" = "cn" ];then
|
||||
if [ ! -f $sourcePath/php/php-${version}.tar.xz ];then
|
||||
wget --no-check-certificate -O $sourcePath/php/php-${version}.tar.xz https://mirrors.nju.edu.cn/php/php-${version}.tar.xz
|
||||
fi
|
||||
@@ -66,12 +66,12 @@ fi
|
||||
# OPTIONS="${OPTIONS} --with-jpeg --with-jpeg-dir=/usr/lib"
|
||||
OPTIONS='--without-iconv'
|
||||
|
||||
if [ $sysName == 'Darwin' ]; then
|
||||
if [ $sysName = 'Darwin' ]; then
|
||||
OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype"
|
||||
fi
|
||||
|
||||
IS_64BIT=`getconf LONG_BIT`
|
||||
if [ "$IS_64BIT" == "64" ];then
|
||||
if [ "$IS_64BIT" = "64" ];then
|
||||
OPTIONS="${OPTIONS} --with-libdir=lib64"
|
||||
fi
|
||||
|
||||
@@ -100,7 +100,7 @@ else
|
||||
fi
|
||||
# ----- cpu end ------
|
||||
|
||||
if [ "${SYS_ARCH}" == "aarch64" ];then
|
||||
if [ "${SYS_ARCH}" = "aarch64" ];then
|
||||
OPTIONS="$OPTIONS --build=aarch64-unknown-linux-gnu --host=aarch64-unknown-linux-gnu"
|
||||
fi
|
||||
|
||||
@@ -165,7 +165,7 @@ Uninstall_php()
|
||||
}
|
||||
|
||||
action=${1}
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_php
|
||||
else
|
||||
Uninstall_php
|
||||
|
||||
@@ -20,7 +20,7 @@ version=$2
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts`
|
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so
|
||||
|
||||
if [ "$sysName" == "Darwin" ];then
|
||||
if [ "$sysName" = "Darwin" ];then
|
||||
BAK='_bak'
|
||||
else
|
||||
BAK=''
|
||||
@@ -48,7 +48,7 @@ Install_lib()
|
||||
cd $php_lib/${LIBNAME}-${LIBV}
|
||||
|
||||
OPTIONS=''
|
||||
if [ "${SYS_ARCH}" == "aarch64" ];then
|
||||
if [ "${SYS_ARCH}" = "aarch64" ];then
|
||||
OPTIONS="$OPTIONS --build=aarch64-unknown-linux-gnu --host=aarch64-unknown-linux-gnu"
|
||||
fi
|
||||
|
||||
@@ -101,8 +101,8 @@ Uninstall_lib()
|
||||
}
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then
|
||||
if [ "$actionType" = 'install' ];then
|
||||
Install_lib
|
||||
elif [ "$actionType" == 'uninstall' ];then
|
||||
elif [ "$actionType" = 'uninstall' ];then
|
||||
Uninstall_lib
|
||||
fi
|
||||
@@ -20,7 +20,7 @@ version=$2
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts`
|
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so
|
||||
|
||||
if [ "$sysName" == "Darwin" ];then
|
||||
if [ "$sysName" = "Darwin" ];then
|
||||
BAK='_bak'
|
||||
else
|
||||
BAK=''
|
||||
@@ -46,7 +46,7 @@ Install_lib()
|
||||
cd $php_lib/zendopcache-7.0.5
|
||||
|
||||
OPTIONS=''
|
||||
if [ "${SYS_ARCH}" == "aarch64" ] && [ "$version" -lt "56" ];then
|
||||
if [ "${SYS_ARCH}" = "aarch64" ] && [ "$version" -lt "56" ];then
|
||||
OPTIONS="$OPTIONS --build=aarch64-unknown-linux-gnu --host=aarch64-unknown-linux-gnu"
|
||||
fi
|
||||
|
||||
@@ -107,8 +107,8 @@ Uninstall_lib()
|
||||
}
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then
|
||||
if [ "$actionType" = 'install' ];then
|
||||
Install_lib
|
||||
elif [ "$actionType" == 'uninstall' ];then
|
||||
elif [ "$actionType" = 'uninstall' ];then
|
||||
Uninstall_lib
|
||||
fi
|
||||
@@ -20,7 +20,7 @@ version=$2
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts`
|
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so
|
||||
|
||||
if [ "$sysName" == "Darwin" ];then
|
||||
if [ "$sysName" = "Darwin" ];then
|
||||
BAK='_bak'
|
||||
else
|
||||
BAK=''
|
||||
@@ -41,7 +41,7 @@ Install_lib()
|
||||
php_lib=$sourcePath/php_lib
|
||||
mkdir -p $php_lib
|
||||
|
||||
if [ $sysName == 'Darwin' ]; then
|
||||
if [ $sysName = 'Darwin' ]; then
|
||||
wget -O $php_lib/zend-loader-php5.3.tar.gz http://downloads.zend.com/guard/5.5.0/ZendGuardLoader-php-5.3-darwin-i386.tar.gz
|
||||
else
|
||||
wget -O $php_lib/zend-loader-php5.3.tar.gz http://downloads.zend.com/guard/5.5.0/ZendGuardLoader-php-5.3-linux-glibc23-x86_64.tar.gz
|
||||
@@ -96,8 +96,8 @@ Uninstall_lib()
|
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then
|
||||
if [ "$actionType" = 'install' ];then
|
||||
Install_lib
|
||||
elif [ "$actionType" == 'uninstall' ];then
|
||||
elif [ "$actionType" = 'uninstall' ];then
|
||||
Uninstall_lib
|
||||
fi
|
||||
@@ -21,7 +21,7 @@ version=$2
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts`
|
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so
|
||||
|
||||
if [ "$sysName" == "Darwin" ];then
|
||||
if [ "$sysName" = "Darwin" ];then
|
||||
BAK='_bak'
|
||||
else
|
||||
BAK=''
|
||||
@@ -46,7 +46,7 @@ Install_lib()
|
||||
cd $php_lib/${_LIBNAME}-${LIBV}
|
||||
|
||||
OPTIONS=''
|
||||
if [ "${SYS_ARCH}" == "aarch64" ] && [ "$version" -lt "56" ];then
|
||||
if [ "${SYS_ARCH}" = "aarch64" ] && [ "$version" -lt "56" ];then
|
||||
OPTIONS="$OPTIONS --build=aarch64-unknown-linux-gnu --host=aarch64-unknown-linux-gnu"
|
||||
fi
|
||||
|
||||
@@ -96,8 +96,8 @@ Uninstall_lib()
|
||||
}
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then
|
||||
if [ "$actionType" = 'install' ];then
|
||||
Install_lib
|
||||
elif [ "$actionType" == 'uninstall' ];then
|
||||
elif [ "$actionType" = 'uninstall' ];then
|
||||
Uninstall_lib
|
||||
fi
|
||||
@@ -29,11 +29,11 @@ if [ ! -d $sourcePath/php/php${PHP_VER} ];then
|
||||
# 中国优化安装
|
||||
cn=$(curl -fsSL -m 10 -s http://ipinfo.io/json | grep "\"country\": \"CN\"")
|
||||
LOCAL_ADDR=common
|
||||
if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then
|
||||
if [ ! -z "$cn" ] || [ "$?" = "0" ] ;then
|
||||
LOCAL_ADDR=cn
|
||||
fi
|
||||
|
||||
if [ "$LOCAL_ADDR" == "cn" ];then
|
||||
if [ "$LOCAL_ADDR" = "cn" ];then
|
||||
if [ ! -f $sourcePath/php/php-${version}.tar.xz ];then
|
||||
wget --no-check-certificate -O $sourcePath/php/php-${version}.tar.xz https://mirrors.nju.edu.cn/php/php-${version}.tar.xz
|
||||
fi
|
||||
@@ -58,7 +58,7 @@ if [ ! -d $sourcePath/php/php${PHP_VER} ];then
|
||||
fi
|
||||
|
||||
OPTIONS='--without-iconv'
|
||||
if [ $sysName == 'Darwin' ]; then
|
||||
if [ $sysName = 'Darwin' ]; then
|
||||
OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype"
|
||||
# OPTIONS="${OPTIONS} --with-pcre-dir=${serverPath}/lib/pcre"
|
||||
# OPTIONS="${OPTIONS} --with-external-pcre=${serverPath}/lib/pcre"
|
||||
@@ -67,7 +67,7 @@ else
|
||||
fi
|
||||
|
||||
IS_64BIT=`getconf LONG_BIT`
|
||||
if [ "$IS_64BIT" == "64" ];then
|
||||
if [ "$IS_64BIT" = "64" ];then
|
||||
OPTIONS="${OPTIONS} --with-libdir=lib64"
|
||||
fi
|
||||
|
||||
@@ -96,11 +96,11 @@ else
|
||||
fi
|
||||
# ----- cpu end ------
|
||||
|
||||
if [ "${SYS_ARCH}" == "aarch64" ];then
|
||||
if [ "${SYS_ARCH}" = "aarch64" ];then
|
||||
OPTIONS="$OPTIONS --build=aarch64-unknown-linux-gnu --host=aarch64-unknown-linux-gnu"
|
||||
fi
|
||||
|
||||
if [ "${SYS_ARCH}" == "arm64" ] && [ "$sysName" == "Darwin" ] ;then
|
||||
if [ "${SYS_ARCH}" = "arm64" ] && [ "$sysName" = "Darwin" ] ;then
|
||||
# 修复mac arm64架构下php安装
|
||||
# 修复不能识别到sys_icache_invalidate
|
||||
cat ${curPath}/versions/${PHP_VER}/src/ext/pcre/sljitConfigInternal.h > $sourcePath/php/php${PHP_VER}/ext/pcre/pcrelib/sljit/sljitConfigInternal.h
|
||||
@@ -173,7 +173,7 @@ Uninstall_php()
|
||||
}
|
||||
|
||||
action=${1}
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_php
|
||||
else
|
||||
Uninstall_php
|
||||
|
||||
@@ -20,7 +20,7 @@ version=$2
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts`
|
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so
|
||||
|
||||
if [ "$sysName" == "Darwin" ];then
|
||||
if [ "$sysName" = "Darwin" ];then
|
||||
BAK='_bak'
|
||||
else
|
||||
BAK=''
|
||||
@@ -46,7 +46,7 @@ Install_lib()
|
||||
cd $php_lib/zendopcache-7.0.5
|
||||
|
||||
OPTIONS=''
|
||||
if [ "${SYS_ARCH}" == "aarch64" ] && [ "$version" -lt "56" ];then
|
||||
if [ "${SYS_ARCH}" = "aarch64" ] && [ "$version" -lt "56" ];then
|
||||
OPTIONS="$OPTIONS --build=aarch64-unknown-linux-gnu --host=aarch64-unknown-linux-gnu"
|
||||
fi
|
||||
|
||||
@@ -108,8 +108,8 @@ Uninstall_lib()
|
||||
}
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then
|
||||
if [ "$actionType" = 'install' ];then
|
||||
Install_lib
|
||||
elif [ "$actionType" == 'uninstall' ];then
|
||||
elif [ "$actionType" = 'uninstall' ];then
|
||||
Uninstall_lib
|
||||
fi
|
||||
@@ -14,7 +14,7 @@ sourcePath=${serverPath}/source/php
|
||||
LIBNAME=ZendGuardLoader
|
||||
|
||||
sysName=`uname`
|
||||
if [ "$sysName" == "Darwin" ];then
|
||||
if [ "$sysName" = "Darwin" ];then
|
||||
BAK='_bak'
|
||||
else
|
||||
BAK=''
|
||||
@@ -37,7 +37,7 @@ Install_lib()
|
||||
php_lib=$sourcePath/php_lib
|
||||
mkdir -p $php_lib
|
||||
|
||||
if [ $sysName == 'Darwin' ]; then
|
||||
if [ $sysName = 'Darwin' ]; then
|
||||
wget -O $php_lib/zend-loader-php5.6.tar.gz http://downloads.zend.com/guard/7.0.0/zend-loader-php5.6-darwin10.7-x86_64_update1.tar.gz
|
||||
else
|
||||
wget -O $php_lib/ZendGuardLoader-70429-PHP-5.4-linux-glibc23-x86_64.tar.gz http://downloads.zend.com/guard/6.0.0/ZendGuardLoader-70429-PHP-5.4-linux-glibc23-x86_64.tar.gz
|
||||
@@ -89,8 +89,8 @@ Uninstall_lib()
|
||||
|
||||
actionType=$1
|
||||
version=$2
|
||||
if [ "$actionType" == 'install' ];then
|
||||
if [ "$actionType" = 'install' ];then
|
||||
Install_lib
|
||||
elif [ "$actionType" == 'uninstall' ];then
|
||||
elif [ "$actionType" = 'uninstall' ];then
|
||||
Uninstall_lib
|
||||
fi
|
||||
@@ -29,11 +29,11 @@ if [ ! -d $sourcePath/php/php${PHP_VER} ];then
|
||||
# 中国优化安装
|
||||
cn=$(curl -fsSL -m 10 -s http://ipinfo.io/json | grep "\"country\": \"CN\"")
|
||||
LOCAL_ADDR=common
|
||||
if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then
|
||||
if [ ! -z "$cn" ] || [ "$?" = "0" ] ;then
|
||||
LOCAL_ADDR=cn
|
||||
fi
|
||||
|
||||
if [ "$LOCAL_ADDR" == "cn" ];then
|
||||
if [ "$LOCAL_ADDR" = "cn" ];then
|
||||
if [ ! -f $sourcePath/php/php-${version}.tar.xz ];then
|
||||
wget --no-check-certificate -O $sourcePath/php/php-${version}.tar.xz https://mirrors.nju.edu.cn/php/php-${version}.tar.xz
|
||||
fi
|
||||
@@ -58,14 +58,14 @@ if [ ! -d $sourcePath/php/php${PHP_VER} ];then
|
||||
fi
|
||||
|
||||
OPTIONS='--without-iconv'
|
||||
if [ $sysName == 'Darwin' ]; then
|
||||
if [ $sysName = 'Darwin' ]; then
|
||||
OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype"
|
||||
else
|
||||
OPTIONS="${OPTIONS} --with-readline"
|
||||
fi
|
||||
|
||||
IS_64BIT=`getconf LONG_BIT`
|
||||
if [ "$IS_64BIT" == "64" ];then
|
||||
if [ "$IS_64BIT" = "64" ];then
|
||||
OPTIONS="${OPTIONS} --with-libdir=lib64"
|
||||
fi
|
||||
|
||||
@@ -94,13 +94,13 @@ else
|
||||
fi
|
||||
# ----- cpu end ------
|
||||
|
||||
if [ "${SYS_ARCH}" == "aarch64" ];then
|
||||
if [ "${SYS_ARCH}" = "aarch64" ];then
|
||||
# 修复aarch64架构下安装
|
||||
# /www/server/mdserver-web/plugins/php/versions/56/src/zend_multiply.h > /www/server/source/php/php56/Zend/zend_multiply.h
|
||||
cat ${curPath}/versions/${PHP_VER}/src/zend_multiply.h > $sourcePath/php/php${PHP_VER}/Zend/zend_multiply.h
|
||||
fi
|
||||
|
||||
if [ "${SYS_ARCH}" == "arm64" ] && [ "$sysName" == "Darwin" ] ;then
|
||||
if [ "${SYS_ARCH}" = "arm64" ] && [ "$sysName" = "Darwin" ] ;then
|
||||
# 修复mac arm64架构下php安装
|
||||
# 修复不能识别到sys_icache_invalidate
|
||||
cat ${curPath}/versions/${PHP_VER}/src/ext/pcre/sljitConfigInternal.h > $sourcePath/php/php${PHP_VER}/ext/pcre/pcrelib/sljit/sljitConfigInternal.h
|
||||
@@ -147,7 +147,7 @@ Uninstall_php()
|
||||
}
|
||||
|
||||
action=${1}
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_php
|
||||
else
|
||||
Uninstall_php
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user