Merge pull request #561 from midoks/dev

0.16.7
pull/565/head 0.16.7
Mr Chen 1 year ago committed by GitHub
commit ad63a22a7e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 5
      README.md
  2. 2
      class/core/config_api.py
  3. 6
      class/core/crontab_api.py
  4. 5
      class/core/mw.py
  5. 109
      plugins/data_query/nosql_mongodb.py
  6. 2
      plugins/mariadb/js/mariadb.js
  7. 18
      plugins/mongodb/config/mongodb.bak.conf
  8. 36
      plugins/mongodb/config/mongodb.conf
  9. 19
      plugins/mongodb/config/mongodb.sql
  10. 53
      plugins/mongodb/index.html
  11. 1323
      plugins/mongodb/index.py
  12. 5
      plugins/mongodb/info.json
  13. 5
      plugins/mongodb/install.sh
  14. 1097
      plugins/mongodb/js/mongodb.js
  15. 234
      plugins/mongodb/scripts/backup.py
  16. 42
      plugins/mongodb/versions/4.4/centos.sh
  17. 43
      plugins/mongodb/versions/4.4/debian.sh
  18. 50
      plugins/mongodb/versions/4.4/macos.sh
  19. 46
      plugins/mongodb/versions/4.4/opensuse.sh
  20. 21
      plugins/mongodb/versions/4.4/rhel.sh
  21. 45
      plugins/mongodb/versions/4.4/ubuntu.sh
  22. 42
      plugins/mongodb/versions/5.0/centos.sh
  23. 42
      plugins/mongodb/versions/5.0/debian.sh
  24. 50
      plugins/mongodb/versions/5.0/macos.sh
  25. 43
      plugins/mongodb/versions/5.0/opensuse.sh
  26. 43
      plugins/mongodb/versions/5.0/ubuntu.sh
  27. 46
      plugins/mongodb/versions/6.0/centos.sh
  28. 43
      plugins/mongodb/versions/6.0/debian.sh
  29. 50
      plugins/mongodb/versions/6.0/macos.sh
  30. 43
      plugins/mongodb/versions/6.0/opensuse.sh
  31. 43
      plugins/mongodb/versions/6.0/ubuntu.sh
  32. 47
      plugins/mongodb/versions/7.0/centos.sh
  33. 46
      plugins/mongodb/versions/7.0/debian.sh
  34. 56
      plugins/mongodb/versions/7.0/macos.sh
  35. 50
      plugins/mongodb/versions/7.0/opensuse.sh
  36. 48
      plugins/mongodb/versions/7.0/ubuntu.sh
  37. 2
      plugins/mysql-apt/js/mysql-apt.js
  38. 2
      plugins/mysql-yum/js/mysql-yum.js
  39. 4
      plugins/mysql/js/mysql.js
  40. 2
      plugins/php/js/php.js
  41. 2
      plugins/tgbot/startup/extend/push_ad.py
  42. 2
      plugins/tgbot/startup/extend/push_notice_msg.py
  43. 3
      requirements.txt
  44. 2
      route/static/app/crontab.js
  45. 4
      route/static/app/public.js
  46. 5
      setting.py

