Compare commits

..
133 Commits
Author SHA1 Message Date
dami b100204b37 Update rapira.toml 2026-10-18 11:01:26 +08:00
dami 82ff3e3d0a Update rapira.js 2026-10-17 14:38:47 +08:00
dami 0b2223bce0 Update rapira.js 2026-10-17 14:35:50 +08:00
dami a43b723b09 Update rapira.js 2026-10-17 14:34:17 +08:00
dami 96551f49ca Update rapira.js 2026-10-17 14:32:51 +08:00
dami 8e32d37985 Update rapira.toml 2026-10-17 14:21:49 +08:00
dami d1da238ddc update 2026-10-17 14:07:59 +08:00
dami 7260a2be21 Create rapira.conf 2026-10-17 14:02:10 +08:00
dami 7562d50e58 Update phpinfo.conf 2026-10-17 13:29:05 +08:00
dami e77ae8763b Update index.py 2026-10-17 13:28:22 +08:00
dami a0e51c75fe Update index.py 2026-10-17 13:22:00 +08:00
dami 6021a5e6e2 Update enable-rapira.conf 2026-10-17 13:12:48 +08:00
dami e50e222955 Update index.py 2026-10-17 13:07:00 +08:00
dami 531dd665c9 update 2026-10-17 13:02:17 +08:00
dami a79c0a1a9b update 2026-10-17 11:41:47 +08:00
dami 9ef144c304 Update rapira.toml 2026-10-16 12:58:36 +08:00
dami 5402af8df7 Update index.py 2026-10-16 12:38:11 +08:00
dami 99802125dc Update index.py 2026-10-16 12:37:51 +08:00
dami 705647cd3b Update rapira.toml 2026-10-16 11:54:05 +08:00
dami 0ea2eeab7f Update rapira.toml 2026-10-16 11:53:31 +08:00
dami 727cde1352 Update rapira.toml 2026-10-16 11:53:11 +08:00
dami 6ef6358cbb update 2026-10-16 11:44:30 +08:00
dami 6acb303ac9 update 2026-10-16 11:32:27 +08:00
dami a80e5492b8 Update index.html 2026-10-16 11:24:05 +08:00
dami 4358b1a520 update 2026-10-16 11:11:00 +08:00
dami ad1a7c22a6 Update index.py 2026-10-16 11:01:33 +08:00
dami 2f3af23e6d Update index.html 2026-10-15 16:23:17 +08:00
dami 89a26d294d Update public.js 2026-10-15 15:43:36 +08:00
dami f83faeacac update 2026-10-15 15:42:08 +08:00
dami fb7c27c205 Update index.py 2026-10-15 15:37:08 +08:00
dami 3f958c7083 Update index.html 2026-10-15 15:33:09 +08:00
dami 60b6689318 Update index.py 2026-10-15 15:32:29 +08:00
dami ba94e81367 update 2026-10-15 15:05:36 +08:00
dami 89c8c68b88 Update requirements.txt 2026-10-15 15:00:58 +08:00
dami e78ae7e4de Update requirements.txt 2026-10-15 15:00:32 +08:00
dami f87cadd3ce Update index.html 2026-10-15 14:59:44 +08:00
dami 1631e149ea Update index.py 2026-10-15 14:58:02 +08:00
dami d84f585bff Update index.py 2026-10-15 14:52:00 +08:00
dami 7e9091b341 update 2026-10-15 14:51:02 +08:00
dami 7020d3e198 Update install.sh 2026-10-15 14:39:55 +08:00
dami 9d8e0ded8f Update install.sh 2026-10-15 14:25:05 +08:00
dami 090e8fa160 Create rapira.source.toml 2026-10-15 14:20:21 +08:00
dami 83746675e7 Update install.sh 2026-10-15 14:19:57 +08:00
dami 74d73d76cd Update index_php.py 2026-10-13 13:03:48 +08:00
dami 6bfedde66d Update install.sh 2026-10-13 13:02:00 +08:00
dami 554bee4040 Update install.sh 2026-10-13 13:01:27 +08:00
dami a1005adf04 Update install.sh 2026-10-13 11:43:52 +08:00
dami cbed47d825 update 2026-10-13 10:55:20 +08:00
dami abb7da896b Update index.py 2026-10-11 15:39:00 +08:00
dami e62a69ac45 update 2026-10-11 15:31:57 +08:00
dami 769285736b update 2026-10-11 15:29:04 +08:00
dami 8d2eaa94bd Update index.html 2026-10-11 15:07:48 +08:00
dami a31143e0e8 Update install.sh 2026-10-11 15:05:22 +08:00
dami 584551f764 update 2026-10-11 15:04:11 +08:00
dami 8b60a65bbd Update index.py 2026-10-11 14:52:34 +08:00
dami c13df7c25b Update index.py 2026-10-11 14:52:08 +08:00
dami ad30ba776c Update index.py 2026-10-11 14:51:43 +08:00
dami de3451993f Update install.sh 2026-10-11 14:45:56 +08:00
dami fde9b49f39 Update rapira.service.tpl 2026-10-11 14:39:51 +08:00
dami cff0e9442c Update install.sh 2026-10-11 14:34:11 +08:00
dami 5cb57d89de Update install.sh 2026-10-11 14:29:32 +08:00
dami fadcbaa1bb Update install.sh 2026-10-11 14:29:01 +08:00
dami 911554f6df Update install.sh 2026-10-11 14:27:46 +08:00
dami 77b525d955 Update install.sh 2026-10-11 14:19:44 +08:00
dami b872a2bb53 Update install.sh 2026-10-11 14:19:29 +08:00
dami 818444d4f4 Update install.sh 2026-10-11 14:17:47 +08:00
dami 63e16e05aa Update install.sh 2026-10-11 13:56:53 +08:00
dami 06743894a3 Update install.sh 2026-10-11 12:48:56 +08:00
dami 2d665235c8 update 2026-10-11 12:43:17 +08:00
dami 72311a2801 update 2026-10-09 12:42:45 +08:00
dami d7ba290ed3 up 2026-10-09 11:08:59 +08:00
dami e0d2984bae Update install.sh 2026-10-09 10:51:30 +08:00
dami ecdbe8d014 Update install.sh 2026-10-09 10:40:39 +08:00
dami 7d57e320b8 Update install.sh 2026-10-09 10:40:27 +08:00
dami cf16b729f6 Create install.sh 2026-10-09 10:01:12 +08:00
dami 366c5c91aa Update install.sh 2026-10-09 09:37:39 +08:00
dami 173cf2985e Update install.sh 2026-10-09 09:17:39 +08:00
dami 0bdba73f25 Update install.sh 2026-10-09 09:14:55 +08:00
dami 24d25e69ad Update install.sh 2026-10-09 09:09:41 +08:00
dami d3e6297503 Update site.css 2026-10-08 21:30:53 +08:00
dami 76b5f15115 update 2026-10-08 19:17:46 +08:00
dami cfa92b637a update 2026-10-08 18:52:56 +08:00
dami f07e75e508 init rapira 2026-10-08 18:42:21 +08:00
dami 4220300731 Update site.css 2026-09-22 19:11:55 +08:00
Mr Chen 43b464866f Merge pull request #938 from midoks/dev
HDD和SSD磁盘识别
2026-09-22 16:31:43 +08:00
dami 7bf5dbb4f3 Update site.css 2026-09-22 16:13:41 +08:00
dami 9fe8453898 Update index.js 2026-09-22 16:05:43 +08:00
dami b421cf261f Update index.js 2026-09-22 16:02:45 +08:00
dami 75d28763ee Update index.js 2026-09-22 15:58:28 +08:00
dami 25533fa8bc Update main.py 2026-09-22 15:34:24 +08:00
dami 04294e6cbe Update main.py 2026-09-22 15:28:38 +08:00
dami f0550ba6b3 Update main.py 2026-09-22 15:21:43 +08:00
dami 88d0733d95 Update install.sh 2026-09-13 13:17:11 +08:00
dami 74633e155a update 2026-09-13 12:59:14 +08:00
dami 7d8d7a8c6f Create openssl_40.sh 2026-09-13 10:32:35 +08:00
Mr Chen 32956578b2 Merge pull request #937 from midoks/dev
bash符合标准
2026-09-11 22:52:09 +08:00
dami 4efdf7606c update 2026-09-11 22:48:34 +08:00
dami a61644861b update 2026-09-11 22:39:42 +08:00
dami e60570e380 update 2026-09-11 22:25:42 +08:00
dami ad160cb23e update 2026-09-11 22:10:30 +08:00
dami 73f58ced9a update 2026-09-11 21:57:55 +08:00
dami 36ca82c1b4 update 2026-09-11 21:52:24 +08:00
dami acd46f4724 update 2026-09-11 21:28:59 +08:00
dami 370ff99134 update 2026-09-11 21:10:03 +08:00
dami aa317ee2f5 update 2026-09-11 20:47:27 +08:00
dami 44600b5657 update 2026-09-11 20:42:39 +08:00
dami ea45316a32 update 2026-09-11 20:32:22 +08:00
dami 6cd13022f1 Update install.sh 2026-09-11 20:31:05 +08:00
dami 91ff2f7550 update 2026-09-11 20:30:55 +08:00
dami 483b5b090d Update install.sh 2026-09-11 20:18:46 +08:00
dami 6087931c58 Update install.sh 2026-09-11 20:18:28 +08:00
dami 9014fd8911 Update install.sh 2026-09-11 20:18:07 +08:00
dami 76f7f51d80 Update install.sh 2026-09-11 20:15:43 +08:00
dami 0c4902e01e Update install.sh 2026-09-11 20:13:34 +08:00
dami 175fb089cd Update install.sh 2026-09-11 20:13:11 +08:00
dami 7b8a4a38b3 Update install.sh 2026-09-11 20:12:33 +08:00
dami ebf920ed12 Update install.sh 2026-09-11 20:08:55 +08:00
dami bb8591f5e5 update 2026-09-11 20:06:25 +08:00
dami b8573e1f1f Update plugin.py 2026-09-11 20:04:59 +08:00
dami dacc1e5ad8 update 2026-09-11 20:00:47 +08:00
dami 8cc64e32dd update 2026-09-11 19:55:44 +08:00
dami 1d294cc3b1 Update index.py 2026-09-11 19:51:42 +08:00
dami f9da2e4391 update 2026-09-11 19:46:15 +08:00
dami 3b78079cd2 Update install.sh 2026-09-11 19:35:40 +08:00
dami 07a0a1be48 Update install.sh 2026-09-11 19:31:44 +08:00
dami 837f95e571 Merge branch 'master' into dev 2026-09-09 01:45:29 +08:00
Mr Chen 909d818caa Merge pull request #936 from ramondelee/patch-2
Update freetype_new.sh
2026-09-09 01:44:12 +08:00
ramondelee 355ceebbd7 Update freetype_new.sh
修复freetype下载失败问题
2026-09-08 21:12:36 +08:00
dami 6ae1370709 Merge branch 'master' into dev 2026-09-08 12:02:31 +08:00
Mr Chen 93b5d8b8b4 Merge pull request #935 from ramondelee/patch-1
Update freetype_old.sh
2026-09-08 12:02:10 +08:00
ramondelee be461a15a9 Update freetype_old.sh
修复freetype下载失败问题
2026-09-07 22:23:11 +08:00
Mr Chen 19fc0fdc51 Merge pull request #934 from midoks/dev
常规更新
2026-08-26 18:16:57 +08:00
Mr Chen b679ea035d Merge pull request #933 from midoks/dev
常规优化
2026-07-22 13:05:42 +08:00
463 changed files with 11296 additions and 1446 deletions
+2 -2
View File
@@ -19,12 +19,12 @@ fi
mw_start_task() mw_start_task()
{ {
isStart=$(ps aux |grep 'panel_task.py'|grep -v grep|awk '{print $2}') 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" echo -e "starting mw-tasks... \c"
cd $DIR && python3 panel_task.py >> ${DIR}/logs/panel_task.log 2>&1 & cd $DIR && python3 panel_task.py >> ${DIR}/logs/panel_task.log 2>&1 &
sleep 0.3 sleep 0.3
isStart=$(ps aux |grep 'panel_task.py'|grep -v grep|awk '{print $2}') 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 -e "\033[31mfailed\033[0m"
echo '------------------------------------------------------' echo '------------------------------------------------------'
tail -n 20 $DIR/logs/panel_task.log tail -n 20 $DIR/logs/panel_task.log
+1 -1
View File
@@ -606,7 +606,7 @@ def runHookDstDomain(row):
if mw.isAppleSystem(): if mw.isAppleSystem():
user = getRunUser() user = getRunUser()
cmd += "source /Users/"+user+"/.zshrc\n" cmd += ". /Users/"+user+"/.zshrc\n"
cmd_data = getDnsapiData(row['dnsapi_id']) cmd_data = getDnsapiData(row['dnsapi_id'])
# print(cmd_data) # print(cmd_data)
+3 -3
View File
@@ -13,7 +13,7 @@ VERSION=$2
# acme.sh --uninstall # acme.sh --uninstall
# source /Users/xxx/.zshrc # . /Users/xxx/.zshrc
# https://github.com/acmesh-official/acme.sh/wiki/dnsapi # https://github.com/acmesh-official/acme.sh/wiki/dnsapi
# https://docs.dnspod.com/api-legacy/domains.html#get-the-domain-list # https://docs.dnspod.com/api-legacy/domains.html#get-the-domain-list
@@ -24,7 +24,7 @@ VERSION=$2
if [ -f ${rootPath}/bin/activate ];then if [ -f ${rootPath}/bin/activate ];then
source ${rootPath}/bin/activate . ${rootPath}/bin/activate
fi fi
# pip install cloudflare # pip install cloudflare
@@ -47,7 +47,7 @@ Uninstall_App()
} }
action=$1 action=$1
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_App Install_App
else else
Uninstall_App Uninstall_App
+5 -5
View File
@@ -16,16 +16,16 @@ sysArch=`arch`
sysName=`uname` sysName=`uname`
ALIST_ARCH_NAME=amd64 ALIST_ARCH_NAME=amd64
if [ "$sysArch" == "arm64" ];then if [ "$sysArch" = "arm64" ];then
ALIST_ARCH_NAME=arm64 ALIST_ARCH_NAME=arm64
elif [ "$sysArch" == "x86_64" ]; then elif [ "$sysArch" = "x86_64" ]; then
ALIST_ARCH_NAME=amd64 ALIST_ARCH_NAME=amd64
elif [ "$sysArch" == "aarch64" ]; then elif [ "$sysArch" = "aarch64" ]; then
ALIST_ARCH_NAME=arm64 ALIST_ARCH_NAME=arm64
fi fi
ALIST_NAME=linux ALIST_NAME=linux
if [ "$sysName" == "Darwin" ];then if [ "$sysName" = "Darwin" ];then
ALIST_NAME=darwin ALIST_NAME=darwin
fi fi
@@ -86,7 +86,7 @@ Uninstall_App()
} }
action=$1 action=$1
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_App Install_App
else else
Uninstall_App Uninstall_App
+1 -1
View File
@@ -27,7 +27,7 @@ else
fi fi
NGINX_IDS=`ps -ef|grep nginx | grep -v grep| awk '{print $2}'` 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 ps -ef|grep nginx| grep -v grep| awk '{print $2}' | xargs kill -9
systemctl start "$service_name" systemctl start "$service_name"
echo "OpenResty未运行,正在启动服务..." echo "OpenResty未运行,正在启动服务..."
+4 -4
View File
@@ -38,7 +38,7 @@ else
useradd -g www -s /bin/bash www useradd -g www -s /bin/bash www
fi fi
if [ "${action}" == "upgrade" ];then if [ "${action}" = "upgrade" ];then
sh -x $curPath/versions/$2/install.sh $1 sh -x $curPath/versions/$2/install.sh $1
echo "${VERSION}" > $serverPath/apache/version.pl echo "${VERSION}" > $serverPath/apache/version.pl
@@ -53,12 +53,12 @@ if [ "${action}" == "upgrade" ];then
fi fi
if [ "${2}" == "" ];then if [ "${2}" = "" ];then
echo '缺少安装脚本版本...' echo '缺少安装脚本版本...'
exit 0 exit 0
fi fi
if [ "${action}" == "uninstall" ];then if [ "${action}" = "uninstall" ];then
if [ -f /usr/lib/systemd/system/httpd.service ] || [ -f /lib/systemd/system/httpd.service ];then if [ -f /usr/lib/systemd/system/httpd.service ] || [ -f /lib/systemd/system/httpd.service ];then
systemctl stop httpd systemctl stop httpd
rm -rf /usr/systemd/system/httpd.service rm -rf /usr/systemd/system/httpd.service
@@ -75,7 +75,7 @@ fi
sh -x $curPath/versions/$2/install.sh $1 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 echo "${VERSION}" > $serverPath/apache/version.pl
mkdir -p $serverPath/web_conf/php/conf mkdir -p $serverPath/web_conf/php/conf
+5 -5
View File
@@ -19,7 +19,7 @@ apacheDir=${serverPath}/source/apache
Install_App() Install_App()
{ {
if [ "${action}" == "install" ];then if [ "${action}" = "install" ];then
if [ -d $serverPath/apache ];then if [ -d $serverPath/apache ];then
exit 0 exit 0
fi fi
@@ -71,7 +71,7 @@ Install_App()
cd ${apacheDir} && tar -jxf apr-${APR_VERSION}.tar.bz2 cd ${apacheDir} && tar -jxf apr-${APR_VERSION}.tar.bz2
cd ${apacheDir}/apr-${APR_VERSION} && ./configure --prefix=${serverPath}/apache/apr cd ${apacheDir}/apr-${APR_VERSION} && ./configure --prefix=${serverPath}/apache/apr
make -j${cpuCore} && make install make -j${cpuCore} && make install
if [ "$?" == "0" ];then if [ "$?" = "0" ];then
# 检查 APR 配置文件 # 检查 APR 配置文件
APR_CONFIG=$(find ${serverPath}/apache/apr -name "apr-*config" | head -1) APR_CONFIG=$(find ${serverPath}/apache/apr -name "apr-*config" | head -1)
if [ -z "$APR_CONFIG" ];then if [ -z "$APR_CONFIG" ];then
@@ -90,7 +90,7 @@ Install_App()
cd ${apacheDir} && tar -jxf apr-util-${APR_UTIL_VERSION}.tar.bz2 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 cd ${apacheDir}/apr-util-${APR_UTIL_VERSION} && ./configure --prefix=${serverPath}/apache/apr-util --with-apr=${serverPath}/apache/apr
make -j${cpuCore} && make install make -j${cpuCore} && make install
if [ "$?" == "0" ];then if [ "$?" = "0" ];then
# 检查 APR-util 配置文件 # 检查 APR-util 配置文件
APU_CONFIG=$(find ${serverPath}/apache/apr-util -name "apu-*config" | head -1) APU_CONFIG=$(find ${serverPath}/apache/apr-util -name "apu-*config" | head -1)
if [ -z "$APU_CONFIG" ];then if [ -z "$APU_CONFIG" ];then
@@ -163,9 +163,9 @@ Uninstall_App()
} }
action=$1 action=$1
if [ "${1}" == "install" ];then if [ "${1}" = "install" ];then
Install_App Install_App
elif [ "${1}" == "upgrade" ];then elif [ "${1}" = "upgrade" ];then
Install_App Install_App
else else
Uninstall_App Uninstall_App
+1 -1
View File
@@ -24,7 +24,7 @@ Uninstall_App()
} }
action=$1 action=$1
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_App $2 Install_App $2
else else
Uninstall_App $2 Uninstall_App $2
+1 -1
View File
@@ -27,7 +27,7 @@ else
fi fi
NGINX_IDS=`ps -ef|grep caddy | grep -v grep| awk '{print $2}'` 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 ps -ef|grep caddy| grep -v grep| awk '{print $2}' | xargs kill -9
systemctl start "$service_name" systemctl start "$service_name"
echo "caddy未运行,正在启动服务..." echo "caddy未运行,正在启动服务..."
+4 -4
View File
@@ -33,7 +33,7 @@ else
useradd -g www -s /bin/bash www useradd -g www -s /bin/bash www
fi fi
if [ "${action}" == "upgrade" ];then if [ "${action}" = "upgrade" ];then
sh -x $curPath/versions/$2/install.sh $1 sh -x $curPath/versions/$2/install.sh $1
echo "${VERSION}" > $serverPath/caddy/version.pl echo "${VERSION}" > $serverPath/caddy/version.pl
@@ -45,12 +45,12 @@ if [ "${action}" == "upgrade" ];then
fi fi
if [ "${2}" == "" ];then if [ "${2}" = "" ];then
echo '缺少安装脚本版本...' echo '缺少安装脚本版本...'
exit 0 exit 0
fi fi
if [ "${action}" == "uninstall" ];then if [ "${action}" = "uninstall" ];then
if [ -f /usr/lib/systemd/system/caddy.service ] || [ -f /lib/systemd/system/caddy.service ];then if [ -f /usr/lib/systemd/system/caddy.service ] || [ -f /lib/systemd/system/caddy.service ];then
systemctl stop caddy systemctl stop caddy
rm -rf /usr/systemd/system/caddy.service rm -rf /usr/systemd/system/caddy.service
@@ -67,7 +67,7 @@ fi
sh -x $curPath/versions/$2/install.sh $1 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 echo "${VERSION}" > $serverPath/caddy/version.pl
#初始化 #初始化
+4 -4
View File
@@ -39,7 +39,7 @@ caddyDir=${serverPath}/source/caddy
Install_App() Install_App()
{ {
if [ "${action}" == "install" ];then if [ "${action}" = "install" ];then
if [ -d $serverPath/caddy ];then if [ -d $serverPath/caddy ];then
exit 0 exit 0
fi fi
@@ -60,7 +60,7 @@ Install_App()
mkdir -p cd $serverPath/source/caddy/caddy mkdir -p cd $serverPath/source/caddy/caddy
cd $serverPath/source/caddy/caddy && tar -zxvf ${caddyDir}/$FILE_NAME cd $serverPath/source/caddy/caddy && tar -zxvf ${caddyDir}/$FILE_NAME
if [ "$OSNAME" == "mac" ];then if [ "$OSNAME" = "mac" ];then
xattr -cr caddy xattr -cr caddy
fi fi
@@ -79,9 +79,9 @@ Uninstall_App()
} }
action=$1 action=$1
if [ "${1}" == "install" ];then if [ "${1}" = "install" ];then
Install_App Install_App
elif [ "${1}" == "upgrade" ];then elif [ "${1}" = "upgrade" ];then
Install_App Install_App
else else
Uninstall_App Uninstall_App
+2 -2
View File
@@ -13,7 +13,7 @@ serverPath=$(dirname "$rootPath")
VERSION=$2 VERSION=$2
if [ -f ${rootPath}/bin/activate ];then if [ -f ${rootPath}/bin/activate ];then
source ${rootPath}/bin/activate . ${rootPath}/bin/activate
fi fi
@@ -35,7 +35,7 @@ Uninstall_app()
} }
action=$1 action=$1
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_app Install_app
else else
Uninstall_app Uninstall_app
+5 -5
View File
@@ -16,16 +16,16 @@ sysArch=`arch`
sysName=`uname` sysName=`uname`
ALIST_ARCH_NAME=amd64 ALIST_ARCH_NAME=amd64
if [ "$sysArch" == "arm64" ];then if [ "$sysArch" = "arm64" ];then
ALIST_ARCH_NAME=arm64 ALIST_ARCH_NAME=arm64
elif [ "$sysArch" == "x86_64" ]; then elif [ "$sysArch" = "x86_64" ]; then
ALIST_ARCH_NAME=amd64 ALIST_ARCH_NAME=amd64
elif [ "$sysArch" == "aarch64" ]; then elif [ "$sysArch" = "aarch64" ]; then
ALIST_ARCH_NAME=aarch64 ALIST_ARCH_NAME=aarch64
fi fi
ALIST_NAME=linux ALIST_NAME=linux
if [ "$sysName" == "Darwin" ];then if [ "$sysName" = "Darwin" ];then
ALIST_NAME=darwin ALIST_NAME=darwin
fi fi
@@ -83,7 +83,7 @@ Uninstall_App()
} }
action=$1 action=$1
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_App Install_App
else else
Uninstall_App Uninstall_App
@@ -15,7 +15,7 @@ from pprint import pprint
sys.path.append(os.getcwd() + "/class/core") sys.path.append(os.getcwd() + "/class/core")
import mw 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 run
# python3 plugins/cryptocurrency_trade/ccxt/public_data/data.py long # 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 # bash plugins/cryptocurrency_trade/ccxt/public_data/data.sh
if [ -f ${curPath}/bin/activate ];then if [ -f ${curPath}/bin/activate ];then
source ${curPath}/bin/activate . ${curPath}/bin/activate
fi fi
python3 plugins/cryptocurrency_trade/ccxt/public_data/data.py long 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") sys.path.append(os.getcwd() + "/plugins/cryptocurrency_trade/strategy")
import common 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 # python3 plugins/cryptocurrency_trade/ccxt/strategy/func_test.py run
# common.notifyMsg("任务开始") # 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 run
# python3 plugins/cryptocurrency_trade/ccxt/strategy/gate_100.py long # 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") sys.path.append(os.getcwd() + "/plugins/cryptocurrency_trade/strategy")
import common 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 # 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 run
# python3 plugins/cryptocurrency_trade/ccxt/strategy/macd_kdj.py long # 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 run
# python3 plugins/cryptocurrency_trade/ccxt/strategy/momentun_trade.py long # 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 run
# python3 plugins/cryptocurrency_trade/ccxt/strategy/notify_demo.py long # 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_open
# python3 plugins/cryptocurrency_trade/ccxt/strategy/on_g_test.py t_buy_close # 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 run
# python3 plugins/cryptocurrency_trade/ccxt/strategy/online_macd_trade.py long # 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_open
# python3 plugins/cryptocurrency_trade/ccxt/strategy/online_test.py t_buy_close # 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") sys.path.append(os.getcwd() + "/plugins/cryptocurrency_trade/strategy")
import common 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 # 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 run
# python3 plugins/cryptocurrency_trade/ccxt/strategy/vega_trade.py long # python3 plugins/cryptocurrency_trade/ccxt/strategy/vega_trade.py long
+1 -1
View File
@@ -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 /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 python3 plugins/cryptocurrency_trade/ccxt/test/p1.py
''' '''
+1 -1
View File
@@ -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 /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 python3 plugins/cryptocurrency_trade/ccxt/test/p1.py
''' '''
@@ -9,10 +9,10 @@ from catalyst import run_algorithm
from catalyst.api import order, record, symbol 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 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 catalyst ingest-exchange -x binance -i btc_usdt -f minute
@@ -1,5 +1,5 @@
[program:{$NAME}] [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} directory={$RUN_ROOT}
autorestart=true autorestart=true
startsecs=3 startsecs=3
@@ -1,5 +1,5 @@
[program:{$NAME}] [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} directory={$RUN_ROOT}
autorestart=true autorestart=true
startsecs=3 startsecs=3
+2 -2
View File
@@ -14,7 +14,7 @@ VERSION=$2
# pip3 install ccxt # pip3 install ccxt
if [ -f ${rootPath}/bin/activate ];then if [ -f ${rootPath}/bin/activate ];then
source ${rootPath}/bin/activate . ${rootPath}/bin/activate
fi fi
pip3 install ccxt pip3 install ccxt
pip3 install pandas pip3 install pandas
@@ -56,7 +56,7 @@ Uninstall_App()
} }
action=$1 action=$1
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_App Install_App
else else
Uninstall_App Uninstall_App
+1 -1
View File
@@ -26,7 +26,7 @@ Uninstall_App()
} }
action=$1 action=$1
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_App Install_App
else else
Uninstall_App Uninstall_App
+4 -4
View File
@@ -13,7 +13,7 @@ serverPath=$(dirname "$rootPath")
VERSION=$2 VERSION=$2
if [ -f ${rootPath}/bin/activate ];then if [ -f ${rootPath}/bin/activate ];then
source ${rootPath}/bin/activate . ${rootPath}/bin/activate
fi fi
# { # {
@@ -40,7 +40,7 @@ fi
Install_Docker() Install_Docker()
{ {
# which docker # which docker
# if [ "$?" == "0" ];then # if [ "$?" = "0" ];then
# echo '安装已经完成docker' # echo '安装已经完成docker'
# exit 0 # exit 0
# fi # fi
@@ -69,7 +69,7 @@ Uninstall_Docker()
{ {
CMD=yum CMD=yum
which apt which apt
if [ "$?" == "0" ];then if [ "$?" = "0" ];then
CMD=apt CMD=apt
fi fi
@@ -97,7 +97,7 @@ Uninstall_Docker()
} }
action=$1 action=$1
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_Docker Install_Docker
else else
Uninstall_Docker Uninstall_Docker
+3 -3
View File
@@ -8,7 +8,7 @@ rootPath=$(dirname "$rootPath")
serverPath=$(dirname "$rootPath") serverPath=$(dirname "$rootPath")
if [ -f ${rootPath}/bin/activate ];then if [ -f ${rootPath}/bin/activate ];then
source ${rootPath}/bin/activate . ${rootPath}/bin/activate
fi fi
@@ -43,7 +43,7 @@ Install_App()
echo '正在安装脚本文件...' echo '正在安装脚本文件...'
version=$1 version=$1
if [ "macos" == "$OSNAME" ];then if [ "macos" = "$OSNAME" ];then
echo "not support!" echo "not support!"
exit exit
else else
@@ -95,7 +95,7 @@ Uninstall_App()
action=$1 action=$1
version=$2 version=$2
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_App $version Install_App $version
else else
Uninstall_App $version Uninstall_App $version
+3 -3
View File
@@ -13,13 +13,13 @@ serverPath=$(dirname "$rootPath")
VERSION=$2 VERSION=$2
if [ -f ${rootPath}/bin/activate ];then if [ -f ${rootPath}/bin/activate ];then
source ${rootPath}/bin/activate . ${rootPath}/bin/activate
fi fi
OSNAME=`bash ${rootPath}/scripts/getos.sh` OSNAME=`bash ${rootPath}/scripts/getos.sh`
if [ "" == "$OSNAME" ];then if [ "" = "$OSNAME" ];then
OSNAME=`cat ${rootPath}/data/osname.pl` OSNAME=`cat ${rootPath}/data/osname.pl`
fi fi
@@ -83,7 +83,7 @@ Uninstall_App()
} }
action=$1 action=$1
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_App Install_App
else else
Uninstall_App Uninstall_App
+5 -5
View File
@@ -14,16 +14,16 @@ sysArch=`arch`
sysName=`uname` sysName=`uname`
DZ_ARCH_NAME=amd64 DZ_ARCH_NAME=amd64
if [ "$sysArch" == "arm64" ];then if [ "$sysArch" = "arm64" ];then
DZ_ARCH_NAME=arm64 DZ_ARCH_NAME=arm64
elif [ "$sysArch" == "x86_64" ]; then elif [ "$sysArch" = "x86_64" ]; then
DZ_ARCH_NAME=amd64 DZ_ARCH_NAME=amd64
elif [ "$sysArch" == "aarch64" ]; then elif [ "$sysArch" = "aarch64" ]; then
DZ_ARCH_NAME=aarch64 DZ_ARCH_NAME=aarch64
fi fi
DZ_NAME=linux DZ_NAME=linux
if [ "$sysName" == "Darwin" ];then if [ "$sysName" = "Darwin" ];then
DZ_NAME=darwin DZ_NAME=darwin
fi fi
Install_App() Install_App()
@@ -78,7 +78,7 @@ Uninstall_App()
} }
action=$1 action=$1
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_App Install_App
else else
Uninstall_App Uninstall_App
+1 -1
View File
@@ -67,7 +67,7 @@ Uninstall_App()
} }
action=$1 action=$1
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_App Install_App
else else
Uninstall_App Uninstall_App
+6 -6
View File
@@ -3,9 +3,9 @@ PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH export PATH
function version_gt() { test "$(echo "$@" | tr " " "\n" | sort -V | head -n 1)" != "$1"; } 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_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 # cd /www/server/mdserver-web/plugins/gdrive && /bin/bash install.sh install 2.0
@@ -22,7 +22,7 @@ PATH=$PATH:${rootPath}/bin
export PATH export PATH
# if [ -f ${rootPath}/bin/activate ];then # if [ -f ${rootPath}/bin/activate ];then
# source ${rootPath}/bin/activate # . ${rootPath}/bin/activate
# fi # fi
VERSION=$2 VERSION=$2
@@ -43,9 +43,9 @@ Install_App()
echo "python3 < 3.10" echo "python3 < 3.10"
cd ${GDDIR} && python3 -m venv . cd ${GDDIR} && python3 -m venv .
fi fi
cd ${GDDIR} && source ${GDDIR}/bin/activate cd ${GDDIR} && . ${GDDIR}/bin/activate
else else
cd ${GDDIR} && source ${GDDIR}/bin/activate cd ${GDDIR} && . ${GDDIR}/bin/activate
fi fi
tmp=`python3 -V 2>&1|awk '{print $2}'` tmp=`python3 -V 2>&1|awk '{print $2}'`
@@ -101,7 +101,7 @@ action=$1
type=$2 type=$2
echo $action $type echo $action $type
if [ "${action}" == 'install' ];then if [ "${action}" = 'install' ];then
Install_App Install_App
else else
Uninstall_App Uninstall_App
+6 -6
View File
@@ -8,7 +8,7 @@ rootPath=$(dirname "$rootPath")
serverPath=$(dirname "$rootPath") serverPath=$(dirname "$rootPath")
if [ -f ${rootPath}/bin/activate ];then if [ -f ${rootPath}/bin/activate ];then
source ${rootPath}/bin/activate . ${rootPath}/bin/activate
fi fi
@@ -25,11 +25,11 @@ getBit(){
} }
Install_Rsync(){ Install_Rsync(){
if [ "$OSNAME" == "debian" ] || [ "$OSNAME" == "ubuntu" ];then if [ "$OSNAME" = "debian" ] || [ "$OSNAME" = "ubuntu" ];then
apt install -y rsync apt install -y rsync
elif [[ "$OSNAME" == "arch" ]]; then elif [[ "$OSNAME" = "arch" ]]; then
echo y | pacman -Sy rsync echo y | pacman -Sy rsync
elif [[ "$OSNAME" == "macos" ]]; then elif [[ "$OSNAME" = "macos" ]]; then
# brew install rsync # brew install rsync
# brew install lsyncd # brew install lsyncd
echo "ok" echo "ok"
@@ -66,7 +66,7 @@ Install_App()
git config --global push.default simple git config --global push.default simple
if [ "macos" == "$OSNAME" ];then if [ "macos" = "$OSNAME" ];then
file=gitea-${version}-darwin-10.12-amd64 file=gitea-${version}-darwin-10.12-amd64
else else
file=gitea-${version}-linux-amd64 file=gitea-${version}-linux-amd64
@@ -119,7 +119,7 @@ Uninstall_App()
action=$1 action=$1
version=$2 version=$2
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_App $version Install_App $version
else else
Uninstall_App $version Uninstall_App $version
+4 -4
View File
@@ -8,7 +8,7 @@ rootPath=$(dirname "$rootPath")
serverPath=$(dirname "$rootPath") serverPath=$(dirname "$rootPath")
if [ -f ${rootPath}/bin/activate ];then if [ -f ${rootPath}/bin/activate ];then
source ${rootPath}/bin/activate . ${rootPath}/bin/activate
fi fi
@@ -16,7 +16,7 @@ GOGS_DOWNLOAD='https://dl.gogs.io'
getOs(){ getOs(){
os=`uname` os=`uname`
if [ "Darwin" == "$os" ];then if [ "Darwin" = "$os" ];then
echo 'darwin' echo 'darwin'
else else
echo 'linux' echo 'linux'
@@ -48,7 +48,7 @@ Install_gogs()
git config --global push.default simple git config --global push.default simple
if [ "darwin" == "$os" ];then if [ "darwin" = "$os" ];then
file=gogs_${version}_darwin_amd64.zip file=gogs_${version}_darwin_amd64.zip
else else
file=gogs_${version}_linux_amd64.zip file=gogs_${version}_linux_amd64.zip
@@ -100,7 +100,7 @@ Uninstall_gogs()
action=$1 action=$1
version=$2 version=$2
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_gogs $version Install_gogs $version
else else
Uninstall_gogs $version Uninstall_gogs $version
+5 -5
View File
@@ -21,16 +21,16 @@ Install_App()
mkdir -p $serverPath/source/gorse mkdir -p $serverPath/source/gorse
SYSNAME=linux SYSNAME=linux
if [ "$sysName" == "Darwin" ];then if [ "$sysName" = "Darwin" ];then
SYSNAME=darwin SYSNAME=darwin
fi fi
ARCH="amd64" ARCH="amd64"
if [ "$sysArch" == "x86_64" ];then if [ "$sysArch" = "x86_64" ];then
ARCH="amd64" ARCH="amd64"
elif [ "$sysArch" == "aarch64" ];then elif [ "$sysArch" = "aarch64" ];then
ARCH="arm64" ARCH="arm64"
elif [ "$sysArch" == "arm64" ];then elif [ "$sysArch" = "arm64" ];then
ARCH="arm64" ARCH="arm64"
else else
ARCH="amd64" ARCH="amd64"
@@ -88,7 +88,7 @@ Uninstall_App()
} }
action=$1 action=$1
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_App Install_App
else else
Uninstall_App Uninstall_App
+4 -4
View File
@@ -18,17 +18,17 @@ sysName=`uname`
echo "use system: ${sysName}" echo "use system: ${sysName}"
OSNAME=`bash ${rootPath}/scripts/getos.sh` OSNAME=`bash ${rootPath}/scripts/getos.sh`
if [ "" == "$OSNAME" ];then if [ "" = "$OSNAME" ];then
OSNAME=`cat ${rootPath}/data/osname.pl` OSNAME=`cat ${rootPath}/data/osname.pl`
fi fi
if [ "macos" == "$OSNAME" ];then if [ "macos" = "$OSNAME" ];then
echo "不支持Macox" echo "不支持Macox"
exit exit
fi fi
if [ -f ${rootPath}/bin/activate ];then if [ -f ${rootPath}/bin/activate ];then
source ${rootPath}/bin/activate . ${rootPath}/bin/activate
fi fi
if id grafana &> /dev/null ;then if id grafana &> /dev/null ;then
@@ -78,7 +78,7 @@ Uninstall_App()
} }
action=$1 action=$1
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_App Install_App
else else
Uninstall_App Uninstall_App
+4 -4
View File
@@ -17,11 +17,11 @@ sysArch=`arch`
sysName=`uname` sysName=`uname`
ARCH_NAME=amd64 ARCH_NAME=amd64
if [ "$sysArch" == "arm64" ];then if [ "$sysArch" = "arm64" ];then
ARCH_NAME=arm64 ARCH_NAME=arm64
elif [ "$sysArch" == "x86_64" ]; then elif [ "$sysArch" = "x86_64" ]; then
ARCH_NAME=amd64 ARCH_NAME=amd64
elif [ "$sysArch" == "aarch64" ]; then elif [ "$sysArch" = "aarch64" ]; then
ARCH_NAME=aarch64 ARCH_NAME=aarch64
fi fi
@@ -54,7 +54,7 @@ Uninstall_App()
} }
action=${1} action=${1}
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_App Install_App
else else
Uninstall_App Uninstall_App
+3 -3
View File
@@ -22,7 +22,7 @@ else
useradd -g haproxy haproxy useradd -g haproxy haproxy
fi fi
if [ "${2}" == "" ];then if [ "${2}" = "" ];then
echo '缺少安装脚本...' echo '缺少安装脚本...'
exit 0 exit 0
fi fi
@@ -32,7 +32,7 @@ if [ ! -d $curPath/versions/$2 ];then
exit 0 exit 0
fi fi
if [ "${action}" == "uninstall" ];then if [ "${action}" = "uninstall" ];then
if [ -f /usr/lib/systemd/system/haproxy.service ] || [ -f /lib/systemd/system/haproxy.service ];then if [ -f /usr/lib/systemd/system/haproxy.service ] || [ -f /lib/systemd/system/haproxy.service ];then
systemctl stop haproxy systemctl stop haproxy
@@ -45,7 +45,7 @@ fi
sh -x $curPath/versions/$2/install.sh $1 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 start ${type}
cd ${rootPath} && python3 ${rootPath}/plugins/haproxy/index.py initd_install ${type} cd ${rootPath} && python3 ${rootPath}/plugins/haproxy/index.py initd_install ${type}
+5 -5
View File
@@ -26,12 +26,12 @@ Install_App()
LOCAL_ADDR=common LOCAL_ADDR=common
cn=$(curl -fsSL -m 10 -s http://ipinfo.io/json | grep "\"country\": \"CN\"") 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 LOCAL_ADDR=cn
fi fi
if [ "${LOCAL_ADDR}" == "cn" ];then if [ "${LOCAL_ADDR}" = "cn" ];then
if [ ! -f ${APP_DIR}/haproxy-${VERSION}.tar.gz ];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 wget -O ${APP_DIR}/haproxy-${VERSION}.tar.gz https://dl.midoks.icu/soft/haproxy/haproxy-${VERSION}.tar.gz
fi fi
@@ -39,7 +39,7 @@ Install_App()
if [ ! -f ${APP_DIR}/haproxy-${VERSION}.tar.gz ];then 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 wget --no-check-certificate -O ${APP_DIR}/haproxy-${VERSION}.tar.gz https://www.haproxy.org/download/${MIN_VERSION}/src/haproxy-${VERSION}.tar.gz
else else
curl -sSLo ${APP_DIR}/haproxy-${VERSION}.tar.gz https://www.haproxy.org/download/${MIN_VERSION}/src/haproxy-${VERSION}.tar.gz 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 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 cd ${APP_DIR}/haproxy-${VERSION} && make TARGET=osx && make install PREFIX=$serverPath/haproxy
else else
cd ${APP_DIR}/haproxy-${VERSION} && make TARGET=linux-glibc && make install PREFIX=$serverPath/haproxy cd ${APP_DIR}/haproxy-${VERSION} && make TARGET=linux-glibc && make install PREFIX=$serverPath/haproxy
@@ -94,7 +94,7 @@ Uninstall_App()
} }
action=$1 action=$1
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_App Install_App
else else
Uninstall_App Uninstall_App
+5 -5
View File
@@ -26,12 +26,12 @@ Install_App()
LOCAL_ADDR=common LOCAL_ADDR=common
cn=$(curl -fsSL -m 10 -s http://ipinfo.io/json | grep "\"country\": \"CN\"") 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 LOCAL_ADDR=cn
fi fi
if [ "${LOCAL_ADDR}" == "cn" ];then if [ "${LOCAL_ADDR}" = "cn" ];then
if [ ! -f ${APP_DIR}/haproxy-${VERSION}.tar.gz ];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 wget -O ${APP_DIR}/haproxy-${VERSION}.tar.gz https://dl.midoks.icu/soft/haproxy/haproxy-${VERSION}.tar.gz
fi fi
@@ -39,7 +39,7 @@ Install_App()
if [ ! -f ${APP_DIR}/haproxy-${VERSION}.tar.gz ];then 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 wget --no-check-certificate -O ${APP_DIR}/haproxy-${VERSION}.tar.gz https://www.haproxy.org/download/${MIN_VERSION}/src/haproxy-${VERSION}.tar.gz
else else
curl -sSLo ${APP_DIR}/haproxy-${VERSION}.tar.gz https://www.haproxy.org/download/${MIN_VERSION}/src/haproxy-${VERSION}.tar.gz 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 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 cd ${APP_DIR}/haproxy-${VERSION} && make TARGET=osx && make install PREFIX=$serverPath/haproxy
else else
cd ${APP_DIR}/haproxy-${VERSION} && make TARGET=linux-glibc && make install PREFIX=$serverPath/haproxy cd ${APP_DIR}/haproxy-${VERSION} && make TARGET=linux-glibc && make install PREFIX=$serverPath/haproxy
@@ -94,7 +94,7 @@ Uninstall_App()
} }
action=$1 action=$1
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_App Install_App
else else
Uninstall_App Uninstall_App
+5 -5
View File
@@ -26,12 +26,12 @@ Install_App()
LOCAL_ADDR=common LOCAL_ADDR=common
cn=$(curl -fsSL -m 10 -s http://ipinfo.io/json | grep "\"country\": \"CN\"") 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 LOCAL_ADDR=cn
fi fi
if [ "${LOCAL_ADDR}" == "cn" ];then if [ "${LOCAL_ADDR}" = "cn" ];then
if [ ! -f ${APP_DIR}/haproxy-${VERSION}.tar.gz ];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 wget -O ${APP_DIR}/haproxy-${VERSION}.tar.gz https://dl.midoks.icu/soft/haproxy/haproxy-${VERSION}.tar.gz
fi fi
@@ -39,7 +39,7 @@ Install_App()
if [ ! -f ${APP_DIR}/haproxy-${VERSION}.tar.gz ];then 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 wget --no-check-certificate -O ${APP_DIR}/haproxy-${VERSION}.tar.gz https://www.haproxy.org/download/${MIN_VERSION}/src/haproxy-${VERSION}.tar.gz
else else
curl -sSLo ${APP_DIR}/haproxy-${VERSION}.tar.gz https://www.haproxy.org/download/${MIN_VERSION}/src/haproxy-${VERSION}.tar.gz 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 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 cd ${APP_DIR}/haproxy-${VERSION} && make TARGET=osx && make install PREFIX=$serverPath/haproxy
else else
cd ${APP_DIR}/haproxy-${VERSION} && make TARGET=linux-glibc && make install PREFIX=$serverPath/haproxy cd ${APP_DIR}/haproxy-${VERSION} && make TARGET=linux-glibc && make install PREFIX=$serverPath/haproxy
@@ -94,7 +94,7 @@ Uninstall_App()
} }
action=$1 action=$1
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_App Install_App
else else
Uninstall_App Uninstall_App
+5 -5
View File
@@ -26,12 +26,12 @@ Install_App()
LOCAL_ADDR=common LOCAL_ADDR=common
cn=$(curl -fsSL -m 10 -s http://ipinfo.io/json | grep "\"country\": \"CN\"") 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 LOCAL_ADDR=cn
fi fi
if [ "${LOCAL_ADDR}" == "cn" ];then if [ "${LOCAL_ADDR}" = "cn" ];then
if [ ! -f ${APP_DIR}/haproxy-${VERSION}.tar.gz ];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 wget -O ${APP_DIR}/haproxy-${VERSION}.tar.gz https://dl.midoks.icu/soft/haproxy/haproxy-${VERSION}.tar.gz
fi fi
@@ -39,7 +39,7 @@ Install_App()
if [ ! -f ${APP_DIR}/haproxy-${VERSION}.tar.gz ];then 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 wget --no-check-certificate -O ${APP_DIR}/haproxy-${VERSION}.tar.gz https://www.haproxy.org/download/${MIN_VERSION}/src/haproxy-${VERSION}.tar.gz
else else
curl -sSLo ${APP_DIR}/haproxy-${VERSION}.tar.gz https://www.haproxy.org/download/${MIN_VERSION}/src/haproxy-${VERSION}.tar.gz 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 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 cd ${APP_DIR}/haproxy-${VERSION} && make TARGET=osx && make install PREFIX=$serverPath/haproxy
else else
cd ${APP_DIR}/haproxy-${VERSION} && make TARGET=linux-glibc && make install PREFIX=$serverPath/haproxy cd ${APP_DIR}/haproxy-${VERSION} && make TARGET=linux-glibc && make install PREFIX=$serverPath/haproxy
@@ -94,7 +94,7 @@ Uninstall_App()
} }
action=$1 action=$1
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_App Install_App
else else
Uninstall_App Uninstall_App
+1 -1
View File
@@ -10,7 +10,7 @@ serverPath=$(dirname "$rootPath")
action=$1 action=$1
type=$2 type=$2
if [ "${2}" == "" ];then if [ "${2}" = "" ];then
echo '缺少安装脚本...' echo '缺少安装脚本...'
exit 0 exit 0
fi fi
+3 -3
View File
@@ -21,9 +21,9 @@ ARCH="amd64"
get_arch() { get_arch() {
TMP_ARCH=`arch` TMP_ARCH=`arch`
if [ "$TMP_ARCH" == "x86_64" ];then if [ "$TMP_ARCH" = "x86_64" ];then
ARCH="amd64" ARCH="amd64"
elif [ "$TMP_ARCH" == "aarch64" ];then elif [ "$TMP_ARCH" = "aarch64" ];then
ARCH="arm64" ARCH="arm64"
else else
echo $ARCH echo $ARCH
@@ -104,7 +104,7 @@ Uninstall_App()
} }
action=$1 action=$1
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_App Install_App
else else
Uninstall_App Uninstall_App
+1 -1
View File
@@ -91,7 +91,7 @@ Uninstall_App()
} }
action=$1 action=$1
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_App Install_App
else else
Uninstall_App Uninstall_App
+1 -1
View File
@@ -11,7 +11,7 @@ rootPath=$(dirname "$curPath")
SOFT=$1 SOFT=$1
if [ "$SOFT" == "mysql" ];then if [ "$SOFT" = "mysql" ];then
bash ${rootPath}/keepalived/scripts/chk_mysql.sh > ${rootPath}/keepalived/keepalived.log bash ${rootPath}/keepalived/scripts/chk_mysql.sh > ${rootPath}/keepalived/keepalived.log
else else
echo "you should use [chk.sh mysql] exp ." echo "you should use [chk.sh mysql] exp ."
+4 -4
View File
@@ -11,10 +11,10 @@ serverPath=$(dirname "$rootPath")
# cd /www/server/mdserver-web && python3 plugins/lam/index.py start # cd /www/server/mdserver-web && python3 plugins/lam/index.py start
if [ -f ${rootPath}/bin/activate ];then if [ -f ${rootPath}/bin/activate ];then
source ${rootPath}/bin/activate . ${rootPath}/bin/activate
fi fi
if [ "$sys_os" == "Darwin" ];then if [ "$sys_os" = "Darwin" ];then
BAK='_bak' BAK='_bak'
else else
BAK='' BAK=''
@@ -23,7 +23,7 @@ fi
sysName=`uname` sysName=`uname`
echo "use system: ${sysName}" echo "use system: ${sysName}"
if [ "${sysName}" == "Darwin" ]; then if [ "${sysName}" = "Darwin" ]; then
OSNAME='macos' OSNAME='macos'
elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then
OSNAME='centos' OSNAME='centos'
@@ -83,7 +83,7 @@ Uninstall_App()
} }
action=$1 action=$1
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_App $2 Install_App $2
else else
Uninstall_App $2 Uninstall_App $2
+1 -1
View File
@@ -38,7 +38,7 @@ Uninstall_App()
} }
action=$1 action=$1
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_App Install_App
else else
Uninstall_App Uninstall_App
+1 -1
View File
@@ -37,7 +37,7 @@ Uninstall_App()
} }
action=$1 action=$1
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_App Install_App
else else
Uninstall_App Uninstall_App
+4 -4
View File
@@ -18,17 +18,17 @@ sysName=`uname`
echo "use system: ${sysName}" echo "use system: ${sysName}"
OSNAME=`bash ${rootPath}/scripts/getos.sh` OSNAME=`bash ${rootPath}/scripts/getos.sh`
if [ "" == "$OSNAME" ];then if [ "" = "$OSNAME" ];then
OSNAME=`cat ${rootPath}/data/osname.pl` OSNAME=`cat ${rootPath}/data/osname.pl`
fi fi
if [ "macos" == "$OSNAME" ];then if [ "macos" = "$OSNAME" ];then
echo "不支持Macox" echo "不支持Macox"
exit exit
fi fi
if [ -f ${rootPath}/bin/activate ];then if [ -f ${rootPath}/bin/activate ];then
source ${rootPath}/bin/activate . ${rootPath}/bin/activate
fi fi
# if id grafana &> /dev/null ;then # if id grafana &> /dev/null ;then
@@ -77,7 +77,7 @@ Uninstall_App()
} }
action=$1 action=$1
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_App Install_App
else else
Uninstall_App Uninstall_App
+4 -4
View File
@@ -17,11 +17,11 @@ sysArch=`arch`
sysName=`uname` sysName=`uname`
ARCH_NAME=amd64 ARCH_NAME=amd64
if [ "$sysArch" == "arm64" ];then if [ "$sysArch" = "arm64" ];then
ARCH_NAME=arm64 ARCH_NAME=arm64
elif [ "$sysArch" == "x86_64" ]; then elif [ "$sysArch" = "x86_64" ]; then
ARCH_NAME=amd64 ARCH_NAME=amd64
elif [ "$sysArch" == "aarch64" ]; then elif [ "$sysArch" = "aarch64" ]; then
ARCH_NAME=aarch64 ARCH_NAME=aarch64
fi 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\"]]}]}" -d "{\"streams\": [{\"stream\": {\"test\": \"test\"}, \"values\": [[\"$timestamp\", \"test message\"]]}]}"
action=${1} action=${1}
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_App Install_App
else else
Uninstall_App Uninstall_App
+7 -7
View File
@@ -18,7 +18,7 @@ Install_LVS(){
mkdir -p $serverPath/source mkdir -p $serverPath/source
which ipvsadm which ipvsadm
if [ "$?" == "0" ];then if [ "$?" = "0" ];then
echo '已安装LVS!!' echo '已安装LVS!!'
exit 0 exit 0
fi fi
@@ -27,17 +27,17 @@ Install_LVS(){
# 检测平台命令 # 检测平台命令
which apt which apt
if [ "$?" == "0" ];then if [ "$?" = "0" ];then
apt install -y ipvsadm apt install -y ipvsadm
fi fi
which yum which yum
if [ "$?" == "0" ];then if [ "$?" = "0" ];then
yum install -y ipvsadm yum install -y ipvsadm
fi fi
which ipvsadm which ipvsadm
if [ "$?" == "0" ];then if [ "$?" = "0" ];then
echo '正在安装LVS成功!' echo '正在安装LVS成功!'
mkdir -p $serverPath/lvs mkdir -p $serverPath/lvs
@@ -59,12 +59,12 @@ Uninstall_LVS()
{ {
# 检测平台命令 # 检测平台命令
which apt which apt
if [ "$?" == "0" ];then if [ "$?" = "0" ];then
apt remove -y ipvsadm apt remove -y ipvsadm
fi fi
which yum which yum
if [ "$?" == "0" ];then if [ "$?" = "0" ];then
yum uninstall -y ipvsadm yum uninstall -y ipvsadm
fi fi
echo "卸载LVS完成" echo "卸载LVS完成"
@@ -75,7 +75,7 @@ Uninstall_LVS()
} }
action=$1 action=$1
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_LVS Install_LVS
else else
Uninstall_LVS Uninstall_LVS
+3 -3
View File
@@ -16,18 +16,18 @@ sysArch=`arch`
# systemctl restart manticore # systemctl restart manticore
if [ -f ${rootPath}/bin/activate ];then if [ -f ${rootPath}/bin/activate ];then
source ${rootPath}/bin/activate . ${rootPath}/bin/activate
fi fi
ACTION=$1 ACTION=$1
VERSION=$2 VERSION=$2
which apt which apt
if [ "$?" == "0" ];then if [ "$?" = "0" ];then
sh -x $curPath/versions/apt/install.sh $1 $2 sh -x $curPath/versions/apt/install.sh $1 $2
fi fi
which yum which yum
if [ "$?" == "0" ];then if [ "$?" = "0" ];then
sh -x $curPath/versions/yum/install.sh $1 $2 sh -x $curPath/versions/yum/install.sh $1 $2
fi fi
@@ -10,7 +10,7 @@ sysName=`uname`
sysArch=`arch` sysArch=`arch`
if [ -f ${rootPath}/bin/activate ];then if [ -f ${rootPath}/bin/activate ];then
source ${rootPath}/bin/activate . ${rootPath}/bin/activate
fi fi
VERSION=$2 VERSION=$2
@@ -64,7 +64,7 @@ Uninstall_App()
} }
action=$1 action=$1
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_App Install_App
else else
Uninstall_App Uninstall_App
@@ -11,7 +11,7 @@ sysArch=`arch`
if [ -f ${rootPath}/bin/activate ];then if [ -f ${rootPath}/bin/activate ];then
source ${rootPath}/bin/activate . ${rootPath}/bin/activate
fi fi
VERSION=$2 VERSION=$2
@@ -60,7 +60,7 @@ Uninstall_App()
} }
action=$1 action=$1
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_App Install_App
else else
Uninstall_App Uninstall_App
+6 -6
View File
@@ -878,7 +878,7 @@ def importDbExternalProgress():
file = args['file'] file = args['file']
name = args['name'] 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+'"}' 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) return mw.returnJson(True, 'ok',cmd)
@@ -2601,7 +2601,7 @@ def initSlaveStatusSSH(version=''):
username='root', pkey=key) username='root', pkey=key)
db_user = data['db_user'] 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) stdin, stdout, stderr = ssh.exec_command(cmd)
result = stdout.read() result = stdout.read()
result = result.decode('utf-8') result = result.decode('utf-8')
@@ -2753,7 +2753,7 @@ def syncDatabaseRepairLog(version=''):
sync_args_sign = args['sign'] sync_args_sign = args['sign']
op = args['op'] op = args['op']
tmp_log = syncDatabaseRepairTempFile() 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) # print(cmd)
if op == 'get': if op == 'get':
@@ -3062,7 +3062,7 @@ def fullSyncCmd():
db = args['db'] db = args['db']
sign = args['sign'] 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) return mw.returnJson(True,'ok',cmd)
# python3 plugins/mariadb/index.py do_full_sync {"db":"demo1","sign":"","beigin":"1"} # 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}) writeDbSyncStatus({'code': 0, 'msg': '登录Master成功...', 'progress': 5})
dbname = args['db'] 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) print(cmd)
stdin, stdout, stderr = ssh.exec_command(cmd) stdin, stdout, stderr = ssh.exec_command(cmd)
result = stdout.read() result = stdout.read()
@@ -3270,7 +3270,7 @@ def doFullSyncSSH(version=''):
if copy_status == None: if copy_status == None:
writeDbSyncStatus({'code': 2, 'msg': '数据同步本地完成...', 'progress': 40}) 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) stdin, stdout, stderr = ssh.exec_command(cmd)
result = stdout.read() result = stdout.read()
result = result.decode('utf-8') result = result.decode('utf-8')
+8 -8
View File
@@ -8,11 +8,11 @@ rootPath=$(dirname "$rootPath")
serverPath=$(dirname "$rootPath") serverPath=$(dirname "$rootPath")
# cd /www/server/mdserver-web/plugins/mariadb && bash install.sh install 8.2 # 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 && . 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 && . 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 && . 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 && . 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 install_pre_inspection
action=$1 action=$1
@@ -26,7 +26,7 @@ else
useradd -g mysql -s /usr/sbin/nologin mysql useradd -g mysql -s /usr/sbin/nologin mysql
fi fi
if [ "${2}" == "" ];then if [ "${2}" = "" ];then
echo '缺少安装脚本...' echo '缺少安装脚本...'
exit 0 exit 0
fi fi
@@ -36,7 +36,7 @@ if [ ! -d $curPath/versions/$2 ];then
exit 0 exit 0
fi fi
if [ "${action}" == "uninstall" ];then if [ "${action}" = "uninstall" ];then
if [ -f /usr/lib/systemd/system/mariadb.service ] || [ -f /lib/systemd/system/mariadb.service ];then if [ -f /usr/lib/systemd/system/mariadb.service ] || [ -f /lib/systemd/system/mariadb.service ];then
systemctl stop mariadb systemctl stop mariadb
@@ -49,7 +49,7 @@ fi
sh -x $curPath/versions/$2/install.sh $1 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 start ${type}
cd ${rootPath} && python3 ${rootPath}/plugins/mariadb/index.py initd_install ${type} cd ${rootPath} && python3 ${rootPath}/plugins/mariadb/index.py initd_install ${type}
+1 -1
View File
@@ -113,7 +113,7 @@ Uninstall_app()
} }
action=$1 action=$1
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_app Install_app
else else
Uninstall_app Uninstall_app
+3 -3
View File
@@ -65,13 +65,13 @@ Install_app()
fi fi
OPTIONS='' OPTIONS=''
if [ "$sysName" == "Darwin" ];then if [ "$sysName" = "Darwin" ];then
OPTIONS='-DPLUGIN_TOKUDB=NO' OPTIONS='-DPLUGIN_TOKUDB=NO'
fi fi
INSTALL_CMD=cmake INSTALL_CMD=cmake
CMAKE3=`which cmake3` CMAKE3=`which cmake3`
if [ "$?" == "0" ];then if [ "$?" = "0" ];then
INSTALL_CMD=cmake3 INSTALL_CMD=cmake3
fi fi
@@ -116,7 +116,7 @@ Uninstall_app()
} }
action=$1 action=$1
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_app Install_app
else else
Uninstall_app Uninstall_app
+1 -1
View File
@@ -103,7 +103,7 @@ Uninstall_app()
} }
action=$1 action=$1
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_app Install_app
else else
Uninstall_app Uninstall_app
+1 -1
View File
@@ -103,7 +103,7 @@ Uninstall_app()
} }
action=$1 action=$1
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_app Install_app
else else
Uninstall_app Uninstall_app
+1 -1
View File
@@ -113,7 +113,7 @@ Uninstall_app()
} }
action=$1 action=$1
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_app Install_app
else else
Uninstall_app Uninstall_app
+1 -1
View File
@@ -113,7 +113,7 @@ Uninstall_app()
} }
action=$1 action=$1
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_app Install_app
else else
Uninstall_app Uninstall_app
+1 -1
View File
@@ -113,7 +113,7 @@ Uninstall_app()
} }
action=$1 action=$1
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_app Install_app
else else
Uninstall_app Uninstall_app
+1 -1
View File
@@ -113,7 +113,7 @@ Uninstall_app()
} }
action=$1 action=$1
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_app Install_app
else else
Uninstall_app Uninstall_app
+1 -1
View File
@@ -113,7 +113,7 @@ Uninstall_app()
} }
action=$1 action=$1
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_app Install_app
else else
Uninstall_app Uninstall_app
+1 -1
View File
@@ -113,7 +113,7 @@ Uninstall_app()
} }
action=$1 action=$1
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_app Install_app
else else
Uninstall_app Uninstall_app
+1 -1
View File
@@ -113,7 +113,7 @@ Uninstall_app()
} }
action=$1 action=$1
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_app Install_app
else else
Uninstall_app Uninstall_app
+1 -1
View File
@@ -113,7 +113,7 @@ Uninstall_app()
} }
action=$1 action=$1
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_app Install_app
else else
Uninstall_app Uninstall_app
+1 -1
View File
@@ -113,7 +113,7 @@ Uninstall_app()
} }
action=$1 action=$1
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_app Install_app
else else
Uninstall_app Uninstall_app
+1 -1
View File
@@ -113,7 +113,7 @@ Uninstall_app()
} }
action=$1 action=$1
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_app Install_app
else else
Uninstall_app Uninstall_app
+1 -1
View File
@@ -113,7 +113,7 @@ Uninstall_app()
} }
action=$1 action=$1
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_app Install_app
else else
Uninstall_app Uninstall_app
+1 -1
View File
@@ -113,7 +113,7 @@ Uninstall_app()
} }
action=$1 action=$1
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_app Install_app
else else
Uninstall_app Uninstall_app
+2 -2
View File
@@ -24,7 +24,7 @@ Install_mem(){
cd $serverPath/source/memcached && tar -zxvf memcached.tar.gz cd $serverPath/source/memcached && tar -zxvf memcached.tar.gz
OPTIONS='' 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}'` 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}" OPTIONS="${OPTIONS} --with-libevent=${LIB_DEPEND_DIR}"
fi fi
@@ -68,7 +68,7 @@ Uninstall_mem()
# /www/server/memcached/bin/memcached -d -p 11211 -u root -m 100 -c 100 # /www/server/memcached/bin/memcached -d -p 11211 -u root -m 100 -c 100
action=$1 action=$1
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_mem Install_mem
else else
Uninstall_mem Uninstall_mem
+1 -1
View File
@@ -98,7 +98,7 @@ class classApi:
os.remove(log_file) os.remove(log_file)
plugins_dir = mw.getServerDir() + '/mdserver-web' 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) plugins_dir, log_file_error)
# mw.execShell(exe) # mw.execShell(exe)
# os.system(exe) # os.system(exe)
+2 -2
View File
@@ -9,7 +9,7 @@ rootPath=$(dirname "$rootPath")
serverPath=$(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 VERSION=1.0
@@ -25,7 +25,7 @@ Uninstall_App()
} }
action=$1 action=$1
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_App Install_App
else else
Uninstall_App Uninstall_App
+3 -3
View File
@@ -465,7 +465,7 @@ def setConfigAuth():
def runInfo(): 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() client = mongdbClient()
db = client.admin db = client.admin
@@ -1451,7 +1451,7 @@ def importDbBackup():
def testData(): 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 import pymongo
from pymongo import ReadPreference from pymongo import ReadPreference
@@ -1470,7 +1470,7 @@ def testData():
def test(): def test():
''' '''
python3 /www/server/mdserver-web/plugins/mongodb/index.py set_config_auth {} 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 python3 plugins/mongodb/index.py test
''' '''
# https://pymongo.readthedocs.io/en/stable/examples/high_availability.html # https://pymongo.readthedocs.io/en/stable/examples/high_availability.html
+18 -18
View File
@@ -23,9 +23,9 @@ SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | a
Install_app_mac() Install_app_mac()
{ {
mkdir -p $serverPath/mongodb mkdir -p $serverPath/mongodb
if [ "$VERSION" == "5.0" ];then if [ "$VERSION" = "5.0" ];then
G_VERSION="5.0.11" G_VERSION="5.0.11"
elif [[ "$VERSION" == "4.4" ]]; then elif [[ "$VERSION" = "4.4" ]]; then
G_VERSION="4.4.11" G_VERSION="4.4.11"
fi fi
@@ -41,7 +41,7 @@ Install_app_mac()
Install_Linux_Ubuntu() Install_Linux_Ubuntu()
{ {
##################### Ubuntu start ##################### ##################### Ubuntu start #####################
if [ "$SYS_VERSION_ID" == "22" ]; then if [ "$SYS_VERSION_ID" = "22" ]; then
echo "Not yet supported" echo "Not yet supported"
exit 1 exit 1
fi fi
@@ -52,11 +52,11 @@ fi
echo $SYS_VERSION_ID echo $SYS_VERSION_ID
SOURCE_NAME=bionic SOURCE_NAME=bionic
if [ "$SYS_VERSION_ID" == "18.04" ];then if [ "$SYS_VERSION_ID" = "18.04" ];then
SOURCE_NAME=bionic SOURCE_NAME=bionic
elif [ "$SYS_VERSION_ID" == "16.04" ];then elif [ "$SYS_VERSION_ID" = "16.04" ];then
SOURCE_NAME=xenial SOURCE_NAME=xenial
elif [ "$SYS_VERSION_ID" == "20.04" ];then elif [ "$SYS_VERSION_ID" = "20.04" ];then
SOURCE_NAME=focal SOURCE_NAME=focal
fi fi
@@ -210,13 +210,13 @@ rm -rf /etc/yum.repos.d/mongodb-org-${VERSION}.repo
Install_app_linux() Install_app_linux()
{ {
if [ "$OSNAME" == "ubuntu" ];then if [ "$OSNAME" = "ubuntu" ];then
Install_Linux_Ubuntu Install_Linux_Ubuntu
elif [ "$OSNAME" == "debian" ];then elif [ "$OSNAME" = "debian" ];then
Install_Linux_Debian Install_Linux_Debian
elif [ "$OSNAME" == "centos" ];then elif [ "$OSNAME" = "centos" ];then
Install_Linux_CentOS Install_Linux_CentOS
elif [ "$OSNAME" == "opensuse" ];then elif [ "$OSNAME" = "opensuse" ];then
Install_Linux_Opensuse Install_Linux_Opensuse
else else
echo "Not yet supported" echo "Not yet supported"
@@ -230,13 +230,13 @@ Install_app()
echo '正在安装脚本文件...' echo '正在安装脚本文件...'
mkdir -p $serverPath/source mkdir -p $serverPath/source
if [ "macos" == "$OSNAME" ];then if [ "macos" = "$OSNAME" ];then
Install_app_mac Install_app_mac
else else
Install_app_linux Install_app_linux
fi fi
if [ "$?" == "0" ];then if [ "$?" = "0" ];then
mkdir -p $serverPath/mongodb mkdir -p $serverPath/mongodb
echo "${VERSION}" > $serverPath/mongodb/version.pl echo "${VERSION}" > $serverPath/mongodb/version.pl
echo '安装完成' echo '安装完成'
@@ -252,13 +252,13 @@ Install_app()
Uninstall_app_linux() Uninstall_app_linux()
{ {
################## ##################
if [ "$OSNAME" == "ubuntu" ];then if [ "$OSNAME" = "ubuntu" ];then
Uninstall_Linux_Ubuntu Uninstall_Linux_Ubuntu
elif [ "$OSNAME" == "debian" ];then elif [ "$OSNAME" = "debian" ];then
Uninstall_Linux_Debian Uninstall_Linux_Debian
elif [ "$OSNAME" == "centos" ];then elif [ "$OSNAME" = "centos" ];then
Uninstall_Linux_CentOS Uninstall_Linux_CentOS
elif [ "$OSNAME" == "opensuse" ];then elif [ "$OSNAME" = "opensuse" ];then
Uninstall_Linux_Opensuse Uninstall_Linux_Opensuse
else else
echo "ok" echo "ok"
@@ -268,7 +268,7 @@ fi
Uninstall_app() Uninstall_app()
{ {
if [ "macos" == "$OSNAME" ];then if [ "macos" = "$OSNAME" ];then
echo 'mac' echo 'mac'
else else
Uninstall_app_linux Uninstall_app_linux
@@ -279,7 +279,7 @@ Uninstall_app()
} }
action=$1 action=$1
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_app Install_app
else else
Uninstall_app Uninstall_app
+2 -2
View File
@@ -79,7 +79,7 @@ Install_app()
--ssl=off CPPPATH=$serverPath/lib/openssl/include \ --ssl=off CPPPATH=$serverPath/lib/openssl/include \
LIBPATH=$serverPath/lib/openssl/lib" LIBPATH=$serverPath/lib/openssl/lib"
if [ "$?" == "0" ];then if [ "$?" = "0" ];then
mkdir -p $serverPath/mongodb mkdir -p $serverPath/mongodb
echo "${VERSION}" > $serverPath/mongodb/version.pl echo "${VERSION}" > $serverPath/mongodb/version.pl
echo '安装完成' echo '安装完成'
@@ -99,7 +99,7 @@ Uninstall_app()
} }
action=$1 action=$1
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_app Install_app
else else
Uninstall_app Uninstall_app
+5 -25
View File
@@ -34,7 +34,7 @@ echo "use system: ${sysName}"
OSNAME=`bash ${rootPath}/scripts/getos.sh` OSNAME=`bash ${rootPath}/scripts/getos.sh`
if [ "" == "$OSNAME" ];then if [ "" = "$OSNAME" ];then
OSNAME=`cat ${rootPath}/data/osname.pl` OSNAME=`cat ${rootPath}/data/osname.pl`
fi fi
@@ -43,33 +43,13 @@ if [ "macos" != "$OSNAME" ];then
fi fi
if [ -f ${rootPath}/bin/activate ];then if [ -f ${rootPath}/bin/activate ];then
source ${rootPath}/bin/activate . ${rootPath}/bin/activate
fi fi
Install_app() Install_app()
{ {
echo '正在安装脚本文件...' echo '正在安装脚本文件...'
mkdir -p $serverPath/source 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 cd ${rootPath}/plugins/php/lib && /bin/bash openssl_11.sh
shell_file=${curPath}/versions/${VERSION}/${OSNAME}.sh shell_file=${curPath}/versions/${VERSION}/${OSNAME}.sh
@@ -86,7 +66,7 @@ Install_app()
exit 1 exit 1
fi fi
if [ "$?" == "0" ];then if [ "$?" = "0" ];then
mkdir -p $serverPath/mongodb mkdir -p $serverPath/mongodb
echo "${VERSION}" > $serverPath/mongodb/version.pl echo "${VERSION}" > $serverPath/mongodb/version.pl
echo 'mongodb安装完成' echo 'mongodb安装完成'
@@ -96,7 +76,7 @@ Install_app()
cd ${rootPath} && python3 ${rootPath}/plugins/mongodb/index.py initd_install cd ${rootPath} && python3 ${rootPath}/plugins/mongodb/index.py initd_install
fi fi
if [ "${VERSION}" == "3.0" ];then if [ "${VERSION}" = "3.0" ];then
# 降低版本 # 降低版本
pip install pymongo==3.12.0 pip install pymongo==3.12.0
else else
@@ -122,7 +102,7 @@ Uninstall_app()
} }
action=$1 action=$1
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_app Install_app
else else
Uninstall_app Uninstall_app
+2 -2
View File
@@ -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=${SYS_VERSION_ID/./}
SYS_NAME_LEN=`echo "$SYS_NAME" | wc -L` 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 SYS_NAME=${SYS_NAME}0
fi fi
if [ "$SYS_ARCH" == "aarch64" ];then if [ "$SYS_ARCH" = "aarch64" ];then
if [ "$SYS_NAME" -gt "82" ];then if [ "$SYS_NAME" -gt "82" ];then
SYS_NAME="82" SYS_NAME="82"
fi fi
+1 -1
View File
@@ -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=${SYS_VERSION_ID/./}
SYS_NAME_LEN=`echo "$SYS_NAME" | wc -L` 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 SYS_NAME=${SYS_NAME}0
fi fi
+5 -5
View File
@@ -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=${SYS_VERSION_ID/./}
SYS_NAME_LEN=`echo "$SYS_NAME" | wc -L` 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 SYS_NAME=${SYS_NAME}0
fi fi
if [ "$SYS_ARCH" == "aarch64" ];then if [ "$SYS_ARCH" = "aarch64" ];then
if [ "$SYS_NAME" -gt "82" ];then if [ "$SYS_NAME" -gt "82" ];then
SYS_NAME="82" SYS_NAME="82"
fi fi
@@ -70,7 +70,7 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
#--------------- mongosh tool install ------------------ # #--------------- mongosh tool install ------------------ #
TOOL_VERSION=2.2.5 TOOL_VERSION=2.2.5
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64 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 TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
fi fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
@@ -89,11 +89,11 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
#--------------- mongodb database install ------------------ # #--------------- mongodb database install ------------------ #
TOOL_VERSION=100.9.4 TOOL_VERSION=100.9.4
TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-x86_64-${TOOL_VERSION} 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} TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-aarch64-${TOOL_VERSION}
fi fi
if [ "arm64" == ${SYS_ARCH} ];then if [ "arm64" = ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-arm64-${TOOL_VERSION} TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-arm64-${TOOL_VERSION}
fi fi
+3 -3
View File
@@ -47,7 +47,7 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
#--------------- mongosh tool install ------------------ # #--------------- mongosh tool install ------------------ #
TOOL_VERSION=2.2.5 TOOL_VERSION=2.2.5
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64 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 TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
fi fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz 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 ------------------ # #--------------- mongodb database install ------------------ #
TOOL_VERSION=100.16.1 TOOL_VERSION=100.16.1
TOOL_FILE_NAME=mongodb-database-tools-debian${SYS_NAME}-x86_64-${TOOL_VERSION} 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} TOOL_FILE_NAME=mongodb-database-tools-debian${SYS_NAME}-arm64-${TOOL_VERSION}
fi fi
if [ "arm64" == ${SYS_ARCH} ];then if [ "arm64" = ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-debian${SYS_NAME}-arm64-${TOOL_VERSION} TOOL_FILE_NAME=mongodb-database-tools-debian${SYS_NAME}-arm64-${TOOL_VERSION}
fi fi
+4 -4
View File
@@ -30,11 +30,11 @@ fi
#--------------- mongosh tool install ------------------ # #--------------- mongosh tool install ------------------ #
TOOL_VERSION=2.2.5 TOOL_VERSION=2.2.5
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-darwin-x64 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 TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-darwin-arm64
fi fi
if [ "arm64" == ${SYS_ARCH} ];then if [ "arm64" = ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-darwin-arm64 TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-darwin-arm64
fi fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.zip 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 # https://fastdl.mongodb.org/tools/db/mongodb-database-tools-macos-arm64-100.9.4.zip
TOOL_VERSION=100.9.4 TOOL_VERSION=100.9.4
TOOL_FILE_NAME=mongodb-database-tools-macos-x86_64-${TOOL_VERSION} 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} TOOL_FILE_NAME=mongodb-database-tools-macos-arm64-${TOOL_VERSION}
fi fi
if [ "arm64" == ${SYS_ARCH} ];then if [ "arm64" = ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-macos-arm64-${TOOL_VERSION} TOOL_FILE_NAME=mongodb-database-tools-macos-arm64-${TOOL_VERSION}
fi fi
+3 -3
View File
@@ -50,7 +50,7 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
#--------------- mongosh tool install ------------------ # #--------------- mongosh tool install ------------------ #
TOOL_VERSION=2.2.5 TOOL_VERSION=2.2.5
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64 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 TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
fi fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz 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 ------------------ # #--------------- mongodb database install ------------------ #
TOOL_VERSION=100.9.4 TOOL_VERSION=100.9.4
TOOL_FILE_NAME=mongodb-database-tools-suse${SYS_NAME}-x86_64-${TOOL_VERSION} 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} TOOL_FILE_NAME=mongodb-database-tools-suse${SYS_NAME}-arm64-${TOOL_VERSION}
fi fi
if [ "arm64" == ${SYS_ARCH} ];then if [ "arm64" = ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-suse${SYS_NAME}-arm64-${TOOL_VERSION} TOOL_FILE_NAME=mongodb-database-tools-suse${SYS_NAME}-arm64-${TOOL_VERSION}
fi fi
+2 -2
View File
@@ -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=${SYS_VERSION_ID/./}
SYS_NAME_LEN=`echo "$SYS_NAME" | wc -L` 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 SYS_NAME=${SYS_NAME}0
fi fi
@@ -46,7 +46,7 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
#--------------- mongosh tool install ------------------ # #--------------- mongosh tool install ------------------ #
TOOL_VERSION=2.2.5 TOOL_VERSION=2.2.5
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64 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 TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
fi fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
+3 -3
View File
@@ -48,7 +48,7 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
#--------------- mongosh tool install ------------------ # #--------------- mongosh tool install ------------------ #
TOOL_VERSION=2.2.5 TOOL_VERSION=2.2.5
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64 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 TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
fi fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz 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 ------------------ # #--------------- mongodb database install ------------------ #
TOOL_VERSION=100.9.4 TOOL_VERSION=100.9.4
TOOL_FILE_NAME=mongodb-database-tools-ubuntu${SYS_NAME}-x86_64-${TOOL_VERSION} 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} TOOL_FILE_NAME=mongodb-database-tools-ubuntu${SYS_NAME}-arm64-${TOOL_VERSION}
fi fi
if [ "arm64" == ${SYS_ARCH} ];then if [ "arm64" = ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-ubuntu${SYS_NAME}-arm64-${TOOL_VERSION} TOOL_FILE_NAME=mongodb-database-tools-ubuntu${SYS_NAME}-arm64-${TOOL_VERSION}
fi fi
+5 -5
View File
@@ -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=${SYS_VERSION_ID/./}
SYS_NAME_LEN=`echo "$SYS_NAME" | wc -L` 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 SYS_NAME=${SYS_NAME}0
fi fi
if [ "$SYS_ARCH" == "aarch64" ];then if [ "$SYS_ARCH" = "aarch64" ];then
SYS_NAME="82" SYS_NAME="82"
else else
@@ -57,7 +57,7 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
#--------------- mongosh tool install ------------------ # #--------------- mongosh tool install ------------------ #
TOOL_VERSION=2.2.5 TOOL_VERSION=2.2.5
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64 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 TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
fi fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz 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 ------------------ # #--------------- mongodb database install ------------------ #
TOOL_VERSION=100.9.4 TOOL_VERSION=100.9.4
TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-x86_64-${TOOL_VERSION} 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} TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-aarch64-${TOOL_VERSION}
fi fi
if [ "arm64" == ${SYS_ARCH} ];then if [ "arm64" = ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-arm64-${TOOL_VERSION} TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-arm64-${TOOL_VERSION}
fi fi
+3 -3
View File
@@ -47,7 +47,7 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
#--------------- mongosh tool install ------------------ # #--------------- mongosh tool install ------------------ #
TOOL_VERSION=2.2.5 TOOL_VERSION=2.2.5
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64 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 TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
fi fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz 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 ------------------ # #--------------- mongodb database install ------------------ #
TOOL_VERSION=100.9.4 TOOL_VERSION=100.9.4
TOOL_FILE_NAME=mongodb-database-tools-debian${SYS_NAME}-x86_64-${TOOL_VERSION} 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} TOOL_FILE_NAME=mongodb-database-tools-debian${SYS_NAME}-arm64-${TOOL_VERSION}
fi fi
if [ "arm64" == ${SYS_ARCH} ];then if [ "arm64" = ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-debian${SYS_NAME}-arm64-${TOOL_VERSION} TOOL_FILE_NAME=mongodb-database-tools-debian${SYS_NAME}-arm64-${TOOL_VERSION}
fi fi
+4 -4
View File
@@ -30,11 +30,11 @@ fi
#--------------- mongosh tool install ------------------ # #--------------- mongosh tool install ------------------ #
TOOL_VERSION=2.2.5 TOOL_VERSION=2.2.5
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-darwin-x64 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 TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-darwin-arm64
fi fi
if [ "arm64" == ${SYS_ARCH} ];then if [ "arm64" = ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-darwin-arm64 TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-darwin-arm64
fi fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.zip 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 # https://fastdl.mongodb.org/tools/db/mongodb-database-tools-macos-arm64-100.9.4.zip
TOOL_VERSION=100.9.4 TOOL_VERSION=100.9.4
TOOL_FILE_NAME=mongodb-database-tools-macos-x86_64-${TOOL_VERSION} 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} TOOL_FILE_NAME=mongodb-database-tools-macos-arm64-${TOOL_VERSION}
fi fi
if [ "arm64" == ${SYS_ARCH} ];then if [ "arm64" = ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-macos-arm64-${TOOL_VERSION} TOOL_FILE_NAME=mongodb-database-tools-macos-arm64-${TOOL_VERSION}
fi fi
+3 -3
View File
@@ -50,7 +50,7 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
#--------------- mongosh tool install ------------------ # #--------------- mongosh tool install ------------------ #
TOOL_VERSION=2.2.5 TOOL_VERSION=2.2.5
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64 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 TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
fi fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz 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 ------------------ # #--------------- mongodb database install ------------------ #
TOOL_VERSION=100.9.4 TOOL_VERSION=100.9.4
TOOL_FILE_NAME=mongodb-database-tools-suse${SYS_NAME}-x86_64-${TOOL_VERSION} 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} TOOL_FILE_NAME=mongodb-database-tools-suse${SYS_NAME}-arm64-${TOOL_VERSION}
fi fi
if [ "arm64" == ${SYS_ARCH} ];then if [ "arm64" = ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-suse${SYS_NAME}-arm64-${TOOL_VERSION} TOOL_FILE_NAME=mongodb-database-tools-suse${SYS_NAME}-arm64-${TOOL_VERSION}
fi fi
+3 -3
View File
@@ -48,7 +48,7 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
#--------------- mongosh tool install ------------------ # #--------------- mongosh tool install ------------------ #
TOOL_VERSION=2.2.5 TOOL_VERSION=2.2.5
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64 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 TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
fi fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz 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 ------------------ # #--------------- mongodb database install ------------------ #
TOOL_VERSION=100.9.4 TOOL_VERSION=100.9.4
TOOL_FILE_NAME=mongodb-database-tools-ubuntu${SYS_NAME}-x86_64-${TOOL_VERSION} 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} TOOL_FILE_NAME=mongodb-database-tools-ubuntu${SYS_NAME}-arm64-${TOOL_VERSION}
fi fi
if [ "arm64" == ${SYS_ARCH} ];then if [ "arm64" = ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-ubuntu${SYS_NAME}-arm64-${TOOL_VERSION} TOOL_FILE_NAME=mongodb-database-tools-ubuntu${SYS_NAME}-arm64-${TOOL_VERSION}
fi fi

Some files were not shown because too many files have changed in this diff Show More