Merge pull request #932 from midoks/dev

兼容Ubuntu 26.04 LTS
This commit is contained in:
Mr Chen
2026-07-21 20:43:06 +08:00
committed by GitHub
65 changed files with 233 additions and 86 deletions
+1
View File
@@ -80,6 +80,7 @@ def runPanelTask():
# 站点过期检查
siteEdateCheck()
# echo "True" > /www/server/mdserver-web/logs/panel_task.lock
lock_file = mw.getTriggerTaskLockFile()
try:
if os.path.exists(lock_file):
+1 -1
View File
@@ -14,7 +14,7 @@ sysName=`uname`
action=$1
type=$2
VERSION=2.4.66
VERSION=2.4.68
apacheDir=${serverPath}/source/apache
Install_App()
+1 -1
View File
@@ -109,7 +109,7 @@ def initDreplace():
caddy_file = getConf()
if not os.path.exists(caddy_file):
caddy_file_tpl = getConfTpl()
content = mw.readFile(systemServiceTpl)
content = mw.readFile(caddy_file_tpl)
content = content.replace('{$SERVER_PATH}', service_path)
mw.writeFile(caddy_file, content)
+3 -3
View File
@@ -20,9 +20,9 @@ After=network.target network-online.target
Requires=network-online.target
[Service]
Type=notify
User=caddy
Group=caddy
Type=simple
User=www
Group=www
ExecStart={$SERVER_PATH}/caddy/bin/caddy run --environ --config {$SERVER_PATH}/caddy/Caddyfile
ExecReload={$SERVER_PATH}/caddy/bin/caddy reload --config {$SERVER_PATH}/caddy/Caddyfile --force
TimeoutStopSec=5s
+1 -1
View File
@@ -3,7 +3,7 @@ PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/hom
export PATH
# cd /Users/midoks/Desktop/mwdev/server/mdserver-web/plugins/caddy && bash install.sh install 1.21.4
# cd /www/server/mdserver-web/plugins/caddy && bash install.sh install 1.21.4
# cd /www/server/mdserver-web/plugins/caddy && bash install.sh install 2.11
# cd /www/server/mdserver-web/plugins/caddy && bash install.sh install 1.29.2
# cd /www/server/mdserver-web/plugins/caddy && bash install.sh upgrade 1.29.2
+1
View File
@@ -30,6 +30,7 @@ case $(uname -m) in
x86_64) ARCH_NAME="amd64" ;;
arm) ARCH_NAME="arm64" ;;
arm64) ARCH_NAME="arm64" ;;
aarch64) ARCH_NAME="arm64" ;;
esac
VERSION=2.11.2
+6
View File
@@ -6,6 +6,7 @@ export PATH
# 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/plugins/mongodb && /bin/bash install.sh install 8.0
# cd /www/server/mdserver-web/plugins/mongodb && /bin/bash install.sh install 3.0
# cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/mongodb/index.py start
@@ -75,6 +76,11 @@ Install_app()
if [ -f $shell_file ];then
bash -x $shell_file
if [ "$?" != "0" ];then
echo '不支持...'
exit 1
fi
else
echo '不支持...'
exit 1
+6 -1
View File
@@ -11,6 +11,11 @@ serverPath=$(dirname "$rootPath")
VERSION=3.0.15
SYS_ARCH=`arch`
if [ "$SYS_ARCH" != "x86_64" ];then
echo "no support"
exit 0
fi
SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F "\"" '{print $2}'`
SYS_NAME=${SYS_VERSION_ID/./}
SYS_NAME_LEN=`echo "$SYS_NAME" | wc -L`
@@ -60,7 +65,7 @@ if [ ! -d $MG_DIR/${FILE_NAME} ];then
cd $MG_DIR && tar -zxvf ${FILE_NAME_TGZ}
fi
if [ ! -d $serverPath/mongodb/bin ];then
if [ ! -f $serverPath/mongodb/bin/mongod ];then
mkdir -p $serverPath/mongodb
cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb
fi
+7 -1
View File
@@ -11,6 +11,12 @@ serverPath=$(dirname "$rootPath")
# https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.0.15.tgz
VERSION=3.0.15
SYS_ARCH=`arch`
if [ "$SYS_ARCH" != "x86_64" ];then
echo "no support"
exit 0
fi
SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F "\"" '{print $2}'`
SYS_NAME=${SYS_VERSION_ID/./}
@@ -39,7 +45,7 @@ if [ ! -d $MG_DIR/${FILE_NAME_TGZ} ];then
cd $MG_DIR && tar -zxvf ${FILE_NAME_TGZ}
fi
if [ ! -d $serverPath/mongodb/bin ];then
if [ ! -f $serverPath/mongodb/bin/mongod ];then
mkdir -p $serverPath/mongodb
cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb
fi
+1 -1
View File
@@ -23,7 +23,7 @@ if [ ! -d $MG_DIR/mongodb-macos-x86_64-${VERSION} ];then
cd $MG_DIR && tar -zxvf mongodb-macos-x86_64-${VERSION}.tgz
fi
if [ ! -d $serverPath/mongodb/bin ];then
if [ ! -f $serverPath/mongodb/bin/mongod ];then
mkdir -p $serverPath/mongodb
cd $MG_DIR/mongodb-macos-x86_64-${VERSION} && cp -rf ./bin $serverPath/mongodb
fi
+6 -1
View File
@@ -11,6 +11,11 @@ serverPath=$(dirname "$rootPath")
VERSION=3.0.15
SYS_ARCH=`arch`
if [ "$SYS_ARCH" != "x86_64" ];then
echo "no support"
exit 0
fi
SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F "\"" '{print $2}' | awk -F . '{print $1}'`
SYS_NAME="15"
@@ -40,7 +45,7 @@ if [ ! -d $MG_DIR/${FILE_NAME} ];then
cd $MG_DIR && tar -zxvf ${FILE_NAME_TGZ}
fi
if [ ! -d $serverPath/mongodb/bin ];then
if [ ! -f $serverPath/mongodb/bin/mongod ];then
mkdir -p $serverPath/mongodb
cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb
fi
+1 -1
View File
@@ -36,7 +36,7 @@ if [ ! -d $MG_DIR/${FILE_NAME} ];then
cd $MG_DIR && tar -zxvf ${FILE_NAME_TGZ}
fi
if [ ! -d $serverPath/mongodb/bin ];then
if [ ! -f $serverPath/mongodb/bin/mongod ];then
mkdir -p $serverPath/mongodb
cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb
fi
+6 -1
View File
@@ -11,6 +11,11 @@ serverPath=$(dirname "$rootPath")
VERSION=3.0.15
SYS_ARCH=`arch`
if [ "$SYS_ARCH" != "x86_64" ];then
echo "no support"
exit 1
fi
SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F "\"" '{print $2}'`
SYS_NAME=${SYS_VERSION_ID/./}
# https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2004-4.4.23.tgz
@@ -38,7 +43,7 @@ if [ ! -d $MG_DIR/${FILE_NAME} ];then
cd $MG_DIR && tar -zxvf ${FILE_NAME_TGZ}
fi
if [ ! -d $serverPath/mongodb/bin ];then
if [ ! -f $serverPath/mongodb/bin/mongod ];then
mkdir -p $serverPath/mongodb
cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb
fi
+1 -1
View File
@@ -60,7 +60,7 @@ if [ ! -d $MG_DIR/${FILE_NAME} ];then
cd $MG_DIR && tar -zxvf ${FILE_NAME_TGZ}
fi
if [ ! -d $serverPath/mongodb/bin ];then
if [ ! -f $serverPath/mongodb/bin/mongod ];then
mkdir -p $serverPath/mongodb
cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb
fi
+1 -1
View File
@@ -37,7 +37,7 @@ if [ ! -d $MG_DIR/${FILE_NAME_TGZ} ];then
cd $MG_DIR && tar -zxvf ${FILE_NAME_TGZ}
fi
if [ ! -d $serverPath/mongodb/bin ];then
if [ ! -f $serverPath/mongodb/bin/mongod ];then
mkdir -p $serverPath/mongodb
cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb
fi
+1 -1
View File
@@ -22,7 +22,7 @@ if [ ! -d $MG_DIR/mongodb-macos-x86_64-${VERSION} ];then
cd $MG_DIR && tar -zxvf mongodb-macos-x86_64-${VERSION}.tgz
fi
if [ ! -d $serverPath/mongodb/bin ];then
if [ ! -f $serverPath/mongodb/bin/mongod ];then
mkdir -p $serverPath/mongodb
cd $MG_DIR/mongodb-macos-x86_64-${VERSION} && cp -rf ./bin $serverPath/mongodb
fi
+1 -1
View File
@@ -40,7 +40,7 @@ if [ ! -d $MG_DIR/${FILE_NAME} ];then
cd $MG_DIR && tar -zxvf ${FILE_NAME_TGZ}
fi
if [ ! -d $serverPath/mongodb/bin ];then
if [ ! -f $serverPath/mongodb/bin/mongod ];then
mkdir -p $serverPath/mongodb
cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb
fi
+1 -1
View File
@@ -36,7 +36,7 @@ if [ ! -d $MG_DIR/${FILE_NAME} ];then
cd $MG_DIR && tar -zxvf ${FILE_NAME_TGZ}
fi
if [ ! -d $serverPath/mongodb/bin ];then
if [ ! -f $serverPath/mongodb/bin/mongod ];then
mkdir -p $serverPath/mongodb
cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb
fi
+1 -1
View File
@@ -38,7 +38,7 @@ if [ ! -d $MG_DIR/${FILE_NAME} ];then
cd $MG_DIR && tar -zxvf ${FILE_NAME_TGZ}
fi
if [ ! -d $serverPath/mongodb/bin ];then
if [ ! -f $serverPath/mongodb/bin/mongod ];then
mkdir -p $serverPath/mongodb
cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb
fi
+1 -1
View File
@@ -47,7 +47,7 @@ if [ ! -d $MG_DIR/${FILE_NAME} ];then
cd $MG_DIR && tar -zxvf ${FILE_NAME_TGZ}
fi
if [ ! -d $serverPath/mongodb/bin ];then
if [ ! -f $serverPath/mongodb/bin/mongod ];then
mkdir -p $serverPath/mongodb
cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb
fi
+1 -1
View File
@@ -37,7 +37,7 @@ if [ ! -d $MG_DIR/${FILE_NAME_TGZ} ];then
cd $MG_DIR && tar -zxvf ${FILE_NAME_TGZ}
fi
if [ ! -d $serverPath/mongodb/bin ];then
if [ ! -f $serverPath/mongodb/bin/mongod ];then
mkdir -p $serverPath/mongodb
cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb
fi
+1 -1
View File
@@ -22,7 +22,7 @@ if [ ! -d $MG_DIR/mongodb-macos-x86_64-${VERSION} ];then
cd $MG_DIR && tar -zxvf mongodb-macos-x86_64-${VERSION}.tgz
fi
if [ ! -d $serverPath/mongodb/bin ];then
if [ ! -f $serverPath/mongodb/bin/mongod ];then
mkdir -p $serverPath/mongodb
cd $MG_DIR/mongodb-macos-x86_64-${VERSION} && cp -rf ./bin $serverPath/mongodb
fi
+1 -1
View File
@@ -40,7 +40,7 @@ if [ ! -d $MG_DIR/${FILE_NAME} ];then
cd $MG_DIR && tar -zxvf ${FILE_NAME_TGZ}
fi
if [ ! -d $serverPath/mongodb/bin ];then
if [ ! -f $serverPath/mongodb/bin/mongod ];then
mkdir -p $serverPath/mongodb
cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb
fi
+1 -1
View File
@@ -38,7 +38,7 @@ if [ ! -d $MG_DIR/${FILE_NAME} ];then
cd $MG_DIR && tar -zxvf ${FILE_NAME_TGZ}
fi
if [ ! -d $serverPath/mongodb/bin ];then
if [ ! -f $serverPath/mongodb/bin/mongod ];then
mkdir -p $serverPath/mongodb
cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb
fi
+1 -1
View File
@@ -53,7 +53,7 @@ if [ ! -d $MG_DIR/${FILE_NAME} ];then
cd $MG_DIR && tar -zxvf ${FILE_NAME_TGZ}
fi
if [ ! -d $serverPath/mongodb/bin ];then
if [ ! -f $serverPath/mongodb/bin/mongod ];then
mkdir -p $serverPath/mongodb
cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb
fi
+1 -1
View File
@@ -37,7 +37,7 @@ if [ ! -d $MG_DIR/${FILE_NAME_TGZ} ];then
cd $MG_DIR && tar -zxvf ${FILE_NAME_TGZ}
fi
if [ ! -d $serverPath/mongodb/bin ];then
if [ ! -f $serverPath/mongodb/bin/mongod ];then
mkdir -p $serverPath/mongodb
cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb
fi
+1 -1
View File
@@ -22,7 +22,7 @@ if [ ! -d $MG_DIR/mongodb-macos-x86_64-${VERSION} ];then
cd $MG_DIR && tar -zxvf mongodb-macos-x86_64-${VERSION}.tgz
fi
if [ ! -d $serverPath/mongodb/bin ];then
if [ ! -f $serverPath/mongodb/bin/mongod ];then
mkdir -p $serverPath/mongodb
cd $MG_DIR/mongodb-macos-x86_64-${VERSION} && cp -rf ./bin $serverPath/mongodb
fi
+1 -1
View File
@@ -40,7 +40,7 @@ if [ ! -d $MG_DIR/${FILE_NAME} ];then
cd $MG_DIR && tar -zxvf ${FILE_NAME_TGZ}
fi
if [ ! -d $serverPath/mongodb/bin ];then
if [ ! -f $serverPath/mongodb/bin/mongod ];then
mkdir -p $serverPath/mongodb
cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb
fi
+1 -1
View File
@@ -38,7 +38,7 @@ if [ ! -d $MG_DIR/${FILE_NAME} ];then
cd $MG_DIR && tar -zxvf ${FILE_NAME_TGZ}
fi
if [ ! -d $serverPath/mongodb/bin ];then
if [ ! -f $serverPath/mongodb/bin/mongod ];then
mkdir -p $serverPath/mongodb
cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb
fi
+1 -1
View File
@@ -53,7 +53,7 @@ if [ ! -d $MG_DIR/${FILE_NAME} ];then
cd $MG_DIR && tar -zxvf ${FILE_NAME_TGZ}
fi
if [ ! -d $serverPath/mongodb/bin ];then
if [ ! -f $serverPath/mongodb/bin/mongod ];then
mkdir -p $serverPath/mongodb
cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb
fi
+1 -1
View File
@@ -42,7 +42,7 @@ if [ ! -d $MG_DIR/${FILE_NAME_TGZ} ];then
cd $MG_DIR && tar -zxvf ${FILE_NAME_TGZ}
fi
if [ ! -d $serverPath/mongodb/bin ];then
if [ ! -f $serverPath/mongodb/bin/mongod ];then
mkdir -p $serverPath/mongodb
cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb
fi
+1 -1
View File
@@ -53,7 +53,7 @@ if [ ! -d $MG_DIR/${FILE_NAME} ];then
cd $MG_DIR && tar -zxvf ${FILE_NAME_TGZ}
fi
if [ ! -d $serverPath/mongodb/bin ];then
if [ ! -f $serverPath/mongodb/bin/mongod ];then
mkdir -p $serverPath/mongodb
cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb
fi
+1 -1
View File
@@ -23,7 +23,7 @@ if [ ! -d $MG_DIR/mongodb-macos-x86_64-${VERSION} ];then
cd $MG_DIR && tar -zxvf mongodb-macos-x86_64-${VERSION}.tgz
fi
if [ ! -d $serverPath/mongodb/bin ];then
if [ ! -f $serverPath/mongodb/bin/mongod ];then
mkdir -p $serverPath/mongodb
cd $MG_DIR/mongodb-macos-x86_64-${VERSION} && cp -rf ./bin $serverPath/mongodb
fi
+1 -1
View File
@@ -40,7 +40,7 @@ if [ ! -d $MG_DIR/${FILE_NAME} ];then
cd $MG_DIR && tar -zxvf ${FILE_NAME_TGZ}
fi
if [ ! -d $serverPath/mongodb/bin ];then
if [ ! -f $serverPath/mongodb/bin/mongod ];then
mkdir -p $serverPath/mongodb
cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb
fi
+2 -1
View File
@@ -14,6 +14,7 @@ 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/./}
# https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2004-4.4.23.tgz
# https://fastdl.mongodb.org/linux/mongodb-linux-aarch64-ubuntu2204-7.0.37.tgz
if [ "$SYS_NAME" -gt "2204" ];then
SYS_NAME="2204"
@@ -38,7 +39,7 @@ if [ ! -d $MG_DIR/${FILE_NAME} ];then
cd $MG_DIR && tar -zxvf ${FILE_NAME_TGZ}
fi
if [ ! -d $serverPath/mongodb/bin ];then
if [ ! -f $serverPath/mongodb/bin/mongod ];then
mkdir -p $serverPath/mongodb
cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb
fi
+1 -1
View File
@@ -53,7 +53,7 @@ if [ ! -d $MG_DIR/${FILE_NAME} ];then
cd $MG_DIR && tar -zxvf ${FILE_NAME_TGZ}
fi
if [ ! -d $serverPath/mongodb/bin ];then
if [ ! -f $serverPath/mongodb/bin/mongod ];then
mkdir -p $serverPath/mongodb
cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb
fi
+1 -1
View File
@@ -31,7 +31,7 @@ if [ ! -d $MG_DIR/${FILE_NAME_TGZ} ];then
cd $MG_DIR && tar -zxvf ${FILE_NAME_TGZ}
fi
if [ ! -d $serverPath/mongodb/bin ];then
if [ ! -f $serverPath/mongodb/bin/mongod ];then
mkdir -p $serverPath/mongodb
cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb
fi
+1 -1
View File
@@ -53,7 +53,7 @@ if [ ! -d $MG_DIR/${FILE_NAME} ];then
cd $MG_DIR && tar -zxvf ${FILE_NAME_TGZ}
fi
if [ ! -d $serverPath/mongodb/bin ];then
if [ ! -f $serverPath/mongodb/bin/mongod ];then
mkdir -p $serverPath/mongodb
cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb
fi
+1 -1
View File
@@ -30,7 +30,7 @@ if [ ! -d $MG_DIR/${FILE_NAME} ];then
cd $MG_DIR && tar -zxvf ${FILE_NAME_TGZ}
fi
if [ ! -d $serverPath/mongodb/bin ];then
if [ ! -f $serverPath/mongodb/bin/mongod ];then
mkdir -p $serverPath/mongodb
cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb
fi
+1 -1
View File
@@ -40,7 +40,7 @@ if [ ! -d $MG_DIR/${FILE_NAME} ];then
cd $MG_DIR && tar -zxvf ${FILE_NAME_TGZ}
fi
if [ ! -d $serverPath/mongodb/bin ];then
if [ ! -f $serverPath/mongodb/bin/mongod ];then
mkdir -p $serverPath/mongodb
cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb
fi
+6 -1
View File
@@ -15,6 +15,10 @@ SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | a
SYS_NAME=${SYS_VERSION_ID/./}
# https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2004-4.4.23.tgz
if [ "$SYS_NAME" -gt "2404" ];then
SYS_NAME="2404"
fi
if [ "$SYS_NAME" -lt "2004" ];then
SYS_NAME="2004"
fi
@@ -42,7 +46,7 @@ if [ ! -d $MG_DIR/${FILE_NAME} ];then
cd $MG_DIR && tar -zxvf ${FILE_NAME_TGZ}
fi
if [ ! -d $serverPath/mongodb/bin ];then
if [ ! -f $serverPath/mongodb/bin/mongod ];then
mkdir -p $serverPath/mongodb
cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb
fi
@@ -72,6 +76,7 @@ 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
SYS_NAME=2204
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}
+1 -1
View File
@@ -53,7 +53,7 @@ if [ ! -d $MG_DIR/${FILE_NAME} ];then
cd $MG_DIR && tar -zxvf ${FILE_NAME_TGZ}
fi
if [ ! -d $serverPath/mongodb/bin ];then
if [ ! -f $serverPath/mongodb/bin/mongod ];then
mkdir -p $serverPath/mongodb
cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb
fi
+1 -1
View File
@@ -31,7 +31,7 @@ if [ ! -d $MG_DIR/${FILE_NAME_TGZ} ];then
cd $MG_DIR && tar -zxvf ${FILE_NAME_TGZ}
fi
if [ ! -d $serverPath/mongodb/bin ];then
if [ ! -f $serverPath/mongodb/bin/mongod ];then
mkdir -p $serverPath/mongodb
cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb
fi
+1 -1
View File
@@ -53,7 +53,7 @@ if [ ! -d $MG_DIR/${FILE_NAME} ];then
cd $MG_DIR && tar -zxvf ${FILE_NAME_TGZ}
fi
if [ ! -d $serverPath/mongodb/bin ];then
if [ ! -f $serverPath/mongodb/bin/mongod ];then
mkdir -p $serverPath/mongodb
cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb
fi
+1 -1
View File
@@ -30,7 +30,7 @@ if [ ! -d $MG_DIR/${FILE_NAME} ];then
cd $MG_DIR && tar -zxvf ${FILE_NAME_TGZ}
fi
if [ ! -d $serverPath/mongodb/bin ];then
if [ ! -f $serverPath/mongodb/bin/mongod ];then
mkdir -p $serverPath/mongodb
cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb
fi
+1 -1
View File
@@ -40,7 +40,7 @@ if [ ! -d $MG_DIR/${FILE_NAME} ];then
cd $MG_DIR && tar -zxvf ${FILE_NAME_TGZ}
fi
if [ ! -d $serverPath/mongodb/bin ];then
if [ ! -f $serverPath/mongodb/bin/mongod ];then
mkdir -p $serverPath/mongodb
cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb
fi
+6 -1
View File
@@ -15,6 +15,10 @@ SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | a
SYS_NAME=${SYS_VERSION_ID/./}
# https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2004-4.4.23.tgz
if [ "$SYS_NAME" -gt "2404" ];then
SYS_NAME="2404"
fi
if [ "$SYS_NAME" -lt "2004" ];then
SYS_NAME="2004"
fi
@@ -42,7 +46,7 @@ if [ ! -d $MG_DIR/${FILE_NAME} ];then
cd $MG_DIR && tar -zxvf ${FILE_NAME_TGZ}
fi
if [ ! -d $serverPath/mongodb/bin ];then
if [ ! -f $serverPath/mongodb/bin/mongod ];then
mkdir -p $serverPath/mongodb
cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb
fi
@@ -72,6 +76,7 @@ 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
SYS_NAME=2204
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}
+2 -2
View File
@@ -4,8 +4,8 @@
"name": "mosquitto",
"title": "mosquitto",
"shell": "install.sh",
"versions":["2.0.18"],
"updates":["2.0.18"],
"versions":["2.0.18", "2.1.2"],
"updates":["2.0.18", "2.1.2"],
"tip": "soft",
"checks": "server/mosquitto",
"path": "server/mosquitto",
+3 -1
View File
@@ -48,7 +48,9 @@ Install_App()
mkdir -p $serverPath/mosquitto
if [ ! -d $serverPath/mosquitto/bin ];then
cd mosquitto-${VERSION} && ${INSTALL_CMD} CMakeLists.txt -DCMAKE_INSTALL_PREFIX=$serverPath/mosquitto && make install
cd mosquitto-${VERSION} && ${INSTALL_CMD} CMakeLists.txt \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-DCMAKE_INSTALL_PREFIX=$serverPath/mosquitto && make install
fi
if [ -d $serverPath/mosquitto ];then
+29 -10
View File
@@ -69,25 +69,44 @@ fi
VERSION_ID=`cat /etc/*-release | grep 'VERSION_ID' | awk -F = '{print $2}' | awk -F "\"" '{print $2}'`
# 针对ubuntu24进行优化
if [[ "$OSNAME" == "ubuntu" ]] && [[ "$VERSION_ID" =~ "24" ]]; then
# 针对ubuntu24,26进行优化
if [[ "$OSNAME" == "ubuntu" ]] && [[ "$VERSION_ID" =~ ^(24|26)$ ]]; then
cur_dir=`pwd`
cd /usr/lib/x86_64-linux-gnu
if [ ! -f libaio.so.1 ];then
ln -s libaio.so.1t64.0.2 libaio.so.1
if [ -d /usr/lib/x86_64-linux-gnu ];then
cd /usr/lib/x86_64-linux-gnu
if [ ! -f libaio.so.1 ];then
ln -s libaio.so.1t64.0.2 libaio.so.1
fi
if [ ! -f libncurses.so.6 ];then
ln -s libncursesw.so.6.4 libncurses.so.6
fi
fi
if [ ! -f libncurses.so.6 ];then
ln -s libncursesw.so.6.4 libncurses.so.6
if [ -d /usr/lib/aarch64-linux-gnu ];then
cd /usr/lib/aarch64-linux-gnu
if [ ! -f libaio.so.1 ];then
ln -s libaio.so.1t64.0.2 libaio.so.1
fi
fi
cd $cur_dir
fi
if [[ "$OSNAME" == "debian" ]] && [[ "$VERSION_ID" =~ "13" ]]; then
cur_dir=`pwd`
cd /usr/lib/x86_64-linux-gnu
if [ ! -f libaio.so.1 ];then
ln -s libaio.so.1t64.0.2 libaio.so.1
if [ -d /usr/lib/x86_64-linux-gnu ];then
cd /usr/lib/x86_64-linux-gnu
if [ ! -f libaio.so.1 ];then
ln -s libaio.so.1t64.0.2 libaio.so.1
fi
fi
if [ -d /usr/lib/aarch64-linux-gnu ];then
cd /usr/lib/aarch64-linux-gnu
if [ ! -f libaio.so.1 ];then
ln -s libaio.so.1t64.0.2 libaio.so.1
fi
fi
cd $cur_dir
fi
+1 -1
View File
@@ -12,7 +12,7 @@
"path": "server/mysql/VERSION",
"todo_versions":["5.6","5.7","8.0","8.2"],
"versions":["5.5", "5.6", "5.7","8.0","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.7"],
"updates":["5.5.62","5.6.50", "5.7.32","8.0.34","8.2.0","8.3.0","9.0.1","9.1.0","9.2.0","9.3.0","9.4.0","9.7.0"],
"updates":["5.5.62","5.6.50", "5.7.32","8.0.46","8.2.0","8.3.0","9.0.1","9.1.0","9.2.0","9.3.0","9.4.0","9.7.0"],
"shell":"install.sh",
"checks":"server/mysql",
"path":"server/mysql",
+25 -2
View File
@@ -131,6 +131,16 @@ Install_mysql()
cd ${rootPath}/plugins/mysql/lib && /bin/bash rpcgen.sh
INSTALL_CMD=cmake
# check cmake version
CMAKE_VERSION=`cmake -version | grep version | awk '{print $3}' | awk -F '.' '{print $1}'`
if [ "$CMAKE_VERSION" -eq "2" ];then
mkdir -p /var/log/mariadb
touch /var/log/mariadb/mariadb.log
INSTALL_CMD=cmake3
fi
if [ ! -f ${mysqlDir}/mysql-boost-${VERSION}.tar.gz ];then
wget --no-check-certificate -O ${mysqlDir}/mysql-boost-${VERSION}.tar.gz --tries=3 https://cdn.mysql.com/archives/mysql-5.7/mysql-boost-${VERSION}.tar.gz
fi
@@ -180,8 +190,12 @@ Install_mysql()
OPTIONS="-DWITH_SSL=${serverPath}/lib/openssl11"
fi
# -DCMAKE_EXE_LINKER_FLAGS="-ltirpc" \
# -DCMAKE_C_FLAGS="-I/usr/include/tirpc" \
# -DCMAKE_CXX_FLAGS="-I/usr/include/tirpc" \
if [ ! -d $serverPath/mysql ];then
cd ${mysqlDir}/mysql-${VERSION} && cmake \
cd ${mysqlDir}/mysql-${VERSION} && ${INSTALL_CMD} \
-DCMAKE_INSTALL_PREFIX=$serverPath/mysql \
-DMYSQL_USER=mysql \
-DMYSQL_TCP_PORT=3306 \
@@ -195,10 +209,19 @@ Install_mysql()
-DDEFAULT_CHARSET=utf8mb4 \
-DDEFAULT_COLLATION=utf8mb4_general_ci \
-DDOWNLOAD_BOOST=1 \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-DWITH_CRYPT=system \
-DWITH_SSL=system \
-DWITH_ZLIB=system \
-DWITH_EMBEDDED_SERVER=OFF \
-DHAVE_GETHOSTBYNAME_R_6_ARG=1 \
-DHAVE_GETHOSTBYNAME_R=1 \
-DWITHOUT_TOKUDB=1 \
-DWITHOUT_ROCKSDB=1 \
$OPTIONS \
-DCMAKE_C_COMPILER=${WHERE_DIR_GCC} \
-DCMAKE_CXX_COMPILER=${WHERE_DIR_GPP} \
-DWITH_BOOST=${mysqlDir}/mysql-${VERSION}/boost/
-DWITH_BOOST=${mysqlDir}/mysql-${VERSION}/boost/boost_1_59_0
make -j${cpuCore} && make install && make clean
if [ -d $serverPath/mysql ];then
+2 -2
View File
@@ -54,7 +54,7 @@ fi
VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F "\"" '{print $2}'`
VERSION=8.0.37
VERSION=8.0.46
Install_mysql()
{
mkdir -p ${mysqlDir}
@@ -102,7 +102,7 @@ Install_mysql()
fi
#检测文件是否损坏.
md5_mysql_ok=e0cb61cbf6e1144c452368c4535ae931
md5_mysql_ok=6707beb0d46a9e08a19aa596329ca79d
if [ -f ${mysqlDir}/mysql-boost-${VERSION}.tar.gz ];then
md5_mysql=`md5sum ${mysqlDir}/mysql-boost-${VERSION}.tar.gz | awk '{print $1}'`
if [ "${md5_mysql_ok}" == "${md5_mysql}" ]; then
+2 -2
View File
@@ -54,7 +54,7 @@ fi
VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F "\"" '{print $2}'`
VERSION=8.4.2
VERSION=8.4.10
# https://dev.mysql.com/get/Downloads/MySQL-8.4/mysql-${VERSION}.tar.gz
# https://cdn.mysql.com//Downloads/MySQL-8.4/mysql-boost-${VERSION}.tar.gz
Install_mysql()
@@ -104,7 +104,7 @@ Install_mysql()
fi
#检测文件是否损坏.
md5_mysql_ok=a632063fdb1c7de2c5db47e1f66191cd
md5_mysql_ok=db1e11216dd83423a9374999367d77e4
if [ -f ${mysqlDir}/mysql-${VERSION}.tar.gz ];then
md5_mysql=`md5sum ${mysqlDir}/mysql-${VERSION}.tar.gz | awk '{print $1}'`
if [ "${md5_mysql_ok}" == "${md5_mysql}" ]; then
+2 -2
View File
@@ -54,7 +54,7 @@ fi
VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F "\"" '{print $2}'`
VERSION=9.7.0
VERSION=9.7.1
# https://dev.mysql.com/get/Downloads/MySQL-9.4/mysql-${VERSION}.tar.gz
# https://cdn.mysql.com/archives/mysql-9.4/mysql-9.4.0.tar.gz
Install_mysql()
@@ -104,7 +104,7 @@ Install_mysql()
fi
#检测文件是否损坏.
md5_mysql_ok=c770f276fb84019be6fbe0a57b32efbc
md5_mysql_ok=5d2f4c9568a0e01d20dc5442c772de9f
if [ -f ${mysqlDir}/mysql-${VERSION}.tar.gz ];then
md5_mysql=`md5sum ${mysqlDir}/mysql-${VERSION}.tar.gz | awk '{print $1}'`
if [ "${md5_mysql_ok}" == "${md5_mysql}" ]; then
+1
View File
@@ -7,6 +7,7 @@ rootPath=$(dirname "$curPath")
rootPath=$(dirname "$rootPath")
serverPath=$(dirname "$rootPath")
# cd /www/server/mdserver-web/plugins/pureftp && bash install.sh install 1.0.49
if [ -f ${rootPath}/bin/activate ];then
source ${rootPath}/bin/activate
+28 -2
View File
@@ -44,21 +44,47 @@ VERSION=$2
# echo $VERSION
if [ "$VERSION" == "3.1.1" ];then
if [ "$sysArch" != "x86_64" ];then
echo "no support"
exit 1
fi
VERSION_NUM=${VERSION}-612d99f
elif [ "$VERSION" == "3.2.1" ]; then
if [ "$sysArch" != "x86_64" ];then
echo "no support"
exit 1
fi
VERSION_NUM=${VERSION}-f152e0b
elif [ "$VERSION" == "3.3.1" ]; then
if [ "$sysArch" != "x86_64" ];then
echo "no support"
exit 1
fi
VERSION_NUM=${VERSION}-b72d67b
elif [ "$VERSION" == "3.4.1" ]; then
if [ "$sysArch" != "x86_64" ];then
echo "no support"
exit 1
fi
VERSION_NUM=${VERSION}-efbcc65
elif [ "$VERSION" == "3.5.1" ]; then
if [ "$sysArch" != "x86_64" ];then
echo "no support"
exit 1
fi
VERSION_NUM=${VERSION}-82c60cb
elif [ "$VERSION" == "3.6.1" ]; then
if [ "$sysArch" != "x86_64" ];then
echo "no support"
exit 1
fi
VERSION_NUM=${VERSION}-c9dbeda
elif [ "$VERSION" == "3.7.1" ]; then
VERSION_NUM=${VERSION}-da9f8a4
elif [ "$VERSION" == "3.8.1" ]; then
VERSION_NUM=${VERSION}-d25e0bb
elif [ "$VERSION" == "3.9.1" ]; then
VERSION_NUM=${VERSION}-141d2ea
fi
# echo $VERSION_NUM
@@ -116,8 +142,8 @@ Install_sphinx()
cd ${SPHINX_DIR} && tar -zxvf ${FILE_TGZ}
if [ "$?" == "0" ];then
mkdir -p $SPHINX_DIR
cp -rf ${SPHINX_DIR}/sphinx-${VERSION}/ $serverPath/sphinx/bin
mkdir -p $serverPath/sphinx/bin
cp -rf ${SPHINX_DIR}/sphinx-${VERSION}/* $serverPath/sphinx/bin
fi
if [ -d $serverPath/sphinx ];then
@@ -55,7 +55,6 @@ def send_msg(bot, tag='ad', trigger_time=300):
# 信号只在一个周期内执行一次|end
# 实名认证/过人脸🕵️‍♀️各种账号处理✅ | 30/m| next,12/30 | @nngzs
# 18+资源采集| 4/m | next,7/14 | @liuxingyu123
# 98影视采集| 21/m | next,11/21 | @liuxingyu123
keyboard = [
@@ -63,10 +62,6 @@ def send_msg(bot, tag='ad', trigger_time=300):
types.InlineKeyboardButton(
text="高价收一切流量 @caifutong555", url='https://t.me/caifutong555')
],
[
types.InlineKeyboardButton(
text="18+资源采集", url='https://ckzy1.com')
],
[
types.InlineKeyboardButton(
text="实名认证/过人脸🕵️‍♀️各种账号处理✅", url='https://t.me/zhanzhangyewu')
+2 -1
View File
@@ -51,4 +51,5 @@ zstd
zstandard
geoip2
psycopg2-binary
docker
docker
telnetlib3
+6 -1
View File
@@ -213,10 +213,15 @@ apt install -y libwebp-dev
apt install -y lzma lzma-dev
apt install -y libunwind-dev
apt install -y libpcre3 libpcre3-dev
apt install -y libpcre2
apt install -y libpcre2-dev
apt install -y libpcre3
apt install -y libpcre3-dev
apt install -y openssl
apt install -y libssl-dev
apt install -y libargon2-dev
apt install -y libnuma-dev
apt install -y libpam0g-dev
apt install -y libmemcached-dev
apt install -y libsasl2-dev
+6 -1
View File
@@ -151,10 +151,15 @@ apt install -y libwebp-dev
apt install -y lzma lzma-dev
apt install -y libunwind-dev
apt install -y libpcre3 libpcre3-dev
apt install -y libpcre2
apt install -y libpcre2-dev
apt install -y libpcre3
apt install -y libpcre3-dev
apt install -y openssl
apt install -y libssl-dev
apt install -y libargon2-dev
apt install -y libnuma-dev
apt install -y libpam0g-dev
apt install -y libmemcached-dev
apt install -y libsasl2-dev
+16 -3
View File
@@ -42,17 +42,30 @@ class Sql():
__debug = False
def __init__(self):
self.__DB_FILE = getPanelDir()+'/data/panel.db'
self.__DB_FILE = mw.getPanelDir()+'/data/panel.db'
# self.__DB_FILE = mw.getPanelDataDir()+'/panel.db'
def __getConn(self):
# 取数据库对象
try:
if self.__DB_CONN == None:
self.__DB_CONN = sqlite3.connect(self.__DB_FILE)
self.__DB_CONN.text_factory = str
except Exception as ex:
print(getTracebackInfo())
return "error: " + str(ex)
raise
def close(self):
# 关闭数据库连接
if self.__DB_CONN is not None:
try:
self.__DB_CONN.close()
self.__DB_CONN = None
except Exception as ex:
pass
def __del__(self):
# 对象销毁时自动关闭连接
self.close()
def changeTextFactoryToBytes(self):
self.__DB_CONN.text_factory = bytes
+2 -1
View File
@@ -1452,7 +1452,8 @@ def getTriggerTaskLockFile():
def triggerTask():
lock_file = getTriggerTaskLockFile()
writeFile(lock_file, 'True')
t = writeFile(lock_file, 'True')
return t
def restartTask():
initd = getPanelDir() + '/scripts/init.d/mw'
+4 -1
View File
@@ -147,7 +147,7 @@ def uncompress(sfile, dfile, path):
if suffix_gz == tar_gz:
extension = suffix_gz
if not extension in ['tar.gz', 'gz', 'zip', 'rar', '7z', 'xz','bz2']:
if not extension in ['tar.gz', 'tgz', 'gz', 'zip', 'rar', '7z', 'xz','bz2']:
return mw.returnData(False, '现在仅支持gz,zip,rar,7z,xz,bz2格式解压!')
if extension == 'rar' and not mw.checkBinExist('rar'):
@@ -165,6 +165,9 @@ def uncompress(sfile, dfile, path):
elif extension == 'tar.gz':
cmd += "&& tar -zxvf " + sfile + " -C " + dfile + " > " + tmps + " 2>&1 &"
mw.execShell(cmd)
elif extension == 'tgz':
cmd += "&& tar -zxvf " + sfile + " -C " + dfile + " > " + tmps + " 2>&1 &"
mw.execShell(cmd)
elif extension == 'gz':
cmd += "&& gunzip -k " + sfile + " > " + tmps + " 2>&1 &"
mw.execShell(cmd)
+16 -3
View File
@@ -73,11 +73,20 @@ class monitor:
return True
def getMonitorDay(self):
monitor_day = mw.M('option').field('name').where('name=?',('monitor_day',)).getField('value')
return int(monitor_day)
db = mw.M('option')
monitor_day = db.field('name').where('name=?',('monitor_day',)).getField('value')
db.close()
if monitor_day is None or monitor_day == '':
return 30
try:
return int(monitor_day)
except (ValueError, TypeError):
return 30
def isOnlyNetIoStats(self):
monitor_only_netio = mw.M('option').field('name').where('name=?',('monitor_only_netio',)).getField('value')
db = mw.M('option')
monitor_only_netio = db.field('name').where('name=?',('monitor_only_netio',)).getField('value')
db.close()
if monitor_only_netio == 'open':
return True
return False
@@ -165,18 +174,21 @@ class monitor:
cmd_objm = mw.M('cpuio').dbPos(mw.getPanelDataDir(),'system')
cmd_objm.add('pro,mem,addtime', cpu_mem_data)
cmd_objm.where("addtime<?", (deltime,)).delete()
cmd_objm.close()
# 网络数据入库
netio_data = (netio['up'] / 5, netio['down'] / 5, netio['upTotal'], netio['downTotal'], netio['downPackets'], netio['upPackets'], addtime)
network_objm = mw.M('network').dbPos(mw.getPanelDataDir(),'system')
network_objm.add('up,down,total_up,total_down,down_packets,up_packets,addtime', netio_data)
network_objm.where("addtime<?", (deltime,)).delete()
network_objm.close()
# 磁盘数据入库
disk_data = (diskio['read_count'], diskio['write_count'], diskio['read_bytes'], diskio['write_bytes'], diskio['read_time'], diskio['write_time'], addtime)
disk_objm = mw.M('diskio').dbPos(mw.getPanelDataDir(),'system')
disk_objm.add('read_count,write_count,read_bytes,write_bytes,read_time,write_time,addtime', disk_data)
disk_objm.where("addtime<?", (deltime,)).delete()
disk_objm.close()
# 负载数据入库
load_data = self.getLoadAverage()
@@ -186,6 +198,7 @@ class monitor:
load_objm = mw.M('load_average').dbPos(mw.getPanelDataDir(),'system')
load_objm.add('pro,one,five,fifteen,addtime', (lpro, load_data['one'], load_data['five'], load_data['fifteen'], addtime))
load_objm.where("addtime<?", (deltime,)).delete()
load_objm.close()
return True