mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-10 02:09:26 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
36ca82c1b4 | ||
|
|
acd46f4724 | ||
|
|
370ff99134 | ||
|
|
aa317ee2f5 | ||
|
|
44600b5657 | ||
|
|
ea45316a32 | ||
|
|
6cd13022f1 | ||
|
|
91ff2f7550 | ||
|
|
483b5b090d | ||
|
|
6087931c58 | ||
|
|
9014fd8911 | ||
|
|
76f7f51d80 | ||
|
|
0c4902e01e | ||
|
|
175fb089cd | ||
|
|
7b8a4a38b3 | ||
|
|
ebf920ed12 | ||
|
|
bb8591f5e5 | ||
|
|
b8573e1f1f | ||
|
|
dacc1e5ad8 | ||
|
|
8cc64e32dd | ||
|
|
1d294cc3b1 | ||
|
|
f9da2e4391 | ||
|
|
3b78079cd2 | ||
|
|
07a0a1be48 | ||
|
|
837f95e571 | ||
|
|
6ae1370709 | ||
|
|
c239f35382 | ||
|
|
49d57af719 |
@@ -606,7 +606,7 @@ def runHookDstDomain(row):
|
||||
|
||||
if mw.isAppleSystem():
|
||||
user = getRunUser()
|
||||
cmd += "source /Users/"+user+"/.zshrc\n"
|
||||
cmd += ". /Users/"+user+"/.zshrc\n"
|
||||
|
||||
cmd_data = getDnsapiData(row['dnsapi_id'])
|
||||
# print(cmd_data)
|
||||
|
||||
@@ -13,7 +13,7 @@ VERSION=$2
|
||||
# acme.sh --uninstall
|
||||
|
||||
|
||||
# source /Users/xxx/.zshrc
|
||||
# . /Users/xxx/.zshrc
|
||||
|
||||
# https://github.com/acmesh-official/acme.sh/wiki/dnsapi
|
||||
# https://docs.dnspod.com/api-legacy/domains.html#get-the-domain-list
|
||||
@@ -24,7 +24,7 @@ VERSION=$2
|
||||
|
||||
|
||||
if [ -f ${rootPath}/bin/activate ];then
|
||||
source ${rootPath}/bin/activate
|
||||
. ${rootPath}/bin/activate
|
||||
fi
|
||||
|
||||
# pip install cloudflare
|
||||
@@ -47,7 +47,7 @@ Uninstall_App()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_App
|
||||
else
|
||||
Uninstall_App
|
||||
|
||||
@@ -16,16 +16,16 @@ sysArch=`arch`
|
||||
sysName=`uname`
|
||||
|
||||
ALIST_ARCH_NAME=amd64
|
||||
if [ "$sysArch" == "arm64" ];then
|
||||
if [ "$sysArch" = "arm64" ];then
|
||||
ALIST_ARCH_NAME=arm64
|
||||
elif [ "$sysArch" == "x86_64" ]; then
|
||||
elif [ "$sysArch" = "x86_64" ]; then
|
||||
ALIST_ARCH_NAME=amd64
|
||||
elif [ "$sysArch" == "aarch64" ]; then
|
||||
elif [ "$sysArch" = "aarch64" ]; then
|
||||
ALIST_ARCH_NAME=arm64
|
||||
fi
|
||||
|
||||
ALIST_NAME=linux
|
||||
if [ "$sysName" == "Darwin" ];then
|
||||
if [ "$sysName" = "Darwin" ];then
|
||||
ALIST_NAME=darwin
|
||||
fi
|
||||
|
||||
@@ -86,7 +86,7 @@ Uninstall_App()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_App
|
||||
else
|
||||
Uninstall_App
|
||||
|
||||
@@ -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未运行,正在启动服务..."
|
||||
|
||||
@@ -38,7 +38,7 @@ else
|
||||
useradd -g www -s /bin/bash www
|
||||
fi
|
||||
|
||||
if [ "${action}" == "upgrade" ];then
|
||||
if [ "${action}" = "upgrade" ];then
|
||||
sh -x $curPath/versions/$2/install.sh $1
|
||||
|
||||
echo "${VERSION}" > $serverPath/apache/version.pl
|
||||
@@ -53,12 +53,12 @@ if [ "${action}" == "upgrade" ];then
|
||||
fi
|
||||
|
||||
|
||||
if [ "${2}" == "" ];then
|
||||
if [ "${2}" = "" ];then
|
||||
echo '缺少安装脚本版本...'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "${action}" == "uninstall" ];then
|
||||
if [ "${action}" = "uninstall" ];then
|
||||
if [ -f /usr/lib/systemd/system/httpd.service ] || [ -f /lib/systemd/system/httpd.service ];then
|
||||
systemctl stop httpd
|
||||
rm -rf /usr/systemd/system/httpd.service
|
||||
@@ -75,7 +75,7 @@ fi
|
||||
|
||||
sh -x $curPath/versions/$2/install.sh $1
|
||||
|
||||
if [ "${action}" == "install" ] && [ -d $serverPath/apache ];then
|
||||
if [ "${action}" = "install" ] && [ -d $serverPath/apache ];then
|
||||
echo "${VERSION}" > $serverPath/apache/version.pl
|
||||
|
||||
mkdir -p $serverPath/web_conf/php/conf
|
||||
|
||||
@@ -19,7 +19,7 @@ apacheDir=${serverPath}/source/apache
|
||||
|
||||
Install_App()
|
||||
{
|
||||
if [ "${action}" == "install" ];then
|
||||
if [ "${action}" = "install" ];then
|
||||
if [ -d $serverPath/apache ];then
|
||||
exit 0
|
||||
fi
|
||||
@@ -71,7 +71,7 @@ Install_App()
|
||||
cd ${apacheDir} && tar -jxf apr-${APR_VERSION}.tar.bz2
|
||||
cd ${apacheDir}/apr-${APR_VERSION} && ./configure --prefix=${serverPath}/apache/apr
|
||||
make -j${cpuCore} && make install
|
||||
if [ "$?" == "0" ];then
|
||||
if [ "$?" = "0" ];then
|
||||
# 检查 APR 配置文件
|
||||
APR_CONFIG=$(find ${serverPath}/apache/apr -name "apr-*config" | head -1)
|
||||
if [ -z "$APR_CONFIG" ];then
|
||||
@@ -90,7 +90,7 @@ Install_App()
|
||||
cd ${apacheDir} && tar -jxf apr-util-${APR_UTIL_VERSION}.tar.bz2
|
||||
cd ${apacheDir}/apr-util-${APR_UTIL_VERSION} && ./configure --prefix=${serverPath}/apache/apr-util --with-apr=${serverPath}/apache/apr
|
||||
make -j${cpuCore} && make install
|
||||
if [ "$?" == "0" ];then
|
||||
if [ "$?" = "0" ];then
|
||||
# 检查 APR-util 配置文件
|
||||
APU_CONFIG=$(find ${serverPath}/apache/apr-util -name "apu-*config" | head -1)
|
||||
if [ -z "$APU_CONFIG" ];then
|
||||
@@ -163,9 +163,9 @@ Uninstall_App()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == "install" ];then
|
||||
if [ "${1}" = "install" ];then
|
||||
Install_App
|
||||
elif [ "${1}" == "upgrade" ];then
|
||||
elif [ "${1}" = "upgrade" ];then
|
||||
Install_App
|
||||
else
|
||||
Uninstall_App
|
||||
|
||||
@@ -24,7 +24,7 @@ Uninstall_App()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_App $2
|
||||
else
|
||||
Uninstall_App $2
|
||||
|
||||
@@ -27,7 +27,7 @@ else
|
||||
fi
|
||||
|
||||
NGINX_IDS=`ps -ef|grep caddy | grep -v grep| awk '{print $2}'`
|
||||
if [ "$NGINX_IDS" == "" ];then
|
||||
if [ "$NGINX_IDS" = "" ];then
|
||||
ps -ef|grep caddy| grep -v grep| awk '{print $2}' | xargs kill -9
|
||||
systemctl start "$service_name"
|
||||
echo "caddy未运行,正在启动服务..."
|
||||
|
||||
@@ -33,7 +33,7 @@ else
|
||||
useradd -g www -s /bin/bash www
|
||||
fi
|
||||
|
||||
if [ "${action}" == "upgrade" ];then
|
||||
if [ "${action}" = "upgrade" ];then
|
||||
sh -x $curPath/versions/$2/install.sh $1
|
||||
|
||||
echo "${VERSION}" > $serverPath/caddy/version.pl
|
||||
@@ -45,12 +45,12 @@ if [ "${action}" == "upgrade" ];then
|
||||
fi
|
||||
|
||||
|
||||
if [ "${2}" == "" ];then
|
||||
if [ "${2}" = "" ];then
|
||||
echo '缺少安装脚本版本...'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "${action}" == "uninstall" ];then
|
||||
if [ "${action}" = "uninstall" ];then
|
||||
if [ -f /usr/lib/systemd/system/caddy.service ] || [ -f /lib/systemd/system/caddy.service ];then
|
||||
systemctl stop caddy
|
||||
rm -rf /usr/systemd/system/caddy.service
|
||||
@@ -67,7 +67,7 @@ fi
|
||||
|
||||
sh -x $curPath/versions/$2/install.sh $1
|
||||
|
||||
if [ "${action}" == "install" ] && [ -d $serverPath/caddy ];then
|
||||
if [ "${action}" = "install" ] && [ -d $serverPath/caddy ];then
|
||||
echo "${VERSION}" > $serverPath/caddy/version.pl
|
||||
|
||||
#初始化
|
||||
|
||||
@@ -39,7 +39,7 @@ caddyDir=${serverPath}/source/caddy
|
||||
|
||||
Install_App()
|
||||
{
|
||||
if [ "${action}" == "install" ];then
|
||||
if [ "${action}" = "install" ];then
|
||||
if [ -d $serverPath/caddy ];then
|
||||
exit 0
|
||||
fi
|
||||
@@ -60,7 +60,7 @@ Install_App()
|
||||
|
||||
mkdir -p cd $serverPath/source/caddy/caddy
|
||||
cd $serverPath/source/caddy/caddy && tar -zxvf ${caddyDir}/$FILE_NAME
|
||||
if [ "$OSNAME" == "mac" ];then
|
||||
if [ "$OSNAME" = "mac" ];then
|
||||
xattr -cr caddy
|
||||
fi
|
||||
|
||||
@@ -79,9 +79,9 @@ Uninstall_App()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == "install" ];then
|
||||
if [ "${1}" = "install" ];then
|
||||
Install_App
|
||||
elif [ "${1}" == "upgrade" ];then
|
||||
elif [ "${1}" = "upgrade" ];then
|
||||
Install_App
|
||||
else
|
||||
Uninstall_App
|
||||
|
||||
@@ -13,7 +13,7 @@ serverPath=$(dirname "$rootPath")
|
||||
VERSION=$2
|
||||
|
||||
if [ -f ${rootPath}/bin/activate ];then
|
||||
source ${rootPath}/bin/activate
|
||||
. ${rootPath}/bin/activate
|
||||
fi
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ Uninstall_app()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_app
|
||||
else
|
||||
Uninstall_app
|
||||
|
||||
@@ -16,16 +16,16 @@ sysArch=`arch`
|
||||
sysName=`uname`
|
||||
|
||||
ALIST_ARCH_NAME=amd64
|
||||
if [ "$sysArch" == "arm64" ];then
|
||||
if [ "$sysArch" = "arm64" ];then
|
||||
ALIST_ARCH_NAME=arm64
|
||||
elif [ "$sysArch" == "x86_64" ]; then
|
||||
elif [ "$sysArch" = "x86_64" ]; then
|
||||
ALIST_ARCH_NAME=amd64
|
||||
elif [ "$sysArch" == "aarch64" ]; then
|
||||
elif [ "$sysArch" = "aarch64" ]; then
|
||||
ALIST_ARCH_NAME=aarch64
|
||||
fi
|
||||
|
||||
ALIST_NAME=linux
|
||||
if [ "$sysName" == "Darwin" ];then
|
||||
if [ "$sysName" = "Darwin" ];then
|
||||
ALIST_NAME=darwin
|
||||
fi
|
||||
|
||||
@@ -83,7 +83,7 @@ Uninstall_App()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_App
|
||||
else
|
||||
Uninstall_App
|
||||
|
||||
@@ -15,7 +15,7 @@ from pprint import pprint
|
||||
sys.path.append(os.getcwd() + "/class/core")
|
||||
import mw
|
||||
|
||||
# cd /www/server/mdserver-web && source bin/activate
|
||||
# cd /www/server/mdserver-web && . bin/activate
|
||||
# python3 plugins/cryptocurrency_trade/ccxt/public_data/data.py run
|
||||
# python3 plugins/cryptocurrency_trade/ccxt/public_data/data.py long
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ curPath=`pwd`
|
||||
# bash plugins/cryptocurrency_trade/ccxt/public_data/data.sh
|
||||
|
||||
if [ -f ${curPath}/bin/activate ];then
|
||||
source ${curPath}/bin/activate
|
||||
. ${curPath}/bin/activate
|
||||
fi
|
||||
|
||||
python3 plugins/cryptocurrency_trade/ccxt/public_data/data.py long
|
||||
|
||||
@@ -11,7 +11,7 @@ from decimal import Decimal
|
||||
sys.path.append(os.getcwd() + "/plugins/cryptocurrency_trade/strategy")
|
||||
import common
|
||||
|
||||
# cd /www/server/mdserver-web && source bin/activate
|
||||
# cd /www/server/mdserver-web && . bin/activate
|
||||
# python3 plugins/cryptocurrency_trade/ccxt/strategy/func_test.py run
|
||||
|
||||
# common.notifyMsg("任务开始")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# cd /www/server/mdserver-web && source bin/activate
|
||||
# cd /www/server/mdserver-web && . bin/activate
|
||||
# python3 plugins/cryptocurrency_trade/ccxt/strategy/gate_100.py run
|
||||
# python3 plugins/cryptocurrency_trade/ccxt/strategy/gate_100.py long
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ from pprint import pprint
|
||||
sys.path.append(os.getcwd() + "/plugins/cryptocurrency_trade/strategy")
|
||||
import common
|
||||
|
||||
# cd /www/server/mdserver-web && source bin/activate
|
||||
# cd /www/server/mdserver-web && . bin/activate
|
||||
# python3 plugins/cryptocurrency_trade/ccxt/strategy/hammer_robot.py run
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# cd /www/server/mdserver-web && source bin/activate
|
||||
# cd /www/server/mdserver-web && . bin/activate
|
||||
# python3 plugins/cryptocurrency_trade/ccxt/strategy/macd_kdj.py run
|
||||
# python3 plugins/cryptocurrency_trade/ccxt/strategy/macd_kdj.py long
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# cd /www/server/mdserver-web && source bin/activate
|
||||
# cd /www/server/mdserver-web && . bin/activate
|
||||
# python3 plugins/cryptocurrency_trade/ccxt/strategy/momentun_trade.py run
|
||||
# python3 plugins/cryptocurrency_trade/ccxt/strategy/momentun_trade.py long
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# cd /www/server/mdserver-web && source bin/activate
|
||||
# cd /www/server/mdserver-web && . bin/activate
|
||||
# python3 plugins/cryptocurrency_trade/ccxt/strategy/notify_demo.py run
|
||||
# python3 plugins/cryptocurrency_trade/ccxt/strategy/notify_demo.py long
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# cd /www/server/mdserver-web && source bin/activate
|
||||
# cd /www/server/mdserver-web && . bin/activate
|
||||
|
||||
# python3 plugins/cryptocurrency_trade/ccxt/strategy/on_g_test.py t_buy_open
|
||||
# python3 plugins/cryptocurrency_trade/ccxt/strategy/on_g_test.py t_buy_close
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# cd /www/server/mdserver-web && source bin/activate
|
||||
# cd /www/server/mdserver-web && . bin/activate
|
||||
# python3 plugins/cryptocurrency_trade/ccxt/strategy/online_macd_trade.py run
|
||||
# python3 plugins/cryptocurrency_trade/ccxt/strategy/online_macd_trade.py long
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# cd /www/server/mdserver-web && source bin/activate
|
||||
# cd /www/server/mdserver-web && . bin/activate
|
||||
|
||||
# python3 plugins/cryptocurrency_trade/ccxt/strategy/online_test.py t_buy_open
|
||||
# python3 plugins/cryptocurrency_trade/ccxt/strategy/online_test.py t_buy_close
|
||||
|
||||
@@ -11,7 +11,7 @@ from pprint import pprint
|
||||
sys.path.append(os.getcwd() + "/plugins/cryptocurrency_trade/strategy")
|
||||
import common
|
||||
|
||||
# cd /www/server/mdserver-web && source bin/activate
|
||||
# cd /www/server/mdserver-web && . bin/activate
|
||||
# python3 plugins/cryptocurrency_trade/ccxt/strategy/rsi_robot.py run
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# cd /www/server/mdserver-web && source bin/activate
|
||||
# cd /www/server/mdserver-web && . bin/activate
|
||||
# python3 plugins/cryptocurrency_trade/ccxt/strategy/vega_trade.py run
|
||||
# python3 plugins/cryptocurrency_trade/ccxt/strategy/vega_trade.py long
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ pip install git+https://github.com/catalyst-team/catalyst@master --upgrade
|
||||
cd /www/server/mdserver-web && python3 plugins/cryptocurrency_trade/ccxt/test/p1.py
|
||||
|
||||
|
||||
cd /Users/midoks/Desktop/mwdev/server/mdserver-web && source bin/activate
|
||||
cd /Users/midoks/Desktop/mwdev/server/mdserver-web && . bin/activate
|
||||
|
||||
python3 plugins/cryptocurrency_trade/ccxt/test/p1.py
|
||||
'''
|
||||
|
||||
@@ -5,7 +5,7 @@ pip install git+https://github.com/catalyst-team/catalyst@master --upgrade
|
||||
cd /www/server/mdserver-web && python3 plugins/cryptocurrency_trade/ccxt/test/p1.py
|
||||
|
||||
|
||||
cd /Users/midoks/Desktop/mwdev/server/mdserver-web && source bin/activate
|
||||
cd /Users/midoks/Desktop/mwdev/server/mdserver-web && . bin/activate
|
||||
|
||||
python3 plugins/cryptocurrency_trade/ccxt/test/p1.py
|
||||
'''
|
||||
|
||||
@@ -9,10 +9,10 @@ from catalyst import run_algorithm
|
||||
from catalyst.api import order, record, symbol
|
||||
|
||||
'''
|
||||
cd /Users/midoks/Desktop/mwdev/server/mdserver-web && source bin/activate
|
||||
cd /Users/midoks/Desktop/mwdev/server/mdserver-web && / bin/activate
|
||||
|
||||
|
||||
cd /www/server/mdserver-web && source bin/activate && source activate catalys
|
||||
cd /www/server/mdserver-web && . bin/activate && source activate catalys
|
||||
|
||||
cd /Users/midoks/Desktop/mwdev/server/mdserver-web && python3 plugins/cryptocurrency_trade/ccxt/test/p_test.py
|
||||
catalyst ingest-exchange -x binance -i btc_usdt -f minute
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[program:{$NAME}]
|
||||
command=bash -c "cd {$RUN_ROOT} && source bin/activate && python3 {$ABS_FILE} long"
|
||||
command=bash -c "cd {$RUN_ROOT} && . bin/activate && python3 {$ABS_FILE} long"
|
||||
directory={$RUN_ROOT}
|
||||
autorestart=true
|
||||
startsecs=3
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[program:{$NAME}]
|
||||
command=bash -c "cd {$RUN_ROOT} && source bin/activate && python3 plugins/cryptocurrency_trade/ccxt/public_data/data.py long"
|
||||
command=bash -c "cd {$RUN_ROOT} && . bin/activate && python3 plugins/cryptocurrency_trade/ccxt/public_data/data.py long"
|
||||
directory={$RUN_ROOT}
|
||||
autorestart=true
|
||||
startsecs=3
|
||||
|
||||
@@ -14,7 +14,7 @@ VERSION=$2
|
||||
|
||||
# pip3 install ccxt
|
||||
if [ -f ${rootPath}/bin/activate ];then
|
||||
source ${rootPath}/bin/activate
|
||||
. ${rootPath}/bin/activate
|
||||
fi
|
||||
pip3 install ccxt
|
||||
pip3 install pandas
|
||||
@@ -56,7 +56,7 @@ Uninstall_App()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_App
|
||||
else
|
||||
Uninstall_App
|
||||
|
||||
@@ -26,7 +26,7 @@ Uninstall_App()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_App
|
||||
else
|
||||
Uninstall_App
|
||||
|
||||
@@ -13,7 +13,7 @@ serverPath=$(dirname "$rootPath")
|
||||
VERSION=$2
|
||||
|
||||
if [ -f ${rootPath}/bin/activate ];then
|
||||
source ${rootPath}/bin/activate
|
||||
. ${rootPath}/bin/activate
|
||||
fi
|
||||
|
||||
# {
|
||||
@@ -40,7 +40,7 @@ fi
|
||||
Install_Docker()
|
||||
{
|
||||
# which docker
|
||||
# if [ "$?" == "0" ];then
|
||||
# if [ "$?" = "0" ];then
|
||||
# echo '安装已经完成docker'
|
||||
# exit 0
|
||||
# fi
|
||||
@@ -69,7 +69,7 @@ Uninstall_Docker()
|
||||
{
|
||||
CMD=yum
|
||||
which apt
|
||||
if [ "$?" == "0" ];then
|
||||
if [ "$?" = "0" ];then
|
||||
CMD=apt
|
||||
fi
|
||||
|
||||
@@ -97,7 +97,7 @@ Uninstall_Docker()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_Docker
|
||||
else
|
||||
Uninstall_Docker
|
||||
|
||||
@@ -8,7 +8,7 @@ rootPath=$(dirname "$rootPath")
|
||||
serverPath=$(dirname "$rootPath")
|
||||
|
||||
if [ -f ${rootPath}/bin/activate ];then
|
||||
source ${rootPath}/bin/activate
|
||||
. ${rootPath}/bin/activate
|
||||
fi
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ Install_App()
|
||||
echo '正在安装脚本文件...'
|
||||
version=$1
|
||||
|
||||
if [ "macos" == "$OSNAME" ];then
|
||||
if [ "macos" = "$OSNAME" ];then
|
||||
echo "not support!"
|
||||
exit
|
||||
else
|
||||
@@ -95,7 +95,7 @@ Uninstall_App()
|
||||
|
||||
action=$1
|
||||
version=$2
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_App $version
|
||||
else
|
||||
Uninstall_App $version
|
||||
|
||||
@@ -13,13 +13,13 @@ serverPath=$(dirname "$rootPath")
|
||||
VERSION=$2
|
||||
|
||||
if [ -f ${rootPath}/bin/activate ];then
|
||||
source ${rootPath}/bin/activate
|
||||
. ${rootPath}/bin/activate
|
||||
fi
|
||||
|
||||
|
||||
OSNAME=`bash ${rootPath}/scripts/getos.sh`
|
||||
|
||||
if [ "" == "$OSNAME" ];then
|
||||
if [ "" = "$OSNAME" ];then
|
||||
OSNAME=`cat ${rootPath}/data/osname.pl`
|
||||
fi
|
||||
|
||||
@@ -83,7 +83,7 @@ Uninstall_App()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_App
|
||||
else
|
||||
Uninstall_App
|
||||
|
||||
@@ -14,16 +14,16 @@ sysArch=`arch`
|
||||
sysName=`uname`
|
||||
|
||||
DZ_ARCH_NAME=amd64
|
||||
if [ "$sysArch" == "arm64" ];then
|
||||
if [ "$sysArch" = "arm64" ];then
|
||||
DZ_ARCH_NAME=arm64
|
||||
elif [ "$sysArch" == "x86_64" ]; then
|
||||
elif [ "$sysArch" = "x86_64" ]; then
|
||||
DZ_ARCH_NAME=amd64
|
||||
elif [ "$sysArch" == "aarch64" ]; then
|
||||
elif [ "$sysArch" = "aarch64" ]; then
|
||||
DZ_ARCH_NAME=aarch64
|
||||
fi
|
||||
|
||||
DZ_NAME=linux
|
||||
if [ "$sysName" == "Darwin" ];then
|
||||
if [ "$sysName" = "Darwin" ];then
|
||||
DZ_NAME=darwin
|
||||
fi
|
||||
Install_App()
|
||||
@@ -78,7 +78,7 @@ Uninstall_App()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_App
|
||||
else
|
||||
Uninstall_App
|
||||
|
||||
@@ -67,7 +67,7 @@ Uninstall_App()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_App
|
||||
else
|
||||
Uninstall_App
|
||||
|
||||
@@ -3,9 +3,9 @@ PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
|
||||
export PATH
|
||||
|
||||
function version_gt() { test "$(echo "$@" | tr " " "\n" | sort -V | head -n 1)" != "$1"; }
|
||||
function version_le() { test "$(echo "$@" | tr " " "\n" | sort -V | head -n 1)" == "$1"; }
|
||||
function version_le() { test "$(echo "$@" | tr " " "\n" | sort -V | head -n 1)" = "$1"; }
|
||||
function version_lt() { test "$(echo "$@" | tr " " "\n" | sort -rV | head -n 1)" != "$1"; }
|
||||
function version_ge() { test "$(echo "$@" | tr " " "\n" | sort -rV | head -n 1)" == "$1"; }
|
||||
function version_ge() { test "$(echo "$@" | tr " " "\n" | sort -rV | head -n 1)" = "$1"; }
|
||||
|
||||
# cd /www/server/mdserver-web/plugins/gdrive && /bin/bash install.sh install 2.0
|
||||
|
||||
@@ -22,7 +22,7 @@ PATH=$PATH:${rootPath}/bin
|
||||
export PATH
|
||||
|
||||
# if [ -f ${rootPath}/bin/activate ];then
|
||||
# source ${rootPath}/bin/activate
|
||||
# . ${rootPath}/bin/activate
|
||||
# fi
|
||||
|
||||
VERSION=$2
|
||||
@@ -43,9 +43,9 @@ Install_App()
|
||||
echo "python3 < 3.10"
|
||||
cd ${GDDIR} && python3 -m venv .
|
||||
fi
|
||||
cd ${GDDIR} && source ${GDDIR}/bin/activate
|
||||
cd ${GDDIR} && . ${GDDIR}/bin/activate
|
||||
else
|
||||
cd ${GDDIR} && source ${GDDIR}/bin/activate
|
||||
cd ${GDDIR} && . ${GDDIR}/bin/activate
|
||||
fi
|
||||
|
||||
tmp=`python3 -V 2>&1|awk '{print $2}'`
|
||||
@@ -101,7 +101,7 @@ action=$1
|
||||
type=$2
|
||||
|
||||
echo $action $type
|
||||
if [ "${action}" == 'install' ];then
|
||||
if [ "${action}" = 'install' ];then
|
||||
Install_App
|
||||
else
|
||||
Uninstall_App
|
||||
|
||||
@@ -8,7 +8,7 @@ rootPath=$(dirname "$rootPath")
|
||||
serverPath=$(dirname "$rootPath")
|
||||
|
||||
if [ -f ${rootPath}/bin/activate ];then
|
||||
source ${rootPath}/bin/activate
|
||||
. ${rootPath}/bin/activate
|
||||
fi
|
||||
|
||||
|
||||
@@ -25,11 +25,11 @@ getBit(){
|
||||
}
|
||||
|
||||
Install_Rsync(){
|
||||
if [ "$OSNAME" == "debian" ] || [ "$OSNAME" == "ubuntu" ];then
|
||||
if [ "$OSNAME" = "debian" ] || [ "$OSNAME" = "ubuntu" ];then
|
||||
apt install -y rsync
|
||||
elif [[ "$OSNAME" == "arch" ]]; then
|
||||
elif [[ "$OSNAME" = "arch" ]]; then
|
||||
echo y | pacman -Sy rsync
|
||||
elif [[ "$OSNAME" == "macos" ]]; then
|
||||
elif [[ "$OSNAME" = "macos" ]]; then
|
||||
# brew install rsync
|
||||
# brew install lsyncd
|
||||
echo "ok"
|
||||
@@ -66,7 +66,7 @@ Install_App()
|
||||
|
||||
git config --global push.default simple
|
||||
|
||||
if [ "macos" == "$OSNAME" ];then
|
||||
if [ "macos" = "$OSNAME" ];then
|
||||
file=gitea-${version}-darwin-10.12-amd64
|
||||
else
|
||||
file=gitea-${version}-linux-amd64
|
||||
@@ -119,7 +119,7 @@ Uninstall_App()
|
||||
|
||||
action=$1
|
||||
version=$2
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_App $version
|
||||
else
|
||||
Uninstall_App $version
|
||||
|
||||
@@ -8,7 +8,7 @@ rootPath=$(dirname "$rootPath")
|
||||
serverPath=$(dirname "$rootPath")
|
||||
|
||||
if [ -f ${rootPath}/bin/activate ];then
|
||||
source ${rootPath}/bin/activate
|
||||
. ${rootPath}/bin/activate
|
||||
fi
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ GOGS_DOWNLOAD='https://dl.gogs.io'
|
||||
|
||||
getOs(){
|
||||
os=`uname`
|
||||
if [ "Darwin" == "$os" ];then
|
||||
if [ "Darwin" = "$os" ];then
|
||||
echo 'darwin'
|
||||
else
|
||||
echo 'linux'
|
||||
@@ -100,7 +100,7 @@ Uninstall_gogs()
|
||||
|
||||
action=$1
|
||||
version=$2
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_gogs $version
|
||||
else
|
||||
Uninstall_gogs $version
|
||||
|
||||
@@ -21,16 +21,16 @@ Install_App()
|
||||
mkdir -p $serverPath/source/gorse
|
||||
|
||||
SYSNAME=linux
|
||||
if [ "$sysName" == "Darwin" ];then
|
||||
if [ "$sysName" = "Darwin" ];then
|
||||
SYSNAME=darwin
|
||||
fi
|
||||
|
||||
ARCH="amd64"
|
||||
if [ "$sysArch" == "x86_64" ];then
|
||||
if [ "$sysArch" = "x86_64" ];then
|
||||
ARCH="amd64"
|
||||
elif [ "$sysArch" == "aarch64" ];then
|
||||
elif [ "$sysArch" = "aarch64" ];then
|
||||
ARCH="arm64"
|
||||
elif [ "$sysArch" == "arm64" ];then
|
||||
elif [ "$sysArch" = "arm64" ];then
|
||||
ARCH="arm64"
|
||||
else
|
||||
ARCH="amd64"
|
||||
@@ -88,7 +88,7 @@ Uninstall_App()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_App
|
||||
else
|
||||
Uninstall_App
|
||||
|
||||
@@ -28,7 +28,7 @@ if [ "macos" == "$OSNAME" ];then
|
||||
fi
|
||||
|
||||
if [ -f ${rootPath}/bin/activate ];then
|
||||
source ${rootPath}/bin/activate
|
||||
. ${rootPath}/bin/activate
|
||||
fi
|
||||
|
||||
if id grafana &> /dev/null ;then
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -54,7 +54,7 @@ Uninstall_App()
|
||||
}
|
||||
|
||||
action=${1}
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_App
|
||||
else
|
||||
Uninstall_App
|
||||
|
||||
@@ -22,7 +22,7 @@ else
|
||||
useradd -g haproxy haproxy
|
||||
fi
|
||||
|
||||
if [ "${2}" == "" ];then
|
||||
if [ "${2}" = "" ];then
|
||||
echo '缺少安装脚本...'
|
||||
exit 0
|
||||
fi
|
||||
@@ -32,7 +32,7 @@ if [ ! -d $curPath/versions/$2 ];then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "${action}" == "uninstall" ];then
|
||||
if [ "${action}" = "uninstall" ];then
|
||||
|
||||
if [ -f /usr/lib/systemd/system/haproxy.service ] || [ -f /lib/systemd/system/haproxy.service ];then
|
||||
systemctl stop haproxy
|
||||
@@ -45,7 +45,7 @@ fi
|
||||
|
||||
sh -x $curPath/versions/$2/install.sh $1
|
||||
|
||||
if [ "${action}" == "install" ] && [ -d $serverPath/haproxy ];then
|
||||
if [ "${action}" = "install" ] && [ -d $serverPath/haproxy ];then
|
||||
#初始化
|
||||
cd ${rootPath} && python3 ${rootPath}/plugins/haproxy/index.py start ${type}
|
||||
cd ${rootPath} && python3 ${rootPath}/plugins/haproxy/index.py initd_install ${type}
|
||||
|
||||
@@ -31,7 +31,7 @@ Install_App()
|
||||
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
|
||||
@@ -94,7 +94,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,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
|
||||
|
||||
@@ -10,7 +10,7 @@ serverPath=$(dirname "$rootPath")
|
||||
action=$1
|
||||
type=$2
|
||||
|
||||
if [ "${2}" == "" ];then
|
||||
if [ "${2}" = "" ];then
|
||||
echo '缺少安装脚本...'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@@ -21,9 +21,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
|
||||
@@ -104,7 +104,7 @@ Uninstall_App()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_App
|
||||
else
|
||||
Uninstall_App
|
||||
|
||||
@@ -91,7 +91,7 @@ Uninstall_App()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_App
|
||||
else
|
||||
Uninstall_App
|
||||
|
||||
@@ -11,7 +11,7 @@ rootPath=$(dirname "$curPath")
|
||||
|
||||
SOFT=$1
|
||||
|
||||
if [ "$SOFT" == "mysql" ];then
|
||||
if [ "$SOFT" = "mysql" ];then
|
||||
bash ${rootPath}/keepalived/scripts/chk_mysql.sh > ${rootPath}/keepalived/keepalived.log
|
||||
else
|
||||
echo "you should use [chk.sh mysql] exp ."
|
||||
|
||||
@@ -11,10 +11,10 @@ serverPath=$(dirname "$rootPath")
|
||||
# cd /www/server/mdserver-web && python3 plugins/lam/index.py start
|
||||
|
||||
if [ -f ${rootPath}/bin/activate ];then
|
||||
source ${rootPath}/bin/activate
|
||||
. ${rootPath}/bin/activate
|
||||
fi
|
||||
|
||||
if [ "$sys_os" == "Darwin" ];then
|
||||
if [ "$sys_os" = "Darwin" ];then
|
||||
BAK='_bak'
|
||||
else
|
||||
BAK=''
|
||||
@@ -23,7 +23,7 @@ fi
|
||||
sysName=`uname`
|
||||
echo "use system: ${sysName}"
|
||||
|
||||
if [ "${sysName}" == "Darwin" ]; then
|
||||
if [ "${sysName}" = "Darwin" ]; then
|
||||
OSNAME='macos'
|
||||
elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then
|
||||
OSNAME='centos'
|
||||
@@ -83,7 +83,7 @@ Uninstall_App()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_App $2
|
||||
else
|
||||
Uninstall_App $2
|
||||
|
||||
@@ -38,7 +38,7 @@ Uninstall_App()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_App
|
||||
else
|
||||
Uninstall_App
|
||||
|
||||
@@ -37,7 +37,7 @@ Uninstall_App()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_App
|
||||
else
|
||||
Uninstall_App
|
||||
|
||||
@@ -18,17 +18,17 @@ 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
|
||||
|
||||
if [ -f ${rootPath}/bin/activate ];then
|
||||
source ${rootPath}/bin/activate
|
||||
. ${rootPath}/bin/activate
|
||||
fi
|
||||
|
||||
# if id grafana &> /dev/null ;then
|
||||
@@ -77,7 +77,7 @@ Uninstall_App()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_App
|
||||
else
|
||||
Uninstall_App
|
||||
|
||||
@@ -18,7 +18,7 @@ Install_LVS(){
|
||||
mkdir -p $serverPath/source
|
||||
|
||||
which ipvsadm
|
||||
if [ "$?" == "0" ];then
|
||||
if [ "$?" = "0" ];then
|
||||
echo '已安装LVS!!'
|
||||
exit 0
|
||||
fi
|
||||
@@ -27,17 +27,17 @@ Install_LVS(){
|
||||
|
||||
# 检测平台命令
|
||||
which apt
|
||||
if [ "$?" == "0" ];then
|
||||
if [ "$?" = "0" ];then
|
||||
apt install -y ipvsadm
|
||||
fi
|
||||
|
||||
which yum
|
||||
if [ "$?" == "0" ];then
|
||||
if [ "$?" = "0" ];then
|
||||
yum install -y ipvsadm
|
||||
fi
|
||||
|
||||
which ipvsadm
|
||||
if [ "$?" == "0" ];then
|
||||
if [ "$?" = "0" ];then
|
||||
echo '正在安装LVS成功!'
|
||||
mkdir -p $serverPath/lvs
|
||||
|
||||
@@ -59,12 +59,12 @@ Uninstall_LVS()
|
||||
{
|
||||
# 检测平台命令
|
||||
which apt
|
||||
if [ "$?" == "0" ];then
|
||||
if [ "$?" = "0" ];then
|
||||
apt remove -y ipvsadm
|
||||
fi
|
||||
|
||||
which yum
|
||||
if [ "$?" == "0" ];then
|
||||
if [ "$?" = "0" ];then
|
||||
yum uninstall -y ipvsadm
|
||||
fi
|
||||
echo "卸载LVS完成"
|
||||
@@ -75,7 +75,7 @@ Uninstall_LVS()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_LVS
|
||||
else
|
||||
Uninstall_LVS
|
||||
|
||||
@@ -16,18 +16,18 @@ sysArch=`arch`
|
||||
# systemctl restart manticore
|
||||
|
||||
if [ -f ${rootPath}/bin/activate ];then
|
||||
source ${rootPath}/bin/activate
|
||||
. ${rootPath}/bin/activate
|
||||
fi
|
||||
|
||||
ACTION=$1
|
||||
VERSION=$2
|
||||
|
||||
which apt
|
||||
if [ "$?" == "0" ];then
|
||||
if [ "$?" = "0" ];then
|
||||
sh -x $curPath/versions/apt/install.sh $1 $2
|
||||
fi
|
||||
|
||||
which yum
|
||||
if [ "$?" == "0" ];then
|
||||
if [ "$?" = "0" ];then
|
||||
sh -x $curPath/versions/yum/install.sh $1 $2
|
||||
fi
|
||||
|
||||
@@ -10,7 +10,7 @@ sysName=`uname`
|
||||
sysArch=`arch`
|
||||
|
||||
if [ -f ${rootPath}/bin/activate ];then
|
||||
source ${rootPath}/bin/activate
|
||||
. ${rootPath}/bin/activate
|
||||
fi
|
||||
|
||||
VERSION=$2
|
||||
|
||||
@@ -11,7 +11,7 @@ sysArch=`arch`
|
||||
|
||||
|
||||
if [ -f ${rootPath}/bin/activate ];then
|
||||
source ${rootPath}/bin/activate
|
||||
. ${rootPath}/bin/activate
|
||||
fi
|
||||
|
||||
VERSION=$2
|
||||
@@ -60,7 +60,7 @@ Uninstall_App()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_App
|
||||
else
|
||||
Uninstall_App
|
||||
|
||||
@@ -878,7 +878,7 @@ def importDbExternalProgress():
|
||||
file = args['file']
|
||||
name = args['name']
|
||||
|
||||
cmd = 'cd '+mw.getServerDir()+'/mdserver-web && source bin/activate && '
|
||||
cmd = 'cd '+mw.getServerDir()+'/mdserver-web && . bin/activate && '
|
||||
cmd += 'python3 '+mw.getServerDir()+'/mdserver-web/plugins/mariadb/index.py import_db_external_progress_bar {"file":"'+file+'","name":"'+name+'"}'
|
||||
return mw.returnJson(True, 'ok',cmd)
|
||||
|
||||
@@ -2601,7 +2601,7 @@ def initSlaveStatusSSH(version=''):
|
||||
username='root', pkey=key)
|
||||
|
||||
db_user = data['db_user']
|
||||
cmd = 'cd /www/server/mdserver-web && source bin/activate && python3 plugins/mariadb/index.py get_master_rep_slave_user_cmd_ssh {"username":"' + db_user + '","db":""}'
|
||||
cmd = 'cd /www/server/mdserver-web && . bin/activate && python3 plugins/mariadb/index.py get_master_rep_slave_user_cmd_ssh {"username":"' + db_user + '","db":""}'
|
||||
stdin, stdout, stderr = ssh.exec_command(cmd)
|
||||
result = stdout.read()
|
||||
result = result.decode('utf-8')
|
||||
@@ -2753,7 +2753,7 @@ def syncDatabaseRepairLog(version=''):
|
||||
sync_args_sign = args['sign']
|
||||
op = args['op']
|
||||
tmp_log = syncDatabaseRepairTempFile()
|
||||
cmd = 'cd '+mw.getServerDir()+'/mdserver-web && source bin/activate && python3 plugins/mariadb/index.py sync_database_repair {"db":"'+sync_args_db+'","sign":"'+sync_args_sign+'"}'
|
||||
cmd = 'cd '+mw.getServerDir()+'/mdserver-web && . bin/activate && python3 plugins/mariadb/index.py sync_database_repair {"db":"'+sync_args_db+'","sign":"'+sync_args_sign+'"}'
|
||||
# print(cmd)
|
||||
|
||||
if op == 'get':
|
||||
@@ -3062,7 +3062,7 @@ def fullSyncCmd():
|
||||
db = args['db']
|
||||
sign = args['sign']
|
||||
|
||||
cmd = 'cd '+mw.getServerDir()+'/mdserver-web && source bin/activate && python3 plugins/mariadb/index.py do_full_sync {"db":"'+db+'","sign":"'+sign+'"}'
|
||||
cmd = 'cd '+mw.getServerDir()+'/mdserver-web && . bin/activate && python3 plugins/mariadb/index.py do_full_sync {"db":"'+db+'","sign":"'+sign+'"}'
|
||||
return mw.returnJson(True,'ok',cmd)
|
||||
|
||||
# python3 plugins/mariadb/index.py do_full_sync {"db":"demo1","sign":"","beigin":"1"}
|
||||
@@ -3247,7 +3247,7 @@ def doFullSyncSSH(version=''):
|
||||
|
||||
writeDbSyncStatus({'code': 0, 'msg': '登录Master成功...', 'progress': 5})
|
||||
dbname = args['db']
|
||||
cmd = "cd /www/server/mdserver-web && source bin/activate && python3 plugins/mariadb/index.py dump_mysql_data {\"db\":'" + dbname + "'}"
|
||||
cmd = "cd /www/server/mdserver-web && . bin/activate && python3 plugins/mariadb/index.py dump_mysql_data {\"db\":'" + dbname + "'}"
|
||||
print(cmd)
|
||||
stdin, stdout, stderr = ssh.exec_command(cmd)
|
||||
result = stdout.read()
|
||||
@@ -3270,7 +3270,7 @@ def doFullSyncSSH(version=''):
|
||||
if copy_status == None:
|
||||
writeDbSyncStatus({'code': 2, 'msg': '数据同步本地完成...', 'progress': 40})
|
||||
|
||||
cmd = 'cd /www/server/mdserver-web && source bin/activate && python3 plugins/mariadb/index.py get_master_rep_slave_user_cmd {"username":"' + db_user + '","db":""}'
|
||||
cmd = 'cd /www/server/mdserver-web && . bin/activate && python3 plugins/mariadb/index.py get_master_rep_slave_user_cmd {"username":"' + db_user + '","db":""}'
|
||||
stdin, stdout, stderr = ssh.exec_command(cmd)
|
||||
result = stdout.read()
|
||||
result = result.decode('utf-8')
|
||||
|
||||
@@ -8,11 +8,11 @@ rootPath=$(dirname "$rootPath")
|
||||
serverPath=$(dirname "$rootPath")
|
||||
|
||||
# cd /www/server/mdserver-web/plugins/mariadb && bash install.sh install 8.2
|
||||
# cd /www/server/mdserver-web && source bin/activate && python3 plugins/mariadb/index.py try_slave_sync_bugfix {}
|
||||
# cd /www/server/mdserver-web && source bin/activate && python3 plugins/mariadb/index.py do_full_sync {"db":"xxx","sign":"","begin":1}
|
||||
# cd /www/server/mdserver-web && source bin/activate && python3 plugins/mariadb/index.py sync_database_repair {"db":"xxx","sign":""}
|
||||
# cd /www/server/mdserver-web && source bin/activate && python3 plugins/mariadb/index.py init_slave_status
|
||||
# cd /www/server/mdserver-web && source bin/activate && python3 plugins/mariadb/index.py install_pre_inspection
|
||||
# cd /www/server/mdserver-web && . bin/activate && python3 plugins/mariadb/index.py try_slave_sync_bugfix {}
|
||||
# cd /www/server/mdserver-web && . bin/activate && python3 plugins/mariadb/index.py do_full_sync {"db":"xxx","sign":"","begin":1}
|
||||
# cd /www/server/mdserver-web && . bin/activate && python3 plugins/mariadb/index.py sync_database_repair {"db":"xxx","sign":""}
|
||||
# cd /www/server/mdserver-web && . bin/activate && python3 plugins/mariadb/index.py init_slave_status
|
||||
# cd /www/server/mdserver-web && . bin/activate && python3 plugins/mariadb/index.py install_pre_inspection
|
||||
|
||||
|
||||
action=$1
|
||||
@@ -26,7 +26,7 @@ else
|
||||
useradd -g mysql -s /usr/sbin/nologin mysql
|
||||
fi
|
||||
|
||||
if [ "${2}" == "" ];then
|
||||
if [ "${2}" = "" ];then
|
||||
echo '缺少安装脚本...'
|
||||
exit 0
|
||||
fi
|
||||
@@ -36,7 +36,7 @@ if [ ! -d $curPath/versions/$2 ];then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "${action}" == "uninstall" ];then
|
||||
if [ "${action}" = "uninstall" ];then
|
||||
|
||||
if [ -f /usr/lib/systemd/system/mariadb.service ] || [ -f /lib/systemd/system/mariadb.service ];then
|
||||
systemctl stop mariadb
|
||||
@@ -49,7 +49,7 @@ fi
|
||||
|
||||
sh -x $curPath/versions/$2/install.sh $1
|
||||
|
||||
if [ "${action}" == "install" ] && [ -d $serverPath/mariadb ];then
|
||||
if [ "${action}" = "install" ] && [ -d $serverPath/mariadb ];then
|
||||
#初始化
|
||||
cd ${rootPath} && python3 ${rootPath}/plugins/mariadb/index.py start ${type}
|
||||
cd ${rootPath} && python3 ${rootPath}/plugins/mariadb/index.py initd_install ${type}
|
||||
|
||||
@@ -113,7 +113,7 @@ Uninstall_app()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_app
|
||||
else
|
||||
Uninstall_app
|
||||
|
||||
@@ -71,7 +71,7 @@ Install_app()
|
||||
|
||||
INSTALL_CMD=cmake
|
||||
CMAKE3=`which cmake3`
|
||||
if [ "$?" == "0" ];then
|
||||
if [ "$?" = "0" ];then
|
||||
INSTALL_CMD=cmake3
|
||||
fi
|
||||
|
||||
@@ -116,7 +116,7 @@ Uninstall_app()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_app
|
||||
else
|
||||
Uninstall_app
|
||||
|
||||
@@ -103,7 +103,7 @@ Uninstall_app()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_app
|
||||
else
|
||||
Uninstall_app
|
||||
|
||||
@@ -103,7 +103,7 @@ Uninstall_app()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_app
|
||||
else
|
||||
Uninstall_app
|
||||
|
||||
@@ -113,7 +113,7 @@ Uninstall_app()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_app
|
||||
else
|
||||
Uninstall_app
|
||||
|
||||
@@ -113,7 +113,7 @@ Uninstall_app()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_app
|
||||
else
|
||||
Uninstall_app
|
||||
|
||||
@@ -113,7 +113,7 @@ Uninstall_app()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_app
|
||||
else
|
||||
Uninstall_app
|
||||
|
||||
@@ -113,7 +113,7 @@ Uninstall_app()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_app
|
||||
else
|
||||
Uninstall_app
|
||||
|
||||
@@ -113,7 +113,7 @@ Uninstall_app()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_app
|
||||
else
|
||||
Uninstall_app
|
||||
|
||||
@@ -113,7 +113,7 @@ Uninstall_app()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_app
|
||||
else
|
||||
Uninstall_app
|
||||
|
||||
@@ -113,7 +113,7 @@ Uninstall_app()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_app
|
||||
else
|
||||
Uninstall_app
|
||||
|
||||
@@ -113,7 +113,7 @@ Uninstall_app()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_app
|
||||
else
|
||||
Uninstall_app
|
||||
|
||||
@@ -113,7 +113,7 @@ Uninstall_app()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_app
|
||||
else
|
||||
Uninstall_app
|
||||
|
||||
@@ -113,7 +113,7 @@ Uninstall_app()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_app
|
||||
else
|
||||
Uninstall_app
|
||||
|
||||
@@ -113,7 +113,7 @@ Uninstall_app()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_app
|
||||
else
|
||||
Uninstall_app
|
||||
|
||||
@@ -24,7 +24,7 @@ Install_mem(){
|
||||
cd $serverPath/source/memcached && tar -zxvf memcached.tar.gz
|
||||
|
||||
OPTIONS=''
|
||||
if [ ${sys_os} == "Darwin" ]; then
|
||||
if [ ${sys_os} = "Darwin" ]; then
|
||||
LIB_DEPEND_DIR=`brew info libevent | grep /opt/homebrew/Cellar/libevent | cut -d \ -f 1 | awk 'END {print}'`
|
||||
OPTIONS="${OPTIONS} --with-libevent=${LIB_DEPEND_DIR}"
|
||||
fi
|
||||
@@ -68,7 +68,7 @@ Uninstall_mem()
|
||||
# /www/server/memcached/bin/memcached -d -p 11211 -u root -m 100 -c 100
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_mem
|
||||
else
|
||||
Uninstall_mem
|
||||
|
||||
@@ -98,7 +98,7 @@ class classApi:
|
||||
os.remove(log_file)
|
||||
|
||||
plugins_dir = mw.getServerDir() + '/mdserver-web'
|
||||
exe = "cd {0} && source bin/activate && python3 plugins/migration_api/index.py bg_process &>{1} &".format(
|
||||
exe = "cd {0} && . bin/activate && python3 plugins/migration_api/index.py bg_process &>{1} &".format(
|
||||
plugins_dir, log_file_error)
|
||||
# mw.execShell(exe)
|
||||
# os.system(exe)
|
||||
|
||||
@@ -9,7 +9,7 @@ rootPath=$(dirname "$rootPath")
|
||||
serverPath=$(dirname "$rootPath")
|
||||
|
||||
|
||||
# cd /www/server/mdserver-web && source bin/activate && python3 plugins/migration_api/index.py bg_process
|
||||
# cd /www/server/mdserver-web && . bin/activate && python3 plugins/migration_api/index.py bg_process
|
||||
|
||||
VERSION=1.0
|
||||
|
||||
@@ -25,7 +25,7 @@ Uninstall_App()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_App
|
||||
else
|
||||
Uninstall_App
|
||||
|
||||
@@ -465,7 +465,7 @@ def setConfigAuth():
|
||||
|
||||
def runInfo():
|
||||
'''
|
||||
cd /www/server/mdserver-web && source bin/activate && python3 /www/server/mdserver-web/plugins/mongodb/index.py run_info
|
||||
cd /www/server/mdserver-web && . bin/activate && python3 /www/server/mdserver-web/plugins/mongodb/index.py run_info
|
||||
'''
|
||||
client = mongdbClient()
|
||||
db = client.admin
|
||||
@@ -1451,7 +1451,7 @@ def importDbBackup():
|
||||
|
||||
def testData():
|
||||
'''
|
||||
cd /www/server/mdserver-web && source bin/activate && python3 /www/server/mdserver-web/plugins/mongodb/index.py test_data
|
||||
cd /www/server/mdserver-web && . bin/activate && python3 /www/server/mdserver-web/plugins/mongodb/index.py test_data
|
||||
'''
|
||||
import pymongo
|
||||
from pymongo import ReadPreference
|
||||
@@ -1470,7 +1470,7 @@ def testData():
|
||||
def test():
|
||||
'''
|
||||
python3 /www/server/mdserver-web/plugins/mongodb/index.py set_config_auth {}
|
||||
cd /www/server/mdserver-web && source bin/activate && python3 /www/server/mdserver-web/plugins/mongodb/index.py test
|
||||
cd /www/server/mdserver-web && . bin/activate && python3 /www/server/mdserver-web/plugins/mongodb/index.py test
|
||||
python3 plugins/mongodb/index.py test
|
||||
'''
|
||||
# https://pymongo.readthedocs.io/en/stable/examples/high_availability.html
|
||||
|
||||
@@ -23,9 +23,9 @@ SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | a
|
||||
Install_app_mac()
|
||||
{
|
||||
mkdir -p $serverPath/mongodb
|
||||
if [ "$VERSION" == "5.0" ];then
|
||||
if [ "$VERSION" = "5.0" ];then
|
||||
G_VERSION="5.0.11"
|
||||
elif [[ "$VERSION" == "4.4" ]]; then
|
||||
elif [[ "$VERSION" = "4.4" ]]; then
|
||||
G_VERSION="4.4.11"
|
||||
fi
|
||||
|
||||
@@ -41,7 +41,7 @@ Install_app_mac()
|
||||
Install_Linux_Ubuntu()
|
||||
{
|
||||
##################### Ubuntu start #####################
|
||||
if [ "$SYS_VERSION_ID" == "22" ]; then
|
||||
if [ "$SYS_VERSION_ID" = "22" ]; then
|
||||
echo "Not yet supported"
|
||||
exit 1
|
||||
fi
|
||||
@@ -52,11 +52,11 @@ fi
|
||||
echo $SYS_VERSION_ID
|
||||
|
||||
SOURCE_NAME=bionic
|
||||
if [ "$SYS_VERSION_ID" == "18.04" ];then
|
||||
if [ "$SYS_VERSION_ID" = "18.04" ];then
|
||||
SOURCE_NAME=bionic
|
||||
elif [ "$SYS_VERSION_ID" == "16.04" ];then
|
||||
elif [ "$SYS_VERSION_ID" = "16.04" ];then
|
||||
SOURCE_NAME=xenial
|
||||
elif [ "$SYS_VERSION_ID" == "20.04" ];then
|
||||
elif [ "$SYS_VERSION_ID" = "20.04" ];then
|
||||
SOURCE_NAME=focal
|
||||
fi
|
||||
|
||||
@@ -210,13 +210,13 @@ rm -rf /etc/yum.repos.d/mongodb-org-${VERSION}.repo
|
||||
|
||||
Install_app_linux()
|
||||
{
|
||||
if [ "$OSNAME" == "ubuntu" ];then
|
||||
if [ "$OSNAME" = "ubuntu" ];then
|
||||
Install_Linux_Ubuntu
|
||||
elif [ "$OSNAME" == "debian" ];then
|
||||
elif [ "$OSNAME" = "debian" ];then
|
||||
Install_Linux_Debian
|
||||
elif [ "$OSNAME" == "centos" ];then
|
||||
elif [ "$OSNAME" = "centos" ];then
|
||||
Install_Linux_CentOS
|
||||
elif [ "$OSNAME" == "opensuse" ];then
|
||||
elif [ "$OSNAME" = "opensuse" ];then
|
||||
Install_Linux_Opensuse
|
||||
else
|
||||
echo "Not yet supported"
|
||||
@@ -230,13 +230,13 @@ Install_app()
|
||||
echo '正在安装脚本文件...'
|
||||
mkdir -p $serverPath/source
|
||||
|
||||
if [ "macos" == "$OSNAME" ];then
|
||||
if [ "macos" = "$OSNAME" ];then
|
||||
Install_app_mac
|
||||
else
|
||||
Install_app_linux
|
||||
fi
|
||||
|
||||
if [ "$?" == "0" ];then
|
||||
if [ "$?" = "0" ];then
|
||||
mkdir -p $serverPath/mongodb
|
||||
echo "${VERSION}" > $serverPath/mongodb/version.pl
|
||||
echo '安装完成'
|
||||
@@ -252,13 +252,13 @@ Install_app()
|
||||
Uninstall_app_linux()
|
||||
{
|
||||
##################
|
||||
if [ "$OSNAME" == "ubuntu" ];then
|
||||
if [ "$OSNAME" = "ubuntu" ];then
|
||||
Uninstall_Linux_Ubuntu
|
||||
elif [ "$OSNAME" == "debian" ];then
|
||||
elif [ "$OSNAME" = "debian" ];then
|
||||
Uninstall_Linux_Debian
|
||||
elif [ "$OSNAME" == "centos" ];then
|
||||
elif [ "$OSNAME" = "centos" ];then
|
||||
Uninstall_Linux_CentOS
|
||||
elif [ "$OSNAME" == "opensuse" ];then
|
||||
elif [ "$OSNAME" = "opensuse" ];then
|
||||
Uninstall_Linux_Opensuse
|
||||
else
|
||||
echo "ok"
|
||||
@@ -268,7 +268,7 @@ fi
|
||||
|
||||
Uninstall_app()
|
||||
{
|
||||
if [ "macos" == "$OSNAME" ];then
|
||||
if [ "macos" = "$OSNAME" ];then
|
||||
echo 'mac'
|
||||
else
|
||||
Uninstall_app_linux
|
||||
@@ -279,7 +279,7 @@ Uninstall_app()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_app
|
||||
else
|
||||
Uninstall_app
|
||||
|
||||
@@ -79,7 +79,7 @@ Install_app()
|
||||
--ssl=off CPPPATH=$serverPath/lib/openssl/include \
|
||||
LIBPATH=$serverPath/lib/openssl/lib"
|
||||
|
||||
if [ "$?" == "0" ];then
|
||||
if [ "$?" = "0" ];then
|
||||
mkdir -p $serverPath/mongodb
|
||||
echo "${VERSION}" > $serverPath/mongodb/version.pl
|
||||
echo '安装完成'
|
||||
@@ -99,7 +99,7 @@ Uninstall_app()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_app
|
||||
else
|
||||
Uninstall_app
|
||||
|
||||
@@ -43,33 +43,13 @@ if [ "macos" != "$OSNAME" ];then
|
||||
fi
|
||||
|
||||
if [ -f ${rootPath}/bin/activate ];then
|
||||
source ${rootPath}/bin/activate
|
||||
. ${rootPath}/bin/activate
|
||||
fi
|
||||
Install_app()
|
||||
{
|
||||
echo '正在安装脚本文件...'
|
||||
mkdir -p $serverPath/source
|
||||
|
||||
# if id mongodb &> /dev/null ;then
|
||||
# echo "mongodb uid is `id -u mongodb`"
|
||||
# echo "mongodb shell is `grep "^mongodb:" /etc/passwd |cut -d':' -f7 `"
|
||||
# else
|
||||
# groupadd mongodb
|
||||
# useradd -g mongodb mongodb
|
||||
# fi
|
||||
|
||||
# if [ "centos" == "$OSNAME" ];then
|
||||
# OSNAME=rhel
|
||||
# fi
|
||||
|
||||
# if [ "fedora" == "$OSNAME" ];then
|
||||
# OSNAME=rhel
|
||||
# fi
|
||||
|
||||
# if [ "rocky" == "$OSNAME" ];then
|
||||
# OSNAME=rhel
|
||||
# fi
|
||||
|
||||
cd ${rootPath}/plugins/php/lib && /bin/bash openssl_11.sh
|
||||
|
||||
shell_file=${curPath}/versions/${VERSION}/${OSNAME}.sh
|
||||
@@ -86,7 +66,7 @@ Install_app()
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$?" == "0" ];then
|
||||
if [ "$?" = "0" ];then
|
||||
mkdir -p $serverPath/mongodb
|
||||
echo "${VERSION}" > $serverPath/mongodb/version.pl
|
||||
echo 'mongodb安装完成'
|
||||
@@ -96,7 +76,7 @@ Install_app()
|
||||
cd ${rootPath} && python3 ${rootPath}/plugins/mongodb/index.py initd_install
|
||||
fi
|
||||
|
||||
if [ "${VERSION}" == "3.0" ];then
|
||||
if [ "${VERSION}" = "3.0" ];then
|
||||
# 降低版本
|
||||
pip install pymongo==3.12.0
|
||||
else
|
||||
@@ -122,7 +102,7 @@ Uninstall_app()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_app
|
||||
else
|
||||
Uninstall_app
|
||||
|
||||
@@ -89,11 +89,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
|
||||
|
||||
|
||||
@@ -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
|
||||
SYS_NAME="82"
|
||||
else
|
||||
|
||||
@@ -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
|
||||
@@ -76,11 +76,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
|
||||
@@ -66,11 +66,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
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -70,11 +70,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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ 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
|
||||
|
||||
@@ -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
|
||||
@@ -70,11 +70,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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -33,11 +33,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
|
||||
@@ -58,11 +58,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
|
||||
@@ -70,11 +70,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
|
||||
|
||||
|
||||
@@ -42,7 +42,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
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -23,11 +23,11 @@ if [ "$SYS_NAME" -lt "2004" ];then
|
||||
SYS_NAME="2004"
|
||||
fi
|
||||
|
||||
if [ "$SYS_NAME" == "2204" ];then
|
||||
if [ "$SYS_NAME" = "2204" ];then
|
||||
SYS_NAME="2204"
|
||||
fi
|
||||
|
||||
if [ "$SYS_NAME" == "2404" ];then
|
||||
if [ "$SYS_NAME" = "2404" ];then
|
||||
SYS_NAME="2404"
|
||||
fi
|
||||
|
||||
@@ -78,11 +78,11 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
|
||||
TOOL_VERSION=100.9.4
|
||||
SYS_NAME=2204
|
||||
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
|
||||
|
||||
|
||||
@@ -42,7 +42,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
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user