@ -110,10 +110,9 @@ docker run -itd --name mw-server --privileged=true -p 7200:7200 -p 80:80 -p 443:
```
### 版本更新 0.16.6
### 版本更新 0.16.7
- openresty【1.25.3.1】配置更新,支持h3;
- 修复php83的扩展bcmath在centos7安装出错。
- mongodb副本设置/备份/认证。
### JSDelivr安装地址

@ -28,7 +28,7 @@ from flask import request
class config_api:
__version = '0.16.6'
__version = '0.16.7'
__api_addr = 'data/api.json'
# 统一默认配置文件

@ -396,14 +396,16 @@ class crontab_api:
if soft_name == 'postgresql':
sqlite3_name = 'pgsql'
if soft_name == 'mongodb':
sqlite3_name = 'mongodb'
db_list = {}
db_list['orderOpt'] = bak_data
if not os.path.exists(path + '/' + sqlite3_name + '.db'):
db_list['data'] = []
else:
db_list['data'] = mw.M('databases').dbPos(
path, sqlite3_name).field('name,ps').select()
db_list['data'] = mw.M('databases').dbPos(path, sqlite3_name).field('name,ps').select()
return mw.getJson(db_list)
if stype == 'path':

@ -908,6 +908,11 @@ def aesDecrypt_Crypto(data, key, vi):
text_decrypted = text_decrypted.decode('utf8').rstrip() # 去掉补位的右侧空格
return text_decrypted
def getDefault(data,val,def_val=''):
if val in data:
return data[val]
return def_val
def encodeImage(imgsrc, newsrc):
# 图片加密
import struct

@ -7,6 +7,7 @@ import time
import re
import pymongo
import json
import yaml
from bson.objectid import ObjectId
from bson.json_util import dumps
@ -23,6 +24,95 @@ def singleton(cls):
return _instance[cls]
return inner
def getPluginName():
return 'mongodb'
def getPluginDir():
return mw.getPluginDir() + '/' + getPluginName()
def getServerDir():
return mw.getServerDir() + '/' + getPluginName()
def getConf():
path = getServerDir() + "/mongodb.conf"
return path
def getConfTpl():
path = getPluginDir() + "/config/mongodb.conf"
return path
def pSqliteDb(dbname='users'):
file = getServerDir() + '/mongodb.db'
name = 'mongodb'
sql_file = getPluginDir() + '/config/mongodb.sql'
import_sql = mw.readFile(sql_file)
# print(sql_file,import_sql)
md5_sql = mw.md5(import_sql)
import_sign = False
save_md5_file = getServerDir() + '/import_mongodb.md5'
if os.path.exists(save_md5_file):
save_md5_sql = mw.readFile(save_md5_file)
if save_md5_sql != md5_sql:
import_sign = True
mw.writeFile(save_md5_file, md5_sql)
else:
mw.writeFile(save_md5_file, md5_sql)
if not os.path.exists(file) or import_sql:
conn = mw.M(dbname).dbPos(getServerDir(), name)
csql_list = import_sql.split(';')
for index in range(len(csql_list)):
conn.execute(csql_list[index], ())
conn = mw.M(dbname).dbPos(getServerDir(), name)
return conn
def getConfigData():
cfg = getConf()
# print(cfg)
config_data = mw.readFile(cfg)
try:
config = yaml.safe_load(config_data)
except:
config = {
"systemLog": {
"destination": "file",
"logAppend": True,
"path": mw.getServerDir()+"/mongodb/log/mongodb.log"
},
"storage": {
"dbPath": mw.getServerDir()+"/mongodb/data",
"directoryPerDB": True,
"journal": {
"enabled": True
}
},
"processManagement": {
"fork": True,
"pidFilePath": mw.getServerDir()+"/mongodb/log/mongodb.pid"
},
"net": {
"port": 27017,
"bindIp": "0.0.0.0"
},
"security": {
"authorization": "disabled",
"javascriptEnabled": False
}
}
return config
def getConfPort():
data = getConfigData()
return data['net']['port']
def getConfAuth():
data = getConfigData()
return data['security']['authorization']
@singleton
class nosqlMongodb():
@ -49,15 +139,22 @@ class nosqlMongodb():
if not self.__DB_LOCAL:
self.__DB_PORT = int(self.__config['port'])
# print(self.__DB_HOST,self.__DB_PORT, self.__DB_PASS)
auth = getConfAuth()
port = getConfPort()
mg_root = pSqliteDb('config').where('id=?', (1,)).getField('mg_root')
# print(auth,self.__DB_HOST,port, self.__DB_PASS)
try:
self.__DB_CONN = pymongo.MongoClient(host=self.__DB_HOST, port=self.__DB_PORT, maxPoolSize=10)
if auth == 'disabled':
self.__DB_CONN = pymongo.MongoClient(host=self.__DB_HOST, port=port, directConnection=True)
else:
self.__DB_CONN = pymongo.MongoClient(host=self.__DB_HOST, port=port, directConnection=True, username='root',password=mg_root)
self.__DB_CONN.admin.command('ping')
return self.__DB_CONN
except pymongo.errors.ConnectionFailure:
return False
except Exception:
self.__DB_ERR = mw.get_error_info()
except Exception as e:
# print(e)
self.__DB_ERR = mw.getTracebackInfo()
return False
# 获取配置项
@ -122,7 +219,7 @@ class nosqlMongodbCtr():
mgdb_instance = self.getInstanceBySid(sid).mgdb_conn()
if mgdb_instance is False:
return mw.returnData(False,'无法链接')
return mw.returnData(False,'无法链接.')
result = {}
collections = mgdb_instance[name].list_collection_names()
@ -164,7 +261,7 @@ class nosqlMongodbCtr():
where[mg_field] = re.compile(mg_value)
# print(where)
result = collection_instance.find(where).skip(start_index).limit(size).sort({'_id':-1})
result = collection_instance.find(where).skip(start_index).limit(size).sort('_id',-1)
count = collection_instance.count_documents(where)
d = []
for document in result:

@ -1153,7 +1153,7 @@ function dbList(page, search){
list += '<td><span class="c9 input-edit" onclick="setDbPs(\''+rdata.data[i]['id']+'\',\''+rdata.data[i]['name']+'\',this)" style="display: inline-block;">'+rdata.data[i]['ps']+'</span></td>';
list += '<td style="text-align:right">';
list += '<a href="javascript:;" class="btlink" class="btlink" onclick="setBackup(\''+rdata.data[i]['name']+'\')" title="数据库备份">'+(rdata.data[i]['is_backup']?'备份':'未备份') +'</a> | ';
list += '<a href="javascript:;" class="btlink" class="btlink" onclick="setBackup(\''+rdata.data[i]['name']+'\')" title="数据库备份">'+(rdata.data[i]['is_backup']?'备份':'未备份') +'</a> | ';
var rw = '';
var rw_change = 'all';

@ -0,0 +1,18 @@
directoryperdb = true
dbpath = {$SERVER_PATH}/mongodb/data
logpath = {$SERVER_PATH}/mongodb/logs/mongodb.log
logappend = true
bind_ip = 127.0.0.1
port = 27017
fork = true
auth = false
#smallfiles = true
oplogSize=100
# Master/slave replication is no longer supported
#master = true
#replSet = test
pidfilepath = {$SERVER_PATH}/mongodb/mongodb.pid

@ -1,17 +1,19 @@
dbpath = {$SERVER_PATH}/mongodb/data
logpath = {$SERVER_PATH}/mongodb/logs/mongodb.log
logappend = true
bind_ip = 127.0.0.1
port = 27017
fork = true
auth = false
#smallfiles = true
oplogSize=100
# Master/slave replication is no longer supported
#master = true
#replSet = test
pidfilepath = {$SERVER_PATH}/mongodb/mongodb.pid
net:
bindIp: 127.0.0.1
port: 27017
processManagement:
fork: true
pidFilePath: {$SERVER_PATH}/mongodb/mongodb.pid
security:
authorization: disabled
javascriptEnabled: false
storage:
dbPath: {$SERVER_PATH}/mongodb/data
directoryPerDB: true
systemLog:
destination: file
logAppend: true
logRotate: reopen
path: {$SERVER_PATH}/mongodb/logs/mongodb.log
replication:
oplogSizeMB: 2048

@ -0,0 +1,19 @@
CREATE TABLE IF NOT EXISTS `config` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`mg_root` TEXT
);
INSERT INTO `config` (`id`, `mg_root`) VALUES (1, 'mg_root');
CREATE TABLE IF NOT EXISTS `databases` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`name` TEXT,
`username` TEXT,
`password` TEXT,
`accept` TEXT,
`rw` TEXT DEFAULT 'rw',
`ps` TEXT,
`addtime` TEXT
);

@ -6,7 +6,48 @@
white-space: nowrap;
display: inline-block;
vertical-align: middle;
}
}
.bingfa .bt-input-text {
width: 200px;
}
.inlineBlock {
display: inline-block;
}
.db_list{
padding: 0px 0 10px 0;
font-size: 13px;
line-height: 35px;
height: 45px;
}
.db_list a{
margin-right: 15px;
color: #555;
font-weight: 600;
}
.db_list span:nth-child(1){
display: block;
float: left;
padding-left: 15px;
background: #ececec;
border-radius: 3px;
}
#db_tools button {
margin-right: 10px;
}
#db_tools button:last-child{
margin-right: 0;
}
.conf_p span {
display: inline-block;
margin-right: 10px;
width: 115px;
text-align: right;
}
</style>
<div class="bt-form">
@ -14,9 +55,12 @@
<div class="bt-w-menu">
<p class="bgw" onclick="pluginService('mongodb');">服务</p>
<p onclick="pluginInitD('mongodb');">自启动</p>
<p onclick="pluginConfig('mongodb');">配置修改</p>
<p onclick="mongoStatus();">负载状态</p>
<p onclick="mongoSetConfig();">配置修改</p>
<p onclick="pluginConfig('mongodb');">配置文件</p>
<p onclick="pluginConfig('mongodb','','config_key');">配置[KEY]</p>
<p onclick="dbList();">数据列表</p>
<p onclick="mongoDocStatus();">文档状态</p>
<p onclick="mongoStatus();">负载状态</p>
<p onclick="mongoReplStatus();">复制状态</p>
<p onclick="pluginLogs('mongodb','','run_log');">日志</p>
</div>
@ -25,9 +69,12 @@
</div>
</div>
</div>
<!-- <script type="text/javascript" src="/plugins/file?name=mongodb&f=js/mongodb.js"></script> -->
<script type="text/javascript">
//mongodb start
resetPluginWinHeight(530);
resetPluginWinWidth(800);
$.getScript('/plugins/file?name=mongodb&f=js/mongodb.js', function(){
pluginService('mongodb');
});

File diff suppressed because it is too large Load Diff

@ -1,8 +1,9 @@
{
"sort": 7,
"ps": "一个高性能的NOSQL数据库",
"hook":["database"],
"ps": "一个高性能的NOSQL数据库【社区版】",
"name": "mongodb",
"title": "Mongodb",
"title": "MongoDB",
"shell": "install.sh",
"install_pre_inspection":true,
"versions":["4.4","5.0","6.0","7.0"],

@ -4,7 +4,7 @@ export PATH
# https://www.mongodb.com/try/download/community
# cd /Users/midoks/Desktop/mwdev/server/mdserver-web/plugins/mongodb && /bin/bash install.sh install 5.0.4
# cd /Users/midoks/Desktop/mwdev/server/mdserver-web/plugins/mongodb && /bin/bash install.sh install 7.0
# cd /www/server/mdserver-web/plugins/mongodb && /bin/bash install.sh install 7.0
# cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/mongodb/index.py start
@ -31,6 +31,9 @@ if [ "macos" != "$OSNAME" ];then
SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F "\"" '{print $2}'`
fi
if [ -f ${rootPath}/bin/activate ];then
source ${rootPath}/bin/activate
fi
Install_app()
{
echo '正在安装脚本文件...' > $install_tmp

File diff suppressed because it is too large Load Diff

@ -0,0 +1,234 @@
# coding: utf-8
#-----------------------------
# 网站备份工具
#-----------------------------
import sys
import os
import re
if sys.platform != 'darwin':
os.chdir('/www/server/mdserver-web')
chdir = os.getcwd()
sys.path.append(chdir + '/class/core')
# reload(sys)
# sys.setdefaultencoding('utf-8')
import mw
import db
import time
import yaml
def getPluginName():
return 'mongodb'
def getPluginDir():
return mw.getPluginDir() + '/' + getPluginName()
def getServerDir():
return mw.getServerDir() + '/' + getPluginName()
def getConf():
path = getServerDir() + "/mongodb.conf"
return path
def getConfigData():
cfg = getConf()
config_data = mw.readFile(cfg)
try:
config = yaml.safe_load(config_data)
except:
config = {
"systemLog": {
"destination": "file",
"logAppend": True,
"path": mw.getServerDir()+"/mongodb/log/mongodb.log"
},
"storage": {
"dbPath": mw.getServerDir()+"/mongodb/data",
"directoryPerDB": True,
"journal": {
"enabled": True
}
},
"processManagement": {
"fork": True,
"pidFilePath": mw.getServerDir()+"/mongodb/log/mongodb.pid"
},
"net": {
"port": 27017,
"bindIp": "0.0.0.0"
},
"security": {
"authorization": "enabled",
"javascriptEnabled": False
}
}
return config
def getConfIp():
data = getConfigData()
return data['net']['bindIp']
def getConfPort():
data = getConfigData()
return data['net']['port']
def getConfAuth():
data = getConfigData()
return data['security']['authorization']
def pSqliteDb(dbname='users'):
file = getServerDir() + '/mongodb.db'
name = 'mongodb'
sql_file = getPluginDir() + '/config/mongodb.sql'
import_sql = mw.readFile(sql_file)
# print(sql_file,import_sql)
md5_sql = mw.md5(import_sql)
import_sign = False
save_md5_file = getServerDir() + '/import_mongodb.md5'
if os.path.exists(save_md5_file):
save_md5_sql = mw.readFile(save_md5_file)
if save_md5_sql != md5_sql:
import_sign = True
mw.writeFile(save_md5_file, md5_sql)
else:
mw.writeFile(save_md5_file, md5_sql)
if not os.path.exists(file) or import_sql:
conn = mw.M(dbname).dbPos(getServerDir(), name)
csql_list = import_sql.split(';')
for index in range(len(csql_list)):
conn.execute(csql_list[index], ())
conn = mw.M(dbname).dbPos(getServerDir(), name)
return conn
def mongdbClient():
import pymongo
port = getConfPort()
auth = getConfAuth()
ip = getConfIp()
mg_root = pSqliteDb('config').where('id=?', (1,)).getField('mg_root')
# print(ip,port,auth,mg_root)
if auth == 'disabled':
client = pymongo.MongoClient(host=ip, port=int(port), directConnection=True)
else:
# uri = "mongodb://root:"+mg_root+"@127.0.0.1:"+str(port)
# client = pymongo.MongoClient(uri)
client = pymongo.MongoClient(host=ip, port=int(port), directConnection=True, username='root',password=mg_root)
return client
class backupTools:
def getDbBackupList(self,dbname=''):
bkDir = mw.getRootDir() + '/backup/database'
blist = os.listdir(bkDir)
r = []
bname = 'mongodb_' + dbname
blen = len(bname)
for x in blist:
fbstr = x[0:blen]
if fbstr == bname:
r.append(x)
return r
def backupDatabase(self, name, count):
db_path = mw.getServerDir() + '/mongodb'
db_name = 'mongodb'
name = mw.M('databases').dbPos(db_path, db_name).where('name=?', (name,)).getField('name')
startTime = time.time()
if not name:
endDate = time.strftime('%Y/%m/%d %X', time.localtime())
log = "数据库[" + name + "]不存在!"
print("★[" + endDate + "] " + log)
print(
"----------------------------------------------------------------------------")
return
backup_path = mw.getBackupDir() + '/database'
if not os.path.exists(backup_path):
mw.execShell("mkdir -p " + backup_path)
time_now = time.strftime('%Y%m%d_%H%M%S', time.localtime())
backup_name = "mongodb_" + name + "_" + time_now + ".tar.gz"
filename = backup_path + "/"+backup_name
port = getConfPort()
auth = getConfAuth()
mg_root = pSqliteDb('config').where('id=?', (1,)).getField('mg_root')
uoption = ''
if auth != 'disabled':
uoption =' --authenticationDatabase admin -u root -p '+mg_root
cmd = db_path + "/bin/mongodump "+uoption+" --port "+str(port)+" -d test -o "+backup_path
# print(cmd)
mw.execShell(cmd)
cmd_gz = "cd "+backup_path+"/"+name+" && tar -zcvf "+filename + " ./"
mw.execShell(cmd_gz)
mw.execShell("rm -rf "+ backup_path+"/"+name)
if not os.path.exists(filename):
endDate = time.strftime('%Y/%m/%d %X', time.localtime())
log = "数据库[" + name + "]备份失败!"
print("★[" + endDate + "] " + log)
print("----------------------------------------------------------------------------")
return
endDate = time.strftime('%Y/%m/%d %X', time.localtime())
outTime = time.time() - startTime
# print(outTime)
log = "数据库MongoDB[" + name + "]备份成功,用时[" + str(round(outTime, 2)) + "]秒"
mw.writeLog('计划任务', log)
print("★[" + endDate + "] " + log)
print("|---保留最新的[" + count + "]份备份")
print("|---文件名:" + filename)
backups = self.getDbBackupList(name)
# 清理多余备份
num = len(backups) - int(count)
if num > 0:
for backup in backups:
mw.execShell("rm -f " + backup_path + "/"+backup)
num -= 1
print("|---已清理过期备份文件:" + backup)
if num < 1:
break
def backupDatabaseAll(self, save):
db_path = mw.getServerDir() + '/mongodb'
db_name = 'mongodb'
databases = mw.M('databases').dbPos(
db_path, db_name).field('name').select()
for db in databases:
self.backupDatabase(db['name'], save)
def findPathName(self, path, filename):
f = os.scandir(path)
l = []
for ff in f:
if ff.name.find(filename) > -1:
l.append(ff.name)
return l
if __name__ == "__main__":
backup = backupTools()
stype = sys.argv[1]
if stype == 'all':
backup.backupDatabaseAll(sys.argv[2])
if stype == 'database':
backup.backupDatabase(sys.argv[2], sys.argv[3])

@ -67,3 +67,45 @@ if [ ! -d $serverPath/mongodb/bin ];then
fi
cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
#--------------- mongosh tool install ------------------ #
TOOL_VERSION=2.2.5
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64
if [ "aarch64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
if [ ! -f $MG_DIR/${TOOL_FILE_NAME_TGZ} ]; then
wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://downloads.mongodb.com/compass/${TOOL_FILE_NAME_TGZ}
echo "wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://downloads.mongodb.com/compass/${TOOL_FILE_NAME_TGZ}"
fi
if [ ! -d $MG_DIR/${TOOL_FILE_NAME_TGZ} ];then
cd $MG_DIR && tar -zxvf ${TOOL_FILE_NAME_TGZ}
fi
cd ${MG_DIR}/${TOOL_FILE_NAME} && cp -rf ./bin $serverPath/mongodb
cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
#--------------- mongodb database install ------------------ #
TOOL_VERSION=100.9.4
TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-x86_64-${TOOL_VERSION}
if [ "aarch64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-aarch64-${TOOL_VERSION}
fi
if [ "arm64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-arm64-${TOOL_VERSION}
fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
if [ ! -f $MG_DIR/${TOOL_FILE_NAME_TGZ} ]; then
wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://fastdl.mongodb.org/tools/db/${TOOL_FILE_NAME_TGZ}
fi
if [ ! -d $MG_DIR/${TOOL_FILE_NAME_TGZ} ];then
cd $MG_DIR && tar -zxvf ${TOOL_FILE_NAME_TGZ}
fi
cd ${MG_DIR}/${TOOL_FILE_NAME} && cp -rf ./bin $serverPath/mongodb
cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}

@ -44,3 +44,46 @@ if [ ! -d $serverPath/mongodb/bin ];then
fi
cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
#--------------- mongosh tool install ------------------ #
TOOL_VERSION=2.2.5
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64
if [ "aarch64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
if [ ! -f $MG_DIR/${TOOL_FILE_NAME_TGZ} ]; then
wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://downloads.mongodb.com/compass/${TOOL_FILE_NAME_TGZ}
echo "wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://downloads.mongodb.com/compass/${TOOL_FILE_NAME_TGZ}"
fi
if [ ! -d $MG_DIR/${TOOL_FILE_NAME_TGZ} ];then
cd $MG_DIR && tar -zxvf ${TOOL_FILE_NAME_TGZ}
fi
cd ${MG_DIR}/${TOOL_FILE_NAME} && cp -rf ./bin $serverPath/mongodb
cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
#--------------- mongodb database install ------------------ #
TOOL_VERSION=100.9.4
TOOL_FILE_NAME=mongodb-database-tools-debian${SYS_NAME}-x86_64-${TOOL_VERSION}
if [ "aarch64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-debian${SYS_NAME}-arm64-${TOOL_VERSION}
fi
if [ "arm64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-debian${SYS_NAME}-arm64-${TOOL_VERSION}
fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.zip
if [ ! -f $MG_DIR/${TOOL_FILE_NAME_TGZ} ]; then
wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://fastdl.mongodb.org/tools/db/${TOOL_FILE_NAME_TGZ}
fi
if [ ! -d $MG_DIR/${TOOL_FILE_NAME_TGZ} ];then
cd $MG_DIR && tar -zxvf ${TOOL_FILE_NAME_TGZ}
fi
cd ${MG_DIR}/${TOOL_FILE_NAME} && cp -rf ./bin $serverPath/mongodb
cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}

@ -26,4 +26,52 @@ fi
if [ ! -d $serverPath/mongodb/bin ];then
mkdir -p $serverPath/mongodb
cd $MG_DIR/mongodb-macos-x86_64-${VERSION} && cp -rf ./bin $serverPath/mongodb
fi
fi
#--------------- mongosh tool install ------------------ #
TOOL_VERSION=2.2.5
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-darwin-x64
if [ "aarch64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-darwin-arm64
fi
if [ "arm64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-darwin-arm64
fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.zip
if [ ! -f $MG_DIR/${TOOL_FILE_NAME_TGZ} ]; then
wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://downloads.mongodb.com/compass/${TOOL_FILE_NAME_TGZ}
echo "wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://downloads.mongodb.com/compass/${TOOL_FILE_NAME_TGZ}"
fi
if [ ! -d $MG_DIR/${TOOL_FILE_NAME_TGZ} ];then
cd $MG_DIR && unzip ${TOOL_FILE_NAME_TGZ}
fi
cd ${MG_DIR}/${TOOL_FILE_NAME} && cp -rf ./bin $serverPath/mongodb
cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
#--------------- mongodb-database-tools ------------------ #
# https://fastdl.mongodb.org/tools/db/mongodb-database-tools-macos-arm64-100.9.4.zip
TOOL_VERSION=100.9.4
TOOL_FILE_NAME=mongodb-database-tools-macos-x86_64-${TOOL_VERSION}
if [ "aarch64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-macos-arm64-${TOOL_VERSION}
fi
if [ "arm64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-macos-arm64-${TOOL_VERSION}
fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.zip
if [ ! -f $MG_DIR/${TOOL_FILE_NAME_TGZ} ]; then
wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://fastdl.mongodb.org/tools/db/${TOOL_FILE_NAME_TGZ}
echo "wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://fastdl.mongodb.org/tools/db/${TOOL_FILE_NAME_TGZ}"
fi
if [ ! -d $MG_DIR/${TOOL_FILE_NAME_TGZ} ];then
cd $MG_DIR && unzip ${TOOL_FILE_NAME_TGZ}
fi
cd ${MG_DIR}/${TOOL_FILE_NAME} && cp -rf ./bin $serverPath/mongodb
cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}

@ -46,4 +46,48 @@ if [ ! -d $serverPath/mongodb/bin ];then
cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb
fi
cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
#--------------- mongosh tool install ------------------ #
TOOL_VERSION=2.2.5
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64
if [ "aarch64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
if [ ! -f $MG_DIR/${TOOL_FILE_NAME_TGZ} ]; then
wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://downloads.mongodb.com/compass/${TOOL_FILE_NAME_TGZ}
echo "wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://downloads.mongodb.com/compass/${TOOL_FILE_NAME_TGZ}"
fi
if [ ! -d $MG_DIR/${TOOL_FILE_NAME_TGZ} ];then
cd $MG_DIR && tar -zxvf ${TOOL_FILE_NAME_TGZ}
fi
cd ${MG_DIR}/${TOOL_FILE_NAME} && cp -rf ./bin $serverPath/mongodb
cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
# https://fastdl.mongodb.org/tools/db/mongodb-database-tools-suse12-x86_64-100.9.4.tgz
#--------------- mongodb database install ------------------ #
TOOL_VERSION=100.9.4
TOOL_FILE_NAME=mongodb-database-tools-suse${SYS_NAME}-x86_64-${TOOL_VERSION}
if [ "aarch64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-suse${SYS_NAME}-arm64-${TOOL_VERSION}
fi
if [ "arm64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-suse${SYS_NAME}-arm64-${TOOL_VERSION}
fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
if [ ! -f $MG_DIR/${TOOL_FILE_NAME_TGZ} ]; then
wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://fastdl.mongodb.org/tools/db/${TOOL_FILE_NAME_TGZ}
fi
if [ ! -d $MG_DIR/${TOOL_FILE_NAME_TGZ} ];then
cd $MG_DIR && tar -zxvf ${TOOL_FILE_NAME_TGZ}
fi
cd ${MG_DIR}/${TOOL_FILE_NAME} && cp -rf ./bin $serverPath/mongodb
cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}

@ -42,4 +42,23 @@ if [ ! -d $serverPath/mongodb/bin ];then
cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb
fi
cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
#--------------- mongosh tool install ------------------ #
TOOL_VERSION=2.2.5
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64
if [ "aarch64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
if [ ! -f $MG_DIR/${TOOL_FILE_NAME_TGZ} ]; then
wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://downloads.mongodb.com/compass/${TOOL_FILE_NAME_TGZ}
echo "wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://downloads.mongodb.com/compass/${TOOL_FILE_NAME_TGZ}"
fi
if [ ! -d $MG_DIR/${TOOL_FILE_NAME_TGZ} ];then
cd $MG_DIR && tar -zxvf ${TOOL_FILE_NAME_TGZ}
fi
cd ${MG_DIR}/${TOOL_FILE_NAME} && cp -rf ./bin $serverPath/mongodb
cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}

@ -44,4 +44,47 @@ if [ ! -d $serverPath/mongodb/bin ];then
cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb
fi
cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
#--------------- mongosh tool install ------------------ #
TOOL_VERSION=2.2.5
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64
if [ "aarch64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
if [ ! -f $MG_DIR/${TOOL_FILE_NAME_TGZ} ]; then
wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://downloads.mongodb.com/compass/${TOOL_FILE_NAME_TGZ}
echo "wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://downloads.mongodb.com/compass/${TOOL_FILE_NAME_TGZ}"
fi
if [ ! -d $MG_DIR/${TOOL_FILE_NAME_TGZ} ];then
cd $MG_DIR && tar -zxvf ${TOOL_FILE_NAME_TGZ}
fi
cd ${MG_DIR}/${TOOL_FILE_NAME} && cp -rf ./bin $serverPath/mongodb
cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
# https://fastdl.mongodb.org/tools/db/mongodb-database-tools-ubuntu2204-x86_64-100.9.4.tgz
#--------------- mongodb database install ------------------ #
TOOL_VERSION=100.9.4
TOOL_FILE_NAME=mongodb-database-tools-ubuntu${SYS_NAME}-x86_64-${TOOL_VERSION}
if [ "aarch64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-ubuntu${SYS_NAME}-arm64-${TOOL_VERSION}
fi
if [ "arm64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-ubuntu${SYS_NAME}-arm64-${TOOL_VERSION}
fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
if [ ! -f $MG_DIR/${TOOL_FILE_NAME_TGZ} ]; then
wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://fastdl.mongodb.org/tools/db/${TOOL_FILE_NAME_TGZ}
fi
if [ ! -d $MG_DIR/${TOOL_FILE_NAME_TGZ} ];then
cd $MG_DIR && tar -zxvf ${TOOL_FILE_NAME_TGZ}
fi
cd ${MG_DIR}/${TOOL_FILE_NAME} && cp -rf ./bin $serverPath/mongodb
cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}

@ -54,3 +54,45 @@ if [ ! -d $serverPath/mongodb/bin ];then
fi
cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
#--------------- mongosh tool install ------------------ #
TOOL_VERSION=2.2.5
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64
if [ "aarch64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
if [ ! -f $MG_DIR/${TOOL_FILE_NAME_TGZ} ]; then
wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://downloads.mongodb.com/compass/${TOOL_FILE_NAME_TGZ}
echo "wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://downloads.mongodb.com/compass/${TOOL_FILE_NAME_TGZ}"
fi
if [ ! -d $MG_DIR/${TOOL_FILE_NAME_TGZ} ];then
cd $MG_DIR && tar -zxvf ${TOOL_FILE_NAME_TGZ}
fi
cd ${MG_DIR}/${TOOL_FILE_NAME} && cp -rf ./bin $serverPath/mongodb
cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
#--------------- mongodb database install ------------------ #
TOOL_VERSION=100.9.4
TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-x86_64-${TOOL_VERSION}
if [ "aarch64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-aarch64-${TOOL_VERSION}
fi
if [ "arm64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-arm64-${TOOL_VERSION}
fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
if [ ! -f $MG_DIR/${TOOL_FILE_NAME_TGZ} ]; then
wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://fastdl.mongodb.org/tools/db/${TOOL_FILE_NAME_TGZ}
fi
if [ ! -d $MG_DIR/${TOOL_FILE_NAME_TGZ} ];then
cd $MG_DIR && tar -zxvf ${TOOL_FILE_NAME_TGZ}
fi
cd ${MG_DIR}/${TOOL_FILE_NAME} && cp -rf ./bin $serverPath/mongodb
cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}

@ -44,3 +44,45 @@ if [ ! -d $serverPath/mongodb/bin ];then
fi
cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
#--------------- mongosh tool install ------------------ #
TOOL_VERSION=2.2.5
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64
if [ "aarch64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
if [ ! -f $MG_DIR/${TOOL_FILE_NAME_TGZ} ]; then
wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://downloads.mongodb.com/compass/${TOOL_FILE_NAME_TGZ}
echo "wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://downloads.mongodb.com/compass/${TOOL_FILE_NAME_TGZ}"
fi
if [ ! -d $MG_DIR/${TOOL_FILE_NAME_TGZ} ];then
cd $MG_DIR && tar -zxvf ${TOOL_FILE_NAME_TGZ}
fi
cd ${MG_DIR}/${TOOL_FILE_NAME} && cp -rf ./bin $serverPath/mongodb
cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
#--------------- mongodb database install ------------------ #
TOOL_VERSION=100.9.4
TOOL_FILE_NAME=mongodb-database-tools-debian${SYS_NAME}-x86_64-${TOOL_VERSION}
if [ "aarch64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-debian${SYS_NAME}-arm64-${TOOL_VERSION}
fi
if [ "arm64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-debian${SYS_NAME}-arm64-${TOOL_VERSION}
fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.zip
if [ ! -f $MG_DIR/${TOOL_FILE_NAME_TGZ} ]; then
wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://fastdl.mongodb.org/tools/db/${TOOL_FILE_NAME_TGZ}
fi
if [ ! -d $MG_DIR/${TOOL_FILE_NAME_TGZ} ];then
cd $MG_DIR && tar -zxvf ${TOOL_FILE_NAME_TGZ}
fi
cd ${MG_DIR}/${TOOL_FILE_NAME} && cp -rf ./bin $serverPath/mongodb
cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}

@ -26,4 +26,52 @@ fi
if [ ! -d $serverPath/mongodb/bin ];then
mkdir -p $serverPath/mongodb
cd $MG_DIR/mongodb-macos-x86_64-${VERSION} && cp -rf ./bin $serverPath/mongodb
fi
fi
#--------------- mongosh tool install ------------------ #
TOOL_VERSION=2.2.5
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-darwin-x64
if [ "aarch64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-darwin-arm64
fi
if [ "arm64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-darwin-arm64
fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.zip
if [ ! -f $MG_DIR/${TOOL_FILE_NAME_TGZ} ]; then
wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://downloads.mongodb.com/compass/${TOOL_FILE_NAME_TGZ}
echo "wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://downloads.mongodb.com/compass/${TOOL_FILE_NAME_TGZ}"
fi
if [ ! -d $MG_DIR/${TOOL_FILE_NAME_TGZ} ];then
cd $MG_DIR && unzip ${TOOL_FILE_NAME_TGZ}
fi
cd ${MG_DIR}/${TOOL_FILE_NAME} && cp -rf ./bin $serverPath/mongodb
cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
#--------------- mongodb-database-tools ------------------ #
# https://fastdl.mongodb.org/tools/db/mongodb-database-tools-macos-arm64-100.9.4.zip
TOOL_VERSION=100.9.4
TOOL_FILE_NAME=mongodb-database-tools-macos-x86_64-${TOOL_VERSION}
if [ "aarch64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-macos-arm64-${TOOL_VERSION}
fi
if [ "arm64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-macos-arm64-${TOOL_VERSION}
fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.zip
if [ ! -f $MG_DIR/${TOOL_FILE_NAME_TGZ} ]; then
wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://fastdl.mongodb.org/tools/db/${TOOL_FILE_NAME_TGZ}
echo "wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://fastdl.mongodb.org/tools/db/${TOOL_FILE_NAME_TGZ}"
fi
if [ ! -d $MG_DIR/${TOOL_FILE_NAME_TGZ} ];then
cd $MG_DIR && unzip ${TOOL_FILE_NAME_TGZ}
fi
cd ${MG_DIR}/${TOOL_FILE_NAME} && cp -rf ./bin $serverPath/mongodb
cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}

@ -47,3 +47,46 @@ if [ ! -d $serverPath/mongodb/bin ];then
fi
cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
#--------------- mongosh tool install ------------------ #
TOOL_VERSION=2.2.5
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64
if [ "aarch64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
if [ ! -f $MG_DIR/${TOOL_FILE_NAME_TGZ} ]; then
wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://downloads.mongodb.com/compass/${TOOL_FILE_NAME_TGZ}
echo "wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://downloads.mongodb.com/compass/${TOOL_FILE_NAME_TGZ}"
fi
if [ ! -d $MG_DIR/${TOOL_FILE_NAME_TGZ} ];then
cd $MG_DIR && tar -zxvf ${TOOL_FILE_NAME_TGZ}
fi
cd ${MG_DIR}/${TOOL_FILE_NAME} && cp -rf ./bin $serverPath/mongodb
cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
# https://fastdl.mongodb.org/tools/db/mongodb-database-tools-suse12-x86_64-100.9.4.tgz
#--------------- mongodb database install ------------------ #
TOOL_VERSION=100.9.4
TOOL_FILE_NAME=mongodb-database-tools-suse${SYS_NAME}-x86_64-${TOOL_VERSION}
if [ "aarch64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-suse${SYS_NAME}-arm64-${TOOL_VERSION}
fi
if [ "arm64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-suse${SYS_NAME}-arm64-${TOOL_VERSION}
fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
if [ ! -f $MG_DIR/${TOOL_FILE_NAME_TGZ} ]; then
wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://fastdl.mongodb.org/tools/db/${TOOL_FILE_NAME_TGZ}
fi
if [ ! -d $MG_DIR/${TOOL_FILE_NAME_TGZ} ];then
cd $MG_DIR && tar -zxvf ${TOOL_FILE_NAME_TGZ}
fi
cd ${MG_DIR}/${TOOL_FILE_NAME} && cp -rf ./bin $serverPath/mongodb
cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}

@ -46,3 +46,46 @@ fi
cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
#--------------- mongosh tool install ------------------ #
TOOL_VERSION=2.2.5
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64
if [ "aarch64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
if [ ! -f $MG_DIR/${TOOL_FILE_NAME_TGZ} ]; then
wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://downloads.mongodb.com/compass/${TOOL_FILE_NAME_TGZ}
echo "wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://downloads.mongodb.com/compass/${TOOL_FILE_NAME_TGZ}"
fi
if [ ! -d $MG_DIR/${TOOL_FILE_NAME_TGZ} ];then
cd $MG_DIR && tar -zxvf ${TOOL_FILE_NAME_TGZ}
fi
cd ${MG_DIR}/${TOOL_FILE_NAME} && cp -rf ./bin $serverPath/mongodb
cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
# https://fastdl.mongodb.org/tools/db/mongodb-database-tools-ubuntu2204-x86_64-100.9.4.tgz
#--------------- mongodb database install ------------------ #
TOOL_VERSION=100.9.4
TOOL_FILE_NAME=mongodb-database-tools-ubuntu${SYS_NAME}-x86_64-${TOOL_VERSION}
if [ "aarch64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-ubuntu${SYS_NAME}-arm64-${TOOL_VERSION}
fi
if [ "arm64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-ubuntu${SYS_NAME}-arm64-${TOOL_VERSION}
fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
if [ ! -f $MG_DIR/${TOOL_FILE_NAME_TGZ} ]; then
wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://fastdl.mongodb.org/tools/db/${TOOL_FILE_NAME_TGZ}
fi
if [ ! -d $MG_DIR/${TOOL_FILE_NAME_TGZ} ];then
cd $MG_DIR && tar -zxvf ${TOOL_FILE_NAME_TGZ}
fi
cd ${MG_DIR}/${TOOL_FILE_NAME} && cp -rf ./bin $serverPath/mongodb
cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}

@ -59,4 +59,48 @@ if [ ! -d $serverPath/mongodb/bin ];then
cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb
fi
rm -rf ${MG_DIR}/${FILE_NAME}
rm -rf ${MG_DIR}/${FILE_NAME}
#--------------- mongosh tool install ------------------ #
TOOL_VERSION=2.2.5
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64
if [ "aarch64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
if [ ! -f $MG_DIR/${TOOL_FILE_NAME_TGZ} ]; then
wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://downloads.mongodb.com/compass/${TOOL_FILE_NAME_TGZ}
echo "wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://downloads.mongodb.com/compass/${TOOL_FILE_NAME_TGZ}"
fi
if [ ! -d $MG_DIR/${TOOL_FILE_NAME_TGZ} ];then
cd $MG_DIR && tar -zxvf ${TOOL_FILE_NAME_TGZ}
fi
cd ${MG_DIR}/${TOOL_FILE_NAME} && cp -rf ./bin $serverPath/mongodb
cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
#--------------- mongodb database install ------------------ #
TOOL_VERSION=100.9.4
TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-x86_64-${TOOL_VERSION}
if [ "aarch64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-aarch64-${TOOL_VERSION}
fi
if [ "arm64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-arm64-${TOOL_VERSION}
fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
if [ ! -f $MG_DIR/${TOOL_FILE_NAME_TGZ} ]; then
wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://fastdl.mongodb.org/tools/db/${TOOL_FILE_NAME_TGZ}
fi
if [ ! -d $MG_DIR/${TOOL_FILE_NAME_TGZ} ];then
cd $MG_DIR && tar -zxvf ${TOOL_FILE_NAME_TGZ}
fi
cd ${MG_DIR}/${TOOL_FILE_NAME} && cp -rf ./bin $serverPath/mongodb
cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}

@ -45,3 +45,46 @@ fi
cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
#--------------- mongosh tool install ------------------ #
TOOL_VERSION=2.2.5
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64
if [ "aarch64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
if [ ! -f $MG_DIR/${TOOL_FILE_NAME_TGZ} ]; then
wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://downloads.mongodb.com/compass/${TOOL_FILE_NAME_TGZ}
echo "wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://downloads.mongodb.com/compass/${TOOL_FILE_NAME_TGZ}"
fi
if [ ! -d $MG_DIR/${TOOL_FILE_NAME_TGZ} ];then
cd $MG_DIR && tar -zxvf ${TOOL_FILE_NAME_TGZ}
fi
cd ${MG_DIR}/${TOOL_FILE_NAME} && cp -rf ./bin $serverPath/mongodb
cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
#--------------- mongodb database install ------------------ #
TOOL_VERSION=100.9.4
TOOL_FILE_NAME=mongodb-database-tools-debian${SYS_NAME}-x86_64-${TOOL_VERSION}
if [ "aarch64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-debian${SYS_NAME}-arm64-${TOOL_VERSION}
fi
if [ "arm64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-debian${SYS_NAME}-arm64-${TOOL_VERSION}
fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.zip
if [ ! -f $MG_DIR/${TOOL_FILE_NAME_TGZ} ]; then
wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://fastdl.mongodb.org/tools/db/${TOOL_FILE_NAME_TGZ}
fi
if [ ! -d $MG_DIR/${TOOL_FILE_NAME_TGZ} ];then
cd $MG_DIR && tar -zxvf ${TOOL_FILE_NAME_TGZ}
fi
cd ${MG_DIR}/${TOOL_FILE_NAME} && cp -rf ./bin $serverPath/mongodb
cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}

@ -26,4 +26,52 @@ fi
if [ ! -d $serverPath/mongodb/bin ];then
mkdir -p $serverPath/mongodb
cd $MG_DIR/mongodb-macos-x86_64-${VERSION} && cp -rf ./bin $serverPath/mongodb
fi
fi
#--------------- mongosh tool install ------------------ #
TOOL_VERSION=2.2.5
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-darwin-x64
if [ "aarch64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-darwin-arm64
fi
if [ "arm64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-darwin-arm64
fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.zip
if [ ! -f $MG_DIR/${TOOL_FILE_NAME_TGZ} ]; then
wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://downloads.mongodb.com/compass/${TOOL_FILE_NAME_TGZ}
echo "wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://downloads.mongodb.com/compass/${TOOL_FILE_NAME_TGZ}"
fi
if [ ! -d $MG_DIR/${TOOL_FILE_NAME_TGZ} ];then
cd $MG_DIR && unzip ${TOOL_FILE_NAME_TGZ}
fi
cd ${MG_DIR}/${TOOL_FILE_NAME} && cp -rf ./bin $serverPath/mongodb
cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
#--------------- mongodb-database-tools ------------------ #
# https://fastdl.mongodb.org/tools/db/mongodb-database-tools-macos-arm64-100.9.4.zip
TOOL_VERSION=100.9.4
TOOL_FILE_NAME=mongodb-database-tools-macos-x86_64-${TOOL_VERSION}
if [ "aarch64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-macos-arm64-${TOOL_VERSION}
fi
if [ "arm64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-macos-arm64-${TOOL_VERSION}
fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.zip
if [ ! -f $MG_DIR/${TOOL_FILE_NAME_TGZ} ]; then
wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://fastdl.mongodb.org/tools/db/${TOOL_FILE_NAME_TGZ}
echo "wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://fastdl.mongodb.org/tools/db/${TOOL_FILE_NAME_TGZ}"
fi
if [ ! -d $MG_DIR/${TOOL_FILE_NAME_TGZ} ];then
cd $MG_DIR && unzip ${TOOL_FILE_NAME_TGZ}
fi
cd ${MG_DIR}/${TOOL_FILE_NAME} && cp -rf ./bin $serverPath/mongodb
cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}

@ -48,3 +48,46 @@ fi
cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
#--------------- mongosh tool install ------------------ #
TOOL_VERSION=2.2.5
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64
if [ "aarch64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
if [ ! -f $MG_DIR/${TOOL_FILE_NAME_TGZ} ]; then
wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://downloads.mongodb.com/compass/${TOOL_FILE_NAME_TGZ}
echo "wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://downloads.mongodb.com/compass/${TOOL_FILE_NAME_TGZ}"
fi
if [ ! -d $MG_DIR/${TOOL_FILE_NAME_TGZ} ];then
cd $MG_DIR && tar -zxvf ${TOOL_FILE_NAME_TGZ}
fi
cd ${MG_DIR}/${TOOL_FILE_NAME} && cp -rf ./bin $serverPath/mongodb
cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
# https://fastdl.mongodb.org/tools/db/mongodb-database-tools-suse12-x86_64-100.9.4.tgz
#--------------- mongodb database install ------------------ #
TOOL_VERSION=100.9.4
TOOL_FILE_NAME=mongodb-database-tools-suse${SYS_NAME}-x86_64-${TOOL_VERSION}
if [ "aarch64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-suse${SYS_NAME}-arm64-${TOOL_VERSION}
fi
if [ "arm64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-suse${SYS_NAME}-arm64-${TOOL_VERSION}
fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
if [ ! -f $MG_DIR/${TOOL_FILE_NAME_TGZ} ]; then
wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://fastdl.mongodb.org/tools/db/${TOOL_FILE_NAME_TGZ}
fi
if [ ! -d $MG_DIR/${TOOL_FILE_NAME_TGZ} ];then
cd $MG_DIR && tar -zxvf ${TOOL_FILE_NAME_TGZ}
fi
cd ${MG_DIR}/${TOOL_FILE_NAME} && cp -rf ./bin $serverPath/mongodb
cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}

@ -45,3 +45,46 @@ if [ ! -d $serverPath/mongodb/bin ];then
fi
cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
#--------------- mongosh tool install ------------------ #
TOOL_VERSION=2.2.5
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64
if [ "aarch64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
if [ ! -f $MG_DIR/${TOOL_FILE_NAME_TGZ} ]; then
wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://downloads.mongodb.com/compass/${TOOL_FILE_NAME_TGZ}
echo "wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://downloads.mongodb.com/compass/${TOOL_FILE_NAME_TGZ}"
fi
if [ ! -d $MG_DIR/${TOOL_FILE_NAME_TGZ} ];then
cd $MG_DIR && tar -zxvf ${TOOL_FILE_NAME_TGZ}
fi
cd ${MG_DIR}/${TOOL_FILE_NAME} && cp -rf ./bin $serverPath/mongodb
cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
# https://fastdl.mongodb.org/tools/db/mongodb-database-tools-ubuntu2204-x86_64-100.9.4.tgz
#--------------- mongodb database install ------------------ #
TOOL_VERSION=100.9.4
TOOL_FILE_NAME=mongodb-database-tools-ubuntu${SYS_NAME}-x86_64-${TOOL_VERSION}
if [ "aarch64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-ubuntu${SYS_NAME}-arm64-${TOOL_VERSION}
fi
if [ "arm64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-ubuntu${SYS_NAME}-arm64-${TOOL_VERSION}
fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
if [ ! -f $MG_DIR/${TOOL_FILE_NAME_TGZ} ]; then
wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://fastdl.mongodb.org/tools/db/${TOOL_FILE_NAME_TGZ}
fi
if [ ! -d $MG_DIR/${TOOL_FILE_NAME_TGZ} ];then
cd $MG_DIR && tar -zxvf ${TOOL_FILE_NAME_TGZ}
fi
cd ${MG_DIR}/${TOOL_FILE_NAME} && cp -rf ./bin $serverPath/mongodb
cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}

@ -9,7 +9,7 @@ rootPath=$(dirname "$rootPath")
serverPath=$(dirname "$rootPath")
install_tmp=${rootPath}/tmp/mw_install.pl
VERSION=7.0.0
VERSION=7.0.9
SYS_ARCH=`arch`
SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F "\"" '{print $2}'`
@ -61,3 +61,48 @@ fi
cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
#--------------- mongosh tool install ------------------ #
TOOL_VERSION=2.2.5
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64
if [ "aarch64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
if [ ! -f $MG_DIR/${TOOL_FILE_NAME_TGZ} ]; then
wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://downloads.mongodb.com/compass/${TOOL_FILE_NAME_TGZ}
echo "wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://downloads.mongodb.com/compass/${TOOL_FILE_NAME_TGZ}"
fi
if [ ! -d $MG_DIR/${TOOL_FILE_NAME_TGZ} ];then
cd $MG_DIR && tar -zxvf ${TOOL_FILE_NAME_TGZ}
fi
cd ${MG_DIR}/${TOOL_FILE_NAME} && cp -rf ./bin $serverPath/mongodb
cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
# https://fastdl.mongodb.org/tools/db/mongodb-database-tools-rhel90-aarch64-100.9.4.tgz
# https://fastdl.mongodb.org/tools/db/mongodb-database-tools-rhel90-x86_64-100.9.4.tgz
# https://fastdl.mongodb.org/tools/db/mongodb-database-tools-rhel83-s390x-100.9.4.tgz
#--------------- mongodb database install ------------------ #
TOOL_VERSION=100.9.4
TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-x86_64-${TOOL_VERSION}
if [ "aarch64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-aarch64-${TOOL_VERSION}
fi
if [ "arm64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-arm64-${TOOL_VERSION}
fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
if [ ! -f $MG_DIR/${TOOL_FILE_NAME_TGZ} ]; then
wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://fastdl.mongodb.org/tools/db/${TOOL_FILE_NAME_TGZ}
fi
if [ ! -d $MG_DIR/${TOOL_FILE_NAME_TGZ} ];then
cd $MG_DIR && tar -zxvf ${TOOL_FILE_NAME_TGZ}
fi
cd ${MG_DIR}/${TOOL_FILE_NAME} && cp -rf ./bin $serverPath/mongodb
cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}

@ -9,7 +9,7 @@ rootPath=$(dirname "$rootPath")
serverPath=$(dirname "$rootPath")
install_tmp=${rootPath}/tmp/mw_install.pl
VERSION=7.0.0
VERSION=7.0.9
SYS_ARCH=`arch`
SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F "\"" '{print $2}'`
SYS_NAME=${SYS_VERSION_ID/./}
@ -45,3 +45,47 @@ fi
cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
#--------------- mongosh tool install ------------------ #
TOOL_VERSION=2.2.5
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64
if [ "aarch64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
if [ ! -f $MG_DIR/${TOOL_FILE_NAME_TGZ} ]; then
wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://downloads.mongodb.com/compass/${TOOL_FILE_NAME_TGZ}
echo "wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://downloads.mongodb.com/compass/${TOOL_FILE_NAME_TGZ}"
fi
if [ ! -d $MG_DIR/${TOOL_FILE_NAME_TGZ} ];then
cd $MG_DIR && tar -zxvf ${TOOL_FILE_NAME_TGZ}
fi
cd ${MG_DIR}/${TOOL_FILE_NAME} && cp -rf ./bin $serverPath/mongodb
cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
#--------------- mongodb database install ------------------ #
TOOL_VERSION=100.9.4
TOOL_FILE_NAME=mongodb-database-tools-debian${SYS_NAME}-x86_64-${TOOL_VERSION}
if [ "aarch64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-debian${SYS_NAME}-arm64-${TOOL_VERSION}
fi
if [ "arm64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-debian${SYS_NAME}-arm64-${TOOL_VERSION}
fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
if [ ! -f $MG_DIR/${TOOL_FILE_NAME_TGZ} ]; then
wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://fastdl.mongodb.org/tools/db/${TOOL_FILE_NAME_TGZ}
fi
if [ ! -d $MG_DIR/${TOOL_FILE_NAME_TGZ} ];then
cd $MG_DIR && tar -zxvf ${TOOL_FILE_NAME_TGZ}
fi
cd ${MG_DIR}/${TOOL_FILE_NAME} && cp -rf ./bin $serverPath/mongodb
cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}

@ -7,9 +7,10 @@ rootPath=$(dirname "$curPath")
rootPath=$(dirname "$rootPath")
rootPath=$(dirname "$rootPath")
serverPath=$(dirname "$rootPath")
SYS_ARCH=`arch`
install_tmp=${rootPath}/tmp/mw_install.pl
VERSION=7.0.0
VERSION=7.0.9
MG_DIR=$serverPath/source/mongodb
mkdir -p $MG_DIR
@ -26,4 +27,55 @@ fi
if [ ! -d $serverPath/mongodb/bin ];then
mkdir -p $serverPath/mongodb
cd $MG_DIR/mongodb-macos-x86_64-${VERSION} && cp -rf ./bin $serverPath/mongodb
fi
fi
# https://downloads.mongodb.com/compass/mongosh-2.2.5-darwin-x64.zip
# https://downloads.mongodb.com/compass/mongosh-2.2.5-darwin-arm64.zip
#--------------- mongosh tool install ------------------ #
TOOL_VERSION=2.2.5
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-darwin-x64
if [ "aarch64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-darwin-arm64
fi
if [ "arm64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-darwin-arm64
fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.zip
if [ ! -f $MG_DIR/${TOOL_FILE_NAME_TGZ} ]; then
wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://downloads.mongodb.com/compass/${TOOL_FILE_NAME_TGZ}
echo "wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://downloads.mongodb.com/compass/${TOOL_FILE_NAME_TGZ}"
fi
if [ ! -d $MG_DIR/${TOOL_FILE_NAME_TGZ} ];then
cd $MG_DIR && unzip ${TOOL_FILE_NAME_TGZ}
fi
cd ${MG_DIR}/${TOOL_FILE_NAME} && cp -rf ./bin $serverPath/mongodb
cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
# https://fastdl.mongodb.org/tools/db/mongodb-database-tools-macos-arm64-100.9.4.zip
TOOL_VERSION=100.9.4
TOOL_FILE_NAME=mongodb-database-tools-macos-x86_64-${TOOL_VERSION}
if [ "aarch64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-macos-arm64-${TOOL_VERSION}
fi
if [ "arm64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-macos-arm64-${TOOL_VERSION}
fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.zip
if [ ! -f $MG_DIR/${TOOL_FILE_NAME_TGZ} ]; then
wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://fastdl.mongodb.org/tools/db/${TOOL_FILE_NAME_TGZ}
echo "wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://fastdl.mongodb.org/tools/db/${TOOL_FILE_NAME_TGZ}"
fi
if [ ! -d $MG_DIR/${TOOL_FILE_NAME_TGZ} ];then
cd $MG_DIR && unzip ${TOOL_FILE_NAME_TGZ}
fi
cd ${MG_DIR}/${TOOL_FILE_NAME} && cp -rf ./bin $serverPath/mongodb
cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}

@ -9,7 +9,7 @@ rootPath=$(dirname "$rootPath")
serverPath=$(dirname "$rootPath")
install_tmp=${rootPath}/tmp/mw_install.pl
VERSION=7.0.0
VERSION=7.0.9
SYS_ARCH=`arch`
SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F "\"" '{print $2}' | awk -F . '{print $1}'`
@ -46,4 +46,50 @@ if [ ! -d $serverPath/mongodb/bin ];then
cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb
fi
cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
#--------------- mongosh tool install ------------------ #
TOOL_VERSION=2.2.5
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64
if [ "aarch64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
if [ ! -f $MG_DIR/${TOOL_FILE_NAME_TGZ} ]; then
wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://downloads.mongodb.com/compass/${TOOL_FILE_NAME_TGZ}
echo "wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://downloads.mongodb.com/compass/${TOOL_FILE_NAME_TGZ}"
fi
if [ ! -d $MG_DIR/${TOOL_FILE_NAME_TGZ} ];then
cd $MG_DIR && tar -zxvf ${TOOL_FILE_NAME_TGZ}
fi
cd ${MG_DIR}/${TOOL_FILE_NAME} && cp -rf ./bin $serverPath/mongodb
cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
# https://fastdl.mongodb.org/tools/db/mongodb-database-tools-suse12-x86_64-100.9.4.tgz
#--------------- mongodb database install ------------------ #
TOOL_VERSION=100.9.4
TOOL_FILE_NAME=mongodb-database-tools-suse${SYS_NAME}-x86_64-${TOOL_VERSION}
if [ "aarch64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-suse${SYS_NAME}-arm64-${TOOL_VERSION}
fi
if [ "arm64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-suse${SYS_NAME}-arm64-${TOOL_VERSION}
fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
if [ ! -f $MG_DIR/${TOOL_FILE_NAME_TGZ} ]; then
wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://fastdl.mongodb.org/tools/db/${TOOL_FILE_NAME_TGZ}
fi
if [ ! -d $MG_DIR/${TOOL_FILE_NAME_TGZ} ];then
cd $MG_DIR && tar -zxvf ${TOOL_FILE_NAME_TGZ}
fi
cd ${MG_DIR}/${TOOL_FILE_NAME} && cp -rf ./bin $serverPath/mongodb
cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}

@ -9,7 +9,7 @@ rootPath=$(dirname "$rootPath")
serverPath=$(dirname "$rootPath")
install_tmp=${rootPath}/tmp/mw_install.pl
VERSION=7.0.0
VERSION=7.0.9
SYS_ARCH=`arch`
SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F "\"" '{print $2}'`
@ -44,4 +44,48 @@ if [ ! -d $serverPath/mongodb/bin ];then
cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb
fi
cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
#--------------- mongosh tool install ------------------ #
TOOL_VERSION=2.2.5
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64
if [ "aarch64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
if [ ! -f $MG_DIR/${TOOL_FILE_NAME_TGZ} ]; then
wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://downloads.mongodb.com/compass/${TOOL_FILE_NAME_TGZ}
echo "wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://downloads.mongodb.com/compass/${TOOL_FILE_NAME_TGZ}"
fi
if [ ! -d $MG_DIR/${TOOL_FILE_NAME_TGZ} ];then
cd $MG_DIR && tar -zxvf ${TOOL_FILE_NAME_TGZ}
fi
cd ${MG_DIR}/${TOOL_FILE_NAME} && cp -rf ./bin $serverPath/mongodb
cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
# https://fastdl.mongodb.org/tools/db/mongodb-database-tools-ubuntu2204-x86_64-100.9.4.tgz
#--------------- mongodb database install ------------------ #
TOOL_VERSION=100.9.4
TOOL_FILE_NAME=mongodb-database-tools-ubuntu${SYS_NAME}-x86_64-${TOOL_VERSION}
if [ "aarch64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-ubuntu${SYS_NAME}-arm64-${TOOL_VERSION}
fi
if [ "arm64" == ${SYS_ARCH} ];then
TOOL_FILE_NAME=mongodb-database-tools-ubuntu${SYS_NAME}-arm64-${TOOL_VERSION}
fi
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
if [ ! -f $MG_DIR/${TOOL_FILE_NAME_TGZ} ]; then
wget --no-check-certificate -O $MG_DIR/${TOOL_FILE_NAME_TGZ} https://fastdl.mongodb.org/tools/db/${TOOL_FILE_NAME_TGZ}
fi
if [ ! -d $MG_DIR/${TOOL_FILE_NAME_TGZ} ];then
cd $MG_DIR && tar -zxvf ${TOOL_FILE_NAME_TGZ}
fi
cd ${MG_DIR}/${TOOL_FILE_NAME} && cp -rf ./bin $serverPath/mongodb
cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}

@ -1151,7 +1151,7 @@ function dbList(page, search){
list += '<td><span class="c9 input-edit" onclick="setDbPs(\''+rdata.data[i]['id']+'\',\''+rdata.data[i]['name']+'\',this)" style="display: inline-block;">'+rdata.data[i]['ps']+'</span></td>';
list += '<td style="text-align:right">';
list += '<a href="javascript:;" class="btlink" class="btlink" onclick="setBackup(\''+rdata.data[i]['name']+'\',this)" title="数据库备份">'+(rdata.data[i]['is_backup']?'备份':'未备份') +'</a> | ';
list += '<a href="javascript:;" class="btlink" class="btlink" onclick="setBackup(\''+rdata.data[i]['name']+'\',this)" title="数据库备份">'+(rdata.data[i]['is_backup']?'备份':'未备份') +'</a> | ';
var rw = '';
var rw_change = 'all';

@ -1152,7 +1152,7 @@ function dbList(page, search){
list += '<td><span class="c9 input-edit" onclick="setDbPs(\''+rdata.data[i]['id']+'\',\''+rdata.data[i]['name']+'\',this)" style="display: inline-block;">'+rdata.data[i]['ps']+'</span></td>';
list += '<td style="text-align:right">';
list += '<a href="javascript:;" class="btlink" class="btlink" onclick="setBackup(\''+rdata.data[i]['name']+'\',this)" title="数据库备份">'+(rdata.data[i]['is_backup']?'备份':'未备份') +'</a> | ';
list += '<a href="javascript:;" class="btlink" class="btlink" onclick="setBackup(\''+rdata.data[i]['name']+'\',this)" title="数据库备份">'+(rdata.data[i]['is_backup']?'备份':'未备份') +'</a> | ';
var rw = '';
var rw_change = 'all';

@ -795,7 +795,7 @@ function addDatabase(type){
function delDb(id, name){
safeMessage('删除['+name+']','您真的要删除['+name+']吗?',function(){
var data='id='+id+'&name='+name
var data='id='+id+'&name='+name;
myPost('del_db', data, function(data){
var rdata = $.parseJSON(data.data);
showMsg(rdata.msg,function(){
@ -1152,7 +1152,7 @@ function dbList(page, search){
list += '<td><span class="c9 input-edit" onclick="setDbPs(\''+rdata.data[i]['id']+'\',\''+rdata.data[i]['name']+'\',this)" style="display: inline-block;">'+rdata.data[i]['ps']+'</span></td>';
list += '<td style="text-align:right">';
list += '<a href="javascript:;" class="btlink" class="btlink" onclick="setBackup(\''+rdata.data[i]['name']+'\',this)" title="数据库备份">'+(rdata.data[i]['is_backup']?'备份':'未备份') +'</a> | ';
list += '<a href="javascript:;" class="btlink" class="btlink" onclick="setBackup(\''+rdata.data[i]['name']+'\',this)" title="数据库备份">'+(rdata.data[i]['is_backup']?'备份':'未备份') +'</a> | ';
var rw = '';
var rw_change = 'all';

@ -79,7 +79,7 @@ function phpSetConfig(version) {
ibody = '<select class="bt-input-text mr5" name="' + rdata[i].name + '" style="width: ' + w + 'px;"><option value="On" ' + selected_1 + '>开启</option><option value="Off" ' + selected_0 + '>关闭</option></select>'
break;
}
mlist += '<p><span>' + rdata[i].name + '</span>' + ibody + ', <font>' + rdata[i].ps + '</font></p>'
mlist += '<p><span>' + rdata[i].name + '</span>' + ibody + ', <font>' + rdata[i].ps + '</font></p>';
}
var phpCon = '<style>.conf_p p{margin-bottom: 2px}</style><div class="conf_p" style="margin-bottom:0">\
' + mlist + '\

@ -43,7 +43,7 @@ def send_msg(bot, tag='ad', trigger_time=300):
# https://t.me/gjgzs2022 | 22/m | @GJ_gzs
# https://zhaoziyuan1.cc | web | 15/m | 2m | next,5/15 | @baleite
# 综合包网/NG接口开户 | 28/m | 3m | next,4/28 | @aabbcx888
# 综合包网/NG接口开户 | 28/m | 6m | next,10/28 | @aabbcx888
# 实名认证/过人脸🕵各种账号处理✅ | 30/m| next,6/30 | @nngzs
## 海外服务器 高防CDN 解决移动屏蔽 | 19/m | next,4/19 | @YYCDNFW
keyboard = [

@ -52,7 +52,7 @@ def send_msg(bot, tag='ad', trigger_time=300):
# https://t.me/gjgzs2022 | 22/m | @GJ_gzs
# https://zhaoziyuan1.cc | web | 15/m | 2m | next,5/15 | @baleite
# 综合包网/NG接口开户 | 28/m | 3m | next,4/28 | @aabbcx888
# 综合包网/NG接口开户 | 28/m | 6m | next,10/28 | @aabbcx888
# 实名认证/过人脸🕵各种账号处理✅ | 30/m| next,6/30 | @nngzs
## 海外服务器 高防CDN 解决移动屏蔽 | 19/m | next,4/19 | @YYCDNFW
# 群内置顶AD| 16/m | @YYCDNFW

@ -34,4 +34,5 @@ whitenoise==5.3.0
pyotp
pytz
pyTelegramBotAPI
telebot
telebot
pyyaml

@ -461,6 +461,7 @@ function initDropdownMenu(){
$(".controls").html('备份网站');
break;
case 'database_mariadb':
case 'database_mongodb':
case 'database_postgresql':
case 'database_mysql-apt':
case 'database_mysql-yum':
@ -494,6 +495,7 @@ function toBackup(type){
sType = "sites";
break;
case 'database_mariadb':
case 'database_mongodb':
case 'database_postgresql':
case 'database_mysql-apt':
case 'database_mysql-yum':

@ -761,6 +761,10 @@ function copyText(value) {
}
function copyPass(value){
if (value == ''){
layer.msg('空,不能复制',{icon:2,time:2000});
return;
}
copyText(value);
}

@ -59,6 +59,11 @@ if os.path.exists('data/ipv6.pl'):
else:
bind.append('0.0.0.0:%s' % mw_port)
# if os.path.exists('data/ssl.pl'):
# certfile = 'ssl/certificate.pem'
# keyfile = 'ssl/privateKey.pem'
# ciphers = 'TLSv1 TLSv1.1 TLSv1.2 TLSv1.3'
# ssl_version = 2
# 初始安装时,自动生成安全路径
if not os.path.exists('data/admin_path.pl'):

Loading…
Cancel
Save