From f1f1392a7d9b3157b20b1bb0be2dc7f372d98443 Mon Sep 17 00:00:00 2001 From: Unitwk Date: Fri, 26 Apr 2024 15:02:47 +0800 Subject: [PATCH 001/338] Sync: setup.sh --- setup_cn.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/setup_cn.sh b/setup_cn.sh index 97c116d..1d6242c 100755 --- a/setup_cn.sh +++ b/setup_cn.sh @@ -5,8 +5,6 @@ mcsmanager_donwload_addr="http://oss.duzuii.com/d/MCSManager/MCSManager/MCSManag mcsmanager_user="mcsm" package_name="MCSManager-v10-linux.tar.gz" node="v16.20.2" - -error="" arch=$(uname -m) if [ "$(id -u)" -ne 0]; then @@ -35,6 +33,7 @@ echo_yellow() { printf '\033[1;33m%b\033[0m\n' "$@" } +# script info echo_cyan "+---------------------------------------------------------------------- | MCSManager 安装脚本 +---------------------------------------------------------------------- @@ -130,7 +129,8 @@ Create_Service() { userdel "$mcsmanager_user" fi - useradd -r -M -s "$(which nologin)" "$mcsmanager_user" + useradd -r -M -s "$(command -v nologin)" -d "$mcsmanager_install_path" "$mcsmanager_user" + chown $mcsmanager_user:$mcsmanager_user -R "$mcsmanager_install_path" echo "[Unit] @@ -216,24 +216,24 @@ node_install_path="/opt/node-$node-linux-$arch" echo_cyan "[-] Architecture: $arch" # Install related software -echo_cyan_n "[+] Installing dependent software (git, tar)... " +echo_cyan_n "[+] Installing dependent software (git, tar, wget)... " if [[ -x "$(command -v yum)" ]]; then - yum install -y git tar + yum install -y git tar wget elif [[ -x "$(command -v apt-get)" ]]; then - apt-get install -y git tar + apt-get install -y git tar wget elif [[ -x "$(command -v pacman)" ]]; then - pacman -S --noconfirm git tar + pacman -S --noconfirm git tar wget elif [[ -x "$(command -v zypper)" ]]; then - zypper --non-interactive install git tar + zypper --non-interactive install git tar wget else - echo_red "[!] Cannot find your package manager! You may need to install git and tar manually!" + echo_red "[!] Cannot find your package manager! You may need to install git, tar and wget manually!" fi # Determine whether the relevant software is installed successfully -if [[ -x "$(command -v git)" && -x "$(command -v tar)" ]]; then +if [[ -x "$(command -v git)" && -x "$(command -v tar)" && -x "$(command -v wget)" ]]; then echo_green "Success" else - Red_Error "[x] Failed to find git and tar, please install them manually!" + Red_Error "[x] Failed to find git, tar and wget, please install them manually!" fi # Install the Node environment From 9f63b3a9c01431119722a374a1791b9e851d9195 Mon Sep 17 00:00:00 2001 From: Unitwk Date: Fri, 26 Apr 2024 15:46:43 +0800 Subject: [PATCH 002/338] Fix: Docker group --- setup.sh | 4 +++- setup_cn.sh | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/setup.sh b/setup.sh index 0e14e79..852d74a 100644 --- a/setup.sh +++ b/setup.sh @@ -130,9 +130,11 @@ Create_Service() { fi useradd -r -M -s "$(command -v nologin)" -d "$mcsmanager_install_path" "$mcsmanager_user" - chown $mcsmanager_user:$mcsmanager_user -R "$mcsmanager_install_path" + groupadd docker + usermod -aG docker mcsm + echo "[Unit] Description=MCSManager-Daemon diff --git a/setup_cn.sh b/setup_cn.sh index 1d6242c..f28c8f9 100755 --- a/setup_cn.sh +++ b/setup_cn.sh @@ -130,9 +130,11 @@ Create_Service() { fi useradd -r -M -s "$(command -v nologin)" -d "$mcsmanager_install_path" "$mcsmanager_user" - chown $mcsmanager_user:$mcsmanager_user -R "$mcsmanager_install_path" + groupadd docker + usermod -aG docker mcsm + echo "[Unit] Description=MCSManager-Daemon From ba03e7c46938132e0bd66600c51c9fd1a92dc7da Mon Sep 17 00:00:00 2001 From: Unitwk Date: Fri, 26 Apr 2024 16:07:33 +0800 Subject: [PATCH 003/338] Feat: del mcsm user --- setup.sh | 227 +++++++++++++++++++++++++--------------------------- setup_cn.sh | 13 --- 2 files changed, 107 insertions(+), 133 deletions(-) diff --git a/setup.sh b/setup.sh index 852d74a..0f6eeff 100644 --- a/setup.sh +++ b/setup.sh @@ -2,35 +2,34 @@ mcsmanager_install_path="/opt/mcsmanager" mcsmanager_donwload_addr="http://oss.duzuii.com/d/MCSManager/MCSManager/MCSManager-v10-linux.tar.gz" -mcsmanager_user="mcsm" package_name="MCSManager-v10-linux.tar.gz" node="v20.12.2" arch=$(uname -m) if [ "$(id -u)" -ne 0]; then - echo "This script must be run as root. Please use \"sudo bash\" instead." - exit 1 + echo "This script must be run as root. Please use \"sudo bash\" instead." + exit 1 fi printf "\033c" echo_cyan() { - printf '\033[1;36m%b\033[0m\n' "$@" + printf '\033[1;36m%b\033[0m\n' "$@" } echo_red() { - printf '\033[1;31m%b\033[0m\n' "$@" + printf '\033[1;31m%b\033[0m\n' "$@" } echo_green() { - printf '\033[1;32m%b\033[0m\n' "$@" + printf '\033[1;32m%b\033[0m\n' "$@" } echo_cyan_n() { - printf '\033[1;36m%b\033[0m' "$@" + printf '\033[1;36m%b\033[0m' "$@" } echo_yellow() { - printf '\033[1;33m%b\033[0m\n' "$@" + printf '\033[1;33m%b\033[0m\n' "$@" } # script info @@ -40,106 +39,95 @@ echo_cyan "+-------------------------------------------------------------------- " Red_Error() { - echo '=================================================' - printf '\033[1;31;40m%b\033[0m\n' "$@" - echo '=================================================' - exit 1 + echo '=================================================' + printf '\033[1;31;40m%b\033[0m\n' "$@" + echo '=================================================' + exit 1 } Install_Node() { - echo_cyan_n "[+] Install Node.JS environment...\n" + echo_cyan_n "[+] Install Node.JS environment...\n" - rm -irf "$node_install_path" + rm -irf "$node_install_path" - cd /opt || Red_Error "[x] Failed to enter /opt" + cd /opt || Red_Error "[x] Failed to enter /opt" - rm -rf "node-$node-linux-$arch.tar.gz" + rm -rf "node-$node-linux-$arch.tar.gz" - wget "https://nodejs.org/dist/$node/node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to download node release" + wget "https://nodejs.org/dist/$node/node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to download node release" - tar -zxf "node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to untar node" + tar -zxf "node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to untar node" - rm -rf "node-$node-linux-$arch.tar.gz" + rm -rf "node-$node-linux-$arch.tar.gz" - if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then - echo_green "Success" - else - Red_Error "[x] Node installation failed!" - fi - - echo - echo_yellow "=============== Node.JS Version ===============" - echo_yellow " node: $("$node_install_path"/bin/node -v)" - echo_yellow " npm: v$(env "$node_install_path"/bin/node "$node_install_path"/bin/npm -v)" - echo_yellow "=============== Node.JS Version ===============" - echo - - sleep 3 + if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then + echo_green "Success" + else + Red_Error "[x] Node installation failed!" + fi + + echo + echo_yellow "=============== Node.JS Version ===============" + echo_yellow " node: $("$node_install_path"/bin/node -v)" + echo_yellow " npm: v$(env "$node_install_path"/bin/node "$node_install_path"/bin/npm -v)" + echo_yellow "=============== Node.JS Version ===============" + echo + + sleep 3 } Install_MCSManager() { - echo_cyan "[+] Install MCSManager..." + echo_cyan "[+] Install MCSManager..." - # stop service - systemctl disable --now mcsm-{web,daemon} + # stop service + systemctl disable --now mcsm-{web,daemon} - # delete service - rm -rf /etc/systemd/system/mcsm-{daemon,web}.service - systemctl daemon-reload + # delete service + rm -rf /etc/systemd/system/mcsm-{daemon,web}.service + systemctl daemon-reload - mkdir -p "${mcsmanager_install_path}" || Red_Error "[x] Failed to create ${mcsmanager_install_path}" + mkdir -p "${mcsmanager_install_path}" || Red_Error "[x] Failed to create ${mcsmanager_install_path}" - # cd /opt/mcsmanager - cd "${mcsmanager_install_path}" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}" + # cd /opt/mcsmanager + cd "${mcsmanager_install_path}" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}" - # donwload MCSManager release - wget "${mcsmanager_donwload_addr}" || Red_Error "[x] Failed to download MCSManager" - tar -zxf ${package_name} -o || Red_Error "[x] Failed to untar ${package_name}" - rm -rf "${mcsmanager_install_path}/${package_name}" + # donwload MCSManager release + wget "${mcsmanager_donwload_addr}" || Red_Error "[x] Failed to download MCSManager" + tar -zxf ${package_name} -o || Red_Error "[x] Failed to untar ${package_name}" + rm -rf "${mcsmanager_install_path}/${package_name}" - # echo "[→] cd daemon" - cd "${mcsmanager_install_path}/daemon" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/daemon" + # echo "[→] cd daemon" + cd "${mcsmanager_install_path}/daemon" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/daemon" - echo_cyan "[+] Install MCSManager-Daemon dependencies..." - env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${mcsmanager_install_path}/daemon" + echo_cyan "[+] Install MCSManager-Daemon dependencies..." + env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${mcsmanager_install_path}/daemon" - # echo "[←] cd .." - cd "${mcsmanager_install_path}/web" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/web" + # echo "[←] cd .." + cd "${mcsmanager_install_path}/web" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/web" - echo_cyan "[+] Install MCSManager-Web dependencies..." - env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${mcsmanager_install_path}/web" + echo_cyan "[+] Install MCSManager-Web dependencies..." + env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${mcsmanager_install_path}/web" - echo - echo_yellow "=============== MCSManager ===============" - echo_green "Daemon: ${mcsmanager_install_path}/daemon" - echo_green "Web: ${mcsmanager_install_path}/web" - echo_yellow "=============== MCSManager ===============" - echo - echo_green "[+] MCSManager installation success!" + echo + echo_yellow "=============== MCSManager ===============" + echo_green "Daemon: ${mcsmanager_install_path}/daemon" + echo_green "Web: ${mcsmanager_install_path}/web" + echo_yellow "=============== MCSManager ===============" + echo + echo_green "[+] MCSManager installation success!" - chmod -R 755 "$mcsmanager_install_path" + chmod -R 755 "$mcsmanager_install_path" - sleep 3 + sleep 3 } Create_Service() { - echo_cyan "[+] Create MCSManager service..." - - if id "$mcsmanager_user" &>/dev/null; then - userdel "$mcsmanager_user" - fi + echo_cyan "[+] Create MCSManager service..." - useradd -r -M -s "$(command -v nologin)" -d "$mcsmanager_install_path" "$mcsmanager_user" - chown $mcsmanager_user:$mcsmanager_user -R "$mcsmanager_install_path" - - groupadd docker - usermod -aG docker mcsm - - echo "[Unit] + echo "[Unit] Description=MCSManager-Daemon [Service] -User=${mcsmanager_user} WorkingDirectory=${mcsmanager_install_path}/daemon ExecStart=${node_install_path}/bin/node app.js ExecReload=/bin/kill -s QUIT \$MAINPID @@ -150,11 +138,10 @@ Environment=\"PATH=${PATH}\" WantedBy=multi-user.target " >/etc/systemd/system/mcsm-daemon.service - echo "[Unit] + echo "[Unit] Description=MCSManager-Web [Service] -User=${mcsmanager_user} WorkingDirectory=${mcsmanager_install_path}/web ExecStart=${node_install_path}/bin/node app.js ExecReload=/bin/kill -s QUIT \$MAINPID @@ -165,50 +152,50 @@ Environment=\"PATH=${PATH}\" WantedBy=multi-user.target " >/etc/systemd/system/mcsm-web.service - systemctl daemon-reload - systemctl enable --now mcsm-{daemon,web}.service - echo_green "Registered!" - - sleep 2 - - printf "\n\n\n\n" - - echo_yellow "==================================================================" - echo_green "Installation is complete! Welcome to the MCSManager!!!" - echo_yellow " " - echo_cyan_n "HTTP Web Service: " - echo_yellow "http://:23333 (Browser)" - echo_cyan_n "Daemon Address: " - echo_yellow "ws://:24444 (Cluster)" - echo_red "You must expose ports 23333 and 24444 to use the service properly on the Internet." - echo_yellow " " - echo_cyan "Usage:" - echo_cyan "systemctl start mcsm-{daemon,web}.service" - echo_cyan "systemctl stop mcsm-{daemon,web}.service" - echo_cyan "systemctl restart mcsm-{daemon,web}.service" - echo_yellow " " - echo_green "Official Document: https://docs.mcsmanager.com/" - echo_yellow "==================================================================" + systemctl daemon-reload + systemctl enable --now mcsm-{daemon,web}.service + echo_green "Registered!" + + sleep 2 + + printf "\n\n\n\n" + + echo_yellow "==================================================================" + echo_green "Installation is complete! Welcome to the MCSManager!!!" + echo_yellow " " + echo_cyan_n "HTTP Web Service: " + echo_yellow "http://:23333 (Browser)" + echo_cyan_n "Daemon Address: " + echo_yellow "ws://:24444 (Cluster)" + echo_red "You must expose ports 23333 and 24444 to use the service properly on the Internet." + echo_yellow " " + echo_cyan "Usage:" + echo_cyan "systemctl start mcsm-{daemon,web}.service" + echo_cyan "systemctl stop mcsm-{daemon,web}.service" + echo_cyan "systemctl restart mcsm-{daemon,web}.service" + echo_yellow " " + echo_green "Official Document: https://docs.mcsmanager.com/" + echo_yellow "==================================================================" } # Environmental inspection if [[ "$arch" == x86_64 ]]; then - arch=x64 - #echo "[-] x64 architecture detected" + arch=x64 + #echo "[-] x64 architecture detected" elif [[ $arch == aarch64 ]]; then - arch=arm64 - #echo "[-] 64-bit ARM architecture detected" + arch=arm64 + #echo "[-] 64-bit ARM architecture detected" elif [[ $arch == arm ]]; then - arch=armv7l - #echo "[-] 32-bit ARM architecture detected" + arch=armv7l + #echo "[-] 32-bit ARM architecture detected" elif [[ $arch == ppc64le ]]; then - arch=ppc64le - #echo "[-] IBM POWER architecture detected" + arch=ppc64le + #echo "[-] IBM POWER architecture detected" elif [[ $arch == s390x ]]; then - arch=s390x - #echo "[-] IBM LinuxONE architecture detected" + arch=s390x + #echo "[-] IBM LinuxONE architecture detected" else - Red_Error "[x] Sorry, this architecture is not supported yet!\n[x]Please try to install manually: https://github.com/MCSManager/MCSManager#linux" + Red_Error "[x] Sorry, this architecture is not supported yet!\n[x]Please try to install manually: https://github.com/MCSManager/MCSManager#linux" fi # Define the variable Node installation directory @@ -220,22 +207,22 @@ echo_cyan "[-] Architecture: $arch" # Install related software echo_cyan_n "[+] Installing dependent software (git, tar, wget)... " if [[ -x "$(command -v yum)" ]]; then - yum install -y git tar wget + yum install -y git tar wget elif [[ -x "$(command -v apt-get)" ]]; then - apt-get install -y git tar wget + apt-get install -y git tar wget elif [[ -x "$(command -v pacman)" ]]; then - pacman -S --noconfirm git tar wget + pacman -S --noconfirm git tar wget elif [[ -x "$(command -v zypper)" ]]; then - zypper --non-interactive install git tar wget + zypper --non-interactive install git tar wget else - echo_red "[!] Cannot find your package manager! You may need to install git, tar and wget manually!" + echo_red "[!] Cannot find your package manager! You may need to install git, tar and wget manually!" fi # Determine whether the relevant software is installed successfully if [[ -x "$(command -v git)" && -x "$(command -v tar)" && -x "$(command -v wget)" ]]; then - echo_green "Success" + echo_green "Success" else - Red_Error "[x] Failed to find git, tar and wget, please install them manually!" + Red_Error "[x] Failed to find git, tar and wget, please install them manually!" fi # Install the Node environment diff --git a/setup_cn.sh b/setup_cn.sh index f28c8f9..a518aa6 100755 --- a/setup_cn.sh +++ b/setup_cn.sh @@ -2,7 +2,6 @@ mcsmanager_install_path="/opt/mcsmanager" mcsmanager_donwload_addr="http://oss.duzuii.com/d/MCSManager/MCSManager/MCSManager-v10-linux.tar.gz" -mcsmanager_user="mcsm" package_name="MCSManager-v10-linux.tar.gz" node="v16.20.2" arch=$(uname -m) @@ -125,21 +124,10 @@ Install_MCSManager() { Create_Service() { echo_cyan "[+] Create MCSManager service..." - if id "$mcsmanager_user" &>/dev/null; then - userdel "$mcsmanager_user" - fi - - useradd -r -M -s "$(command -v nologin)" -d "$mcsmanager_install_path" "$mcsmanager_user" - chown $mcsmanager_user:$mcsmanager_user -R "$mcsmanager_install_path" - - groupadd docker - usermod -aG docker mcsm - echo "[Unit] Description=MCSManager-Daemon [Service] -User=${mcsmanager_user} WorkingDirectory=${mcsmanager_install_path}/daemon ExecStart=${node_install_path}/bin/node app.js ExecReload=/bin/kill -s QUIT \$MAINPID @@ -154,7 +142,6 @@ WantedBy=multi-user.target Description=MCSManager-Web [Service] -User=${mcsmanager_user} WorkingDirectory=${mcsmanager_install_path}/web ExecStart=${node_install_path}/bin/node app.js ExecReload=/bin/kill -s QUIT \$MAINPID From 1c1aa38206a1f1198d4bd3d8b8cc47bf9babc19e Mon Sep 17 00:00:00 2001 From: Unitwk Date: Tue, 30 Apr 2024 14:34:08 +0800 Subject: [PATCH 004/338] Feat: add Templates.json for Quick Install --- templates.json | 154 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 154 insertions(+) create mode 100644 templates.json diff --git a/templates.json b/templates.json new file mode 100644 index 0000000..7a0fe9f --- /dev/null +++ b/templates.json @@ -0,0 +1,154 @@ +{ + "remark": "This file is only used for quick deployment.", + "languages": [ + { + "label": "English", + "value": "en_us" + }, + { + "label": "简体中文", + "value": "zh_cn" + } + ], + "packages": [ + { + "language": "en_us", + "description": "[Paper] Recommendation for friends with multiple players, Fast setup.", + "title": "Minecraft 1.20.4 Java", + "runtime": "Java 17+", + "hardware": "RAM 8G", + "size": "140MB", + "remark": "Paper Software", + "targetLink": "http://oss.duzuii.com/d/MCSManager/Minecraft-Server-Software/Global-Paper-1.20.4.zip", + "author": "mcsmanager.com" + }, + { + "language": "en_us", + "description": "[Paper] Recommendation for friends with multiple players", + "title": "Minecraft 1.19.2 Java", + "runtime": "Java 17+", + "hardware": "RAM 8G", + "size": "140MB", + "remark": "Paper Software", + "targetLink": "http://oss.duzuii.com/d/MCSManager/Minecraft-Server-Software/Global-Paper-1.19.2.zip", + "author": "mcsmanager.com" + }, + { + "language": "en_us", + "description": "[Paper] Recommendation for friends with multiple players", + "title": "Minecraft 1.18.2 Java", + "runtime": "Java 17+", + "hardware": "RAM 8G", + "size": "140MB", + "remark": "Paper Software", + "targetLink": "http://oss.duzuii.com/d/MCSManager/Minecraft-Server-Software/Global-Paper-1.18.2.zip", + "author": "mcsmanager.com" + }, + + { + "language": "zh_cn", + "description": "[Paper] 中小型互通服推荐,1.20.4 版本,快速开服,包含ESS、锁箱子、操作回滚、领地商店等基础插件。", + "title": "Minecraft 1.20.4", + "runtime": "Java 17+", + "size": "140MB", + "remark": "支持插件,最低 8GB 内存要求", + "targetLink": "https://url.alww.top/mcsm/paper1.20.4", + "author": "alongw.cn", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -Xmx2048M -jar server.jar -nogui", + "stopCommand": "stop", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "zh_cn", + "description": "[原版生存] 朋友联机推荐,1.19.2 版本,快速开服,享受原汁原味的极致生存与探索。", + "title": "Minecraft 1.19.2 Java 原版", + "runtime": "Java 17+", + "hardware": "RAM 8G", + "size": "140MB", + "remark": "支持插件,最低 8GB 内存要求", + "targetLink": "http://oss.duzuii.com/d/MCSManager/Minecraft-Server-Software/paper-1.19.2.zip", + "author": "mcsmanager.com" + }, + { + "language": "zh_cn", + "description": "[整合包] 小型服务器推荐,包含基础插件、箱子锁、操作回滚、领地和商店等插件。", + "title": "Minecraft 1.19.2 Java 版整合包", + "runtime": "Java 17+", + "hardware": "RAM 8G", + "size": "210MB", + "remark": "支持插件,最低 8GB 内存要求", + "targetLink": "https://url.alww.top/mcsm/paper1.19.2", + "author": "alongw.cn" + }, + { + "language": "zh_cn", + "description": "[Arclight] 小型服务器推荐,1.19.2 版本,可安装mod,互通基岩版,快速开服,包含ESS、锁箱子、操作回滚、领地商店等基础插件。", + "title": "Minecraft 1.19.2", + "runtime": "Java 17+", + "hardware": "RAM 8G", + "size": "100MB", + "remark": "支持插件,支持mod(Forge),最低 6GB 内存要求", + "targetLink": "https://url.alww.top/mcsm/arclight1.19.2", + "author": "alongw.cn" + }, + { + "language": "zh_cn", + "description": "[整合包/Java&基岩版互通] 小型服务器推荐,互通基岩版,包含基础插件、箱子锁、操作回滚、领地和商店等插件。", + "title": "Minecraft 1.19.2 基岩互通版", + "runtime": "Java 17+", + "hardware": "RAM 8G", + "size": "230MB", + "remark": "支持插件,最低 6GB 内存要求", + "targetLink": "https://url.alww.top/mcsm/paper-geyser1.19.2", + "author": "alongw.cn" + }, + { + "language": "zh_cn", + "description": "[原版生存] 朋友联机推荐,让你和你的小伙伴一起享受原汁原味的极致生存。", + "title": "Minecraft 1.19.1 Java 原版", + "runtime": "Java 17+", + "hardware": "RAM 8G", + "size": "140MB", + "remark": "支持插件,最低 4GB 内存要求", + "targetLink": "http://oss.duzuii.com/d/MCSManager/Minecraft-Server-Software/paper-1.19.1.zip", + "author": "mcsmanager.com" + }, + { + "language": "zh_cn", + "description": "[原版生存] 适合朋友联机,“荒野更新”(The Wild)旨在为玩家带来现有生物群系的改进和优化。", + "title": "Minecraft 1.19 Java 原版", + "runtime": "Java 17+", + "hardware": "RAM 8G", + "size": "140MB", + "remark": "支持插件,最低 4GB 内存要求", + "targetLink": "http://oss.duzuii.com/d/MCSManager/Minecraft-Server-Software/paper-1.19.zip", + "author": "mcsmanager.com" + }, + { + "language": "zh_cn", + "description": "[原版生存] 适合朋友联机推荐,继承上版本的功能并进行了一系列的优化,主流联机版本,插件与MOD较为丰富。", + "title": "Minecraft 1.18.2 Java 原版", + "runtime": "Java 17+", + "hardware": "RAM 8G", + "size": "140MB", + "remark": "支持插件,最低 4GB 内存要求", + "targetLink": "http://oss.duzuii.com/d/MCSManager/Minecraft-Server-Software/paper-1.18.2.zip", + "author": "mcsmanager.com" + }, + { + "language": "zh_cn", + "description": "[原版生存] 适合朋友联机,快速开服,服务器搭建,回味老版本的地穴探索。", + "title": "Minecraft 17.1 Java 原版", + "runtime": "Java 17+", + "hardware": "RAM 8G", + "size": "160MB", + "remark": "支持插件,最低 4GB 内存要求", + "targetLink": "http://oss.duzuii.com/d/MCSManager/Minecraft-Server-Software/paper-1.17.1.zip", + "author": "mcsmanager.com" + } + ] +} From eef70ca1141ad85a01b03b9d00b8f49ea08ad633 Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Sat, 4 May 2024 23:53:19 +0800 Subject: [PATCH 005/338] add global arguments --- install_update.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 install_update.sh diff --git a/install_update.sh b/install_update.sh new file mode 100644 index 0000000..f31ecc0 --- /dev/null +++ b/install_update.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +#Global arguments +mcsmanager_install_path="/opt/mcsmanager" +mcsmanager_donwload_addr="http://oss.duzuii.com/d/MCSManager/MCSManager/MCSManager-v10-linux.tar.gz" +package_name="MCSManager-v10-linux.tar.gz" +node="v20.12.2" +arch=$(uname -m) + +# Default systemd user is 'mcsm' +USER="mcsm" +COMMAND="all" + From b8f03d759732e4552df697b3f208a39e4173d950 Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Sat, 4 May 2024 23:53:56 +0800 Subject: [PATCH 006/338] add some helper functions --- install_update.sh | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/install_update.sh b/install_update.sh index f31ecc0..bbe7b51 100644 --- a/install_update.sh +++ b/install_update.sh @@ -11,3 +11,44 @@ arch=$(uname -m) USER="mcsm" COMMAND="all" +# Helper Functions +usage() { + echo "Usage: $0 [-u user] [-c command]" + echo " -u Specify the user (mcsm or root), default is 'mcsm'" + echo " -c Specify the command (web, daemon, or all), default is 'all'" + exit 1 +} +Red_Error() { + echo '=================================================' + printf '\033[1;31;40m%b\033[0m\n' "$@" + echo '=================================================' + exit 1 +} +echo_cyan() { + printf '\033[1;36m%b\033[0m\n' "$@" +} +echo_red() { + printf '\033[1;31m%b\033[0m\n' "$@" +} + +echo_green() { + printf '\033[1;32m%b\033[0m\n' "$@" +} + +echo_cyan_n() { + printf '\033[1;36m%b\033[0m' "$@" +} + +echo_yellow() { + printf '\033[1;33m%b\033[0m\n' "$@" +} + +# Check root permission +check_sudo() { + if [ "$EUID" -ne 0 ]; then + echo "This script must be run as root. Please use \"sudo or root user\" instead." + exit 1 + fi +} +check_sudo + From 330b0d526b6259d3d0d4e2bb067d7f780d9fc146 Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Sat, 4 May 2024 23:54:16 +0800 Subject: [PATCH 007/338] add argument parsing --- install_update.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/install_update.sh b/install_update.sh index bbe7b51..bec5291 100644 --- a/install_update.sh +++ b/install_update.sh @@ -52,3 +52,32 @@ check_sudo() { } check_sudo +# Parse provided arguments +while getopts "u:c:" opt; do + case ${opt} in + u ) + if [[ "${OPTARG}" == "mcsm" || "${OPTARG}" == "root" ]]; then + user="${OPTARG}" + else + echo "Invalid user specified." + usage + fi + ;; + c ) + if [[ "${OPTARG}" == "web" || "${OPTARG}" == "daemon" || "${OPTARG}" == "all" ]]; then + command="${OPTARG}" + else + echo "Invalid command specified." + usage + fi + ;; + \? ) + usage + ;; + : ) + echo "Option -$OPTARG requires an argument." + usage + ;; + esac +done + From 8a6f4018e1ba3ddee820e1b8c4a5114edd83e51c Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Sat, 4 May 2024 23:54:37 +0800 Subject: [PATCH 008/338] add placeholder for different users --- install_update.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/install_update.sh b/install_update.sh index bec5291..6bf7e34 100644 --- a/install_update.sh +++ b/install_update.sh @@ -81,3 +81,15 @@ while getopts "u:c:" opt; do esac done +# Logic for different users +case ${USER} in + root) + ;; + mcsm) + ;; + *) + echo "Unknown user: ${USER}. Using default user mcsm..." + ;; +esac + + From 952422167a400652e0387b22f233f4ae9ae81148 Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Sat, 4 May 2024 23:54:55 +0800 Subject: [PATCH 009/338] add logic to check if MCSM is installed --- install_update.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/install_update.sh b/install_update.sh index 6bf7e34..9e79729 100644 --- a/install_update.sh +++ b/install_update.sh @@ -93,3 +93,16 @@ case ${USER} in esac +# Check if the mcsmanager_install_path exists +if [ -d "$mcsmanager_install_path" ]; then + echo "The directory '$mcsmanager_install_path' exists." + # Logic branch when the directory exists + # For example, list the contents + echo "Listing contents of $mcsmanager_install_path:" + ls -l "$directory" +else + echo "The directory '$mcsmanager_install_path' does not exist." + # Logic branch when the directory does not exist + # For example, create the directory + echo "Creating $mcsmanager_install_path..." +fi \ No newline at end of file From bc84a77778d8ef947806e98b2b0eb672d3cbe673 Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Sun, 5 May 2024 22:23:55 +0800 Subject: [PATCH 010/338] add the original node.js installation function --- install_update.sh | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/install_update.sh b/install_update.sh index 9e79729..043f2f6 100644 --- a/install_update.sh +++ b/install_update.sh @@ -1,9 +1,17 @@ #!/bin/bash #Global arguments +#MCSM install dir mcsmanager_install_path="/opt/mcsmanager" +#MCSM backup dir +mcsm_backup_dir="/opt/" +#Created backup absolute path +backup_path="" +#Download URL mcsmanager_donwload_addr="http://oss.duzuii.com/d/MCSManager/MCSManager/MCSManager-v10-linux.tar.gz" +#File name package_name="MCSManager-v10-linux.tar.gz" +#Node.js version to install node="v20.12.2" arch=$(uname -m) @@ -43,6 +51,37 @@ echo_yellow() { printf '\033[1;33m%b\033[0m\n' "$@" } +Install_node() { + echo_cyan_n "[+] Install Node.js environment...\n" + + rm -irf "$node_install_path" + + cd /opt || Red_Error "[x] Failed to enter /opt" + + rm -rf "node-$node-linux-$arch.tar.gz" + + wget "https://nodejs.org/dist/$node/node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to download node release" + + tar -zxf "node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to untar node" + + rm -rf "node-$node-linux-$arch.tar.gz" + + if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then + echo_green "Success" + else + Red_Error "[x] Node installation failed!" + fi + + echo + echo_yellow "=============== Node.JS Version ===============" + echo_yellow " node: $("$node_install_path"/bin/node -v)" + echo_yellow " npm: v$(env "$node_install_path"/bin/node "$node_install_path"/bin/npm -v)" + echo_yellow "=============== Node.JS Version ===============" + echo + + sleep 3 +} + # Check root permission check_sudo() { if [ "$EUID" -ne 0 ]; then From 11c3054886ef43f531eabeab70014b4537881c5e Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Sun, 5 May 2024 22:26:12 +0800 Subject: [PATCH 011/338] add function to create backup --- install_update.sh | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/install_update.sh b/install_update.sh index 043f2f6..3b7b770 100644 --- a/install_update.sh +++ b/install_update.sh @@ -82,6 +82,44 @@ Install_node() { sleep 3 } +backup_mcs_manager() { + # Ensure both directories are provided + if [ -z "$mcsmanager_install_path" ] || [ -z "$mcsm_backup_dir" ]; then + echo "Error: Backup or source path not set." + return 1 # Return with error + fi + + # Check if the source directory exists + if [ ! -d "$mcsmanager_install_path" ]; then + echo "Error: Source directory does not exist." + return 1 # Return with error + fi + + # Create backup directory (/opt) if it doesn't exist + if [ ! -d "$mcsm_backup_dir" ]; then + echo "Creating backup directory." + mkdir -p "$mcsm_backup_dir" + fi + + # Format the date for the backup filename + local current_date=$(date +%Y_%m_%d) + + # Define the backup path + backup_path="${mcsm_backup_dir}/mcsm_backup_${current_date}.tar.gz" + + # Create the backup + echo "Creating backup..." + tar -czf "$backup_path" -C "$mcsmanager_install_path" . + + # Check if the backup was successful + if [ $? -eq 0 ]; then + echo "Backup created successfully at $backup_path" + else + echo "Error creating backup." + return 1 # Return with error + fi +} + # Check root permission check_sudo() { if [ "$EUID" -ne 0 ]; then From 530b17761c081461cfcc3091850539241cd5189f Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Sun, 5 May 2024 22:26:42 +0800 Subject: [PATCH 012/338] rename backup function --- install_update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install_update.sh b/install_update.sh index 3b7b770..14cc182 100644 --- a/install_update.sh +++ b/install_update.sh @@ -82,7 +82,7 @@ Install_node() { sleep 3 } -backup_mcs_manager() { +Backup_MCSM() { # Ensure both directories are provided if [ -z "$mcsmanager_install_path" ] || [ -z "$mcsm_backup_dir" ]; then echo "Error: Backup or source path not set." From b130f3d55671fa4b3c518907040c054137a00c72 Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Sun, 5 May 2024 22:32:43 +0800 Subject: [PATCH 013/338] add dependencies installation --- install_update.sh | 63 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 43 insertions(+), 20 deletions(-) diff --git a/install_update.sh b/install_update.sh index 14cc182..d606d00 100644 --- a/install_update.sh +++ b/install_update.sh @@ -1,19 +1,24 @@ #!/bin/bash #Global arguments -#MCSM install dir +# System architecture +arch=$(uname -m) +# MCSM install dir mcsmanager_install_path="/opt/mcsmanager" -#MCSM backup dir +# MCSM backup dir mcsm_backup_dir="/opt/" -#Created backup absolute path +# Created backup absolute path backup_path="" -#Download URL +# Download URL mcsmanager_donwload_addr="http://oss.duzuii.com/d/MCSManager/MCSManager/MCSManager-v10-linux.tar.gz" -#File name +# File name package_name="MCSManager-v10-linux.tar.gz" -#Node.js version to install +# Node.js version to install node="v20.12.2" -arch=$(uname -m) +# Node.js install dir +node_install_path="/opt/node-$node-linux-$arch" + + # Default systemd user is 'mcsm' USER="mcsm" @@ -51,6 +56,30 @@ echo_yellow() { printf '\033[1;33m%b\033[0m\n' "$@" } +# Check root permission +check_sudo() { + if [ "$EUID" -ne 0 ]; then + echo "This script must be run as root. Please use \"sudo or root user\" instead." + exit 1 + fi +} + +Install_dependencies() { + # Install related software + echo_cyan_n "[+] Installing dependent software (git, tar, wget)... " + if [[ -x "$(command -v yum)" ]]; then + yum install -y git tar wget + elif [[ -x "$(command -v apt-get)" ]]; then + apt-get install -y git tar wget + elif [[ -x "$(command -v pacman)" ]]; then + pacman -S --noconfirm git tar wget + elif [[ -x "$(command -v zypper)" ]]; then + zypper --non-interactive install git tar wget + else + echo_red "[!] Cannot find your package manager! You may need to install git, tar and wget manually!" + fi +} + Install_node() { echo_cyan_n "[+] Install Node.js environment...\n" @@ -119,15 +148,10 @@ Backup_MCSM() { return 1 # Return with error fi } - -# Check root permission -check_sudo() { - if [ "$EUID" -ne 0 ]; then - echo "This script must be run as root. Please use \"sudo or root user\" instead." - exit 1 - fi -} +########### Main Logic ################ check_sudo +# Install Dependencies +Install_dependencies # Parse provided arguments while getopts "u:c:" opt; do @@ -172,11 +196,10 @@ esac # Check if the mcsmanager_install_path exists if [ -d "$mcsmanager_install_path" ]; then - echo "The directory '$mcsmanager_install_path' exists." - # Logic branch when the directory exists - # For example, list the contents - echo "Listing contents of $mcsmanager_install_path:" - ls -l "$directory" + # Backup first + Backup_MCSM + # Install Node.js, this is to ensure the version is up to date. + else echo "The directory '$mcsmanager_install_path' does not exist." # Logic branch when the directory does not exist From 7070e2dd5deaefc2c6b483bf789f768389063933 Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Sun, 5 May 2024 22:33:47 +0800 Subject: [PATCH 014/338] add original functions to check dependencies --- install_update.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/install_update.sh b/install_update.sh index d606d00..fdd92a5 100644 --- a/install_update.sh +++ b/install_update.sh @@ -78,6 +78,14 @@ Install_dependencies() { else echo_red "[!] Cannot find your package manager! You may need to install git, tar and wget manually!" fi + + # Determine whether the relevant software is installed successfully + if [[ -x "$(command -v git)" && -x "$(command -v tar)" && -x "$(command -v wget)" ]]; then + echo_green "Success" + else + Red_Error "[x] Failed to find git, tar and wget, please install them manually!" + fi + } Install_node() { From 16e55ed38b8f8cec8556456edf1e5833a4bab07c Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Sun, 5 May 2024 22:46:43 +0800 Subject: [PATCH 015/338] put current_date as a global variable --- install_update.sh | 77 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 71 insertions(+), 6 deletions(-) diff --git a/install_update.sh b/install_update.sh index fdd92a5..bb25489 100644 --- a/install_update.sh +++ b/install_update.sh @@ -17,8 +17,12 @@ package_name="MCSManager-v10-linux.tar.gz" node="v20.12.2" # Node.js install dir node_install_path="/opt/node-$node-linux-$arch" - - +# MCSM Web dir name +mcsm_web="web" +# MCSM daemon dir name +mcsm_daemon="daemon" +# The date variable to be shared across functions +local current_date=$(date +%Y_%m_%d) # Default systemd user is 'mcsm' USER="mcsm" @@ -110,7 +114,7 @@ Install_node() { fi echo - echo_yellow "=============== Node.JS Version ===============" + echo_yellow "=============== Node.js Version ===============" echo_yellow " node: $("$node_install_path"/bin/node -v)" echo_yellow " npm: v$(env "$node_install_path"/bin/node "$node_install_path"/bin/npm -v)" echo_yellow "=============== Node.JS Version ===============" @@ -138,9 +142,6 @@ Backup_MCSM() { mkdir -p "$mcsm_backup_dir" fi - # Format the date for the backup filename - local current_date=$(date +%Y_%m_%d) - # Define the backup path backup_path="${mcsm_backup_dir}/mcsm_backup_${current_date}.tar.gz" @@ -156,6 +157,68 @@ Backup_MCSM() { return 1 # Return with error fi } + +# MCSM Web Update & Installation +Install_Web() { + web_path="$mcsmanager_install_path/$mcsm_web" + web_data="$mcsmanager_install_path/web_data" + if [ -d "$web_path" ]; then + echo_cyan "[+] Updating MCSManager Web..." + # The backup should be created already, moving the DATA dir to /opt/mcsmanager/web_data should be fast and safe. + # Use web_data, do not use data as in rare circumstance user may run both update at the same time. + # Use mv command, this won't create issue in case of an incomplete previous installation (e.g. empty mcsm dir) + + else + echo "The directory '$mcsmanager_install_path' does not exist." + # Logic branch when the directory does not exist + # For example, create the directory + echo "Creating $mcsmanager_install_path..." + fi + echo_cyan "[+] Install MCSManager Web..." + + # stop service + systemctl disable --now mcsm-{web} + + # delete service + rm -rf /etc/systemd/system/mcsm-{daemon,web}.service + systemctl daemon-reload + + mkdir -p "${mcsmanager_install_path}" || Red_Error "[x] Failed to create ${mcsmanager_install_path}" + + # cd /opt/mcsmanager + cd "${mcsmanager_install_path}" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}" + + # donwload MCSManager release + wget "${mcsmanager_donwload_addr}" || Red_Error "[x] Failed to download MCSManager" + tar -zxf ${package_name} -o || Red_Error "[x] Failed to untar ${package_name}" + rm -rf "${mcsmanager_install_path}/${package_name}" + + # echo "[→] cd daemon" + cd "${mcsmanager_install_path}/daemon" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/daemon" + + echo_cyan "[+] Install MCSManager-Daemon dependencies..." + env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${mcsmanager_install_path}/daemon" + + # echo "[←] cd .." + cd "${mcsmanager_install_path}/web" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/web" + + echo_cyan "[+] Install MCSManager-Web dependencies..." + env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${mcsmanager_install_path}/web" + + echo + echo_yellow "=============== MCSManager ===============" + echo_green "Daemon: ${mcsmanager_install_path}/daemon" + echo_green "Web: ${mcsmanager_install_path}/web" + echo_yellow "=============== MCSManager ===============" + echo + echo_green "[+] MCSManager installation success!" + + chmod -R 755 "$mcsmanager_install_path" + + sleep 3 +} + + ########### Main Logic ################ check_sudo # Install Dependencies @@ -207,6 +270,8 @@ if [ -d "$mcsmanager_install_path" ]; then # Backup first Backup_MCSM # Install Node.js, this is to ensure the version is up to date. + Install_node + # else echo "The directory '$mcsmanager_install_path' does not exist." From ff1ab79b3476b7f418acc923cd1571e9221393b2 Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Sun, 5 May 2024 22:56:10 +0800 Subject: [PATCH 016/338] create separate function for program initialize --- install_update.sh | 38 +++++++++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/install_update.sh b/install_update.sh index bb25489..6565e8f 100644 --- a/install_update.sh +++ b/install_update.sh @@ -23,7 +23,8 @@ mcsm_web="web" mcsm_daemon="daemon" # The date variable to be shared across functions local current_date=$(date +%Y_%m_%d) - +# MCSM local temp dir for downloaded source +mcsm_down_temp="/opt/mcsmanager_${current_date}" # Default systemd user is 'mcsm' USER="mcsm" COMMAND="all" @@ -122,6 +123,17 @@ Install_node() { sleep 3 } +# Initialization +Initialize() { + # Check sudo + check_sudo + + # Check dependencies + Install_dependencies + + # Check and download MCSM source + +} Backup_MCSM() { # Ensure both directories are provided @@ -157,22 +169,29 @@ Backup_MCSM() { return 1 # Return with error fi } +# MCSM Web Base Installation +Install_MCSM_Web_Base() { + + +} + # MCSM Web Update & Installation -Install_Web() { - web_path="$mcsmanager_install_path/$mcsm_web" - web_data="$mcsmanager_install_path/web_data" +Install_Web_wrapper() { + web_path="${mcsmanager_install_path}/${mcsm_web}" + web_data="${web_path}/data" + web_data_tmp="${mcsmanager_install_path}/web_data_${current_date}" if [ -d "$web_path" ]; then echo_cyan "[+] Updating MCSManager Web..." # The backup should be created already, moving the DATA dir to /opt/mcsmanager/web_data should be fast and safe. # Use web_data, do not use data as in rare circumstance user may run both update at the same time. # Use mv command, this won't create issue in case of an incomplete previous installation (e.g. empty mcsm dir) + mv "$web_data" "$web_data_tmp" + # Remove the old web dir + rm -rf "$web_path" else echo "The directory '$mcsmanager_install_path' does not exist." - # Logic branch when the directory does not exist - # For example, create the directory - echo "Creating $mcsmanager_install_path..." fi echo_cyan "[+] Install MCSManager Web..." @@ -220,10 +239,7 @@ Install_Web() { ########### Main Logic ################ -check_sudo -# Install Dependencies -Install_dependencies - +Initialize # Parse provided arguments while getopts "u:c:" opt; do case ${opt} in From cdb216052dea3f1d2cf12644eea5233f634d9299 Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Sun, 5 May 2024 23:15:20 +0800 Subject: [PATCH 017/338] create separate install base --- install_update.sh | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/install_update.sh b/install_update.sh index 6565e8f..54fcc47 100644 --- a/install_update.sh +++ b/install_update.sh @@ -3,12 +3,12 @@ #Global arguments # System architecture arch=$(uname -m) +# Install base dir +install_base="/opt" # MCSM install dir -mcsmanager_install_path="/opt/mcsmanager" +mcsmanager_install_path="${install_base}/mcsmanager" # MCSM backup dir -mcsm_backup_dir="/opt/" -# Created backup absolute path -backup_path="" +mcsm_backup_dir="${install_base}" # Download URL mcsmanager_donwload_addr="http://oss.duzuii.com/d/MCSManager/MCSManager/MCSManager-v10-linux.tar.gz" # File name @@ -16,7 +16,7 @@ package_name="MCSManager-v10-linux.tar.gz" # Node.js version to install node="v20.12.2" # Node.js install dir -node_install_path="/opt/node-$node-linux-$arch" +node_install_path="${install_base}/node-$node-linux-$arch" # MCSM Web dir name mcsm_web="web" # MCSM daemon dir name @@ -28,6 +28,8 @@ mcsm_down_temp="/opt/mcsmanager_${current_date}" # Default systemd user is 'mcsm' USER="mcsm" COMMAND="all" +# Created backup absolute path +backup_path="" # Helper Functions usage() { @@ -123,11 +125,27 @@ Install_node() { sleep 3 } +# Check and download MCSM source +Check_and_download_source() { + if [ -d "$mcsm_down_temp" ]; then + echo_cyan "[+] Downloading MCSManager..." + # Remove the downloaded source if existed, the source dir name contains current date, so its unlikely to coincide with other name(s) + rm -rf "$mcsm_down_temp" + mkdir -p "$mcsm_down_temp" || Red_Error "[x] Failed to create ${mcsm_down_temp}" + + else + mkdir -p "$mcsm_down_temp" || Red_Error "[x] Failed to create ${mcsm_down_temp}" + fi + +} # Initialization Initialize() { # Check sudo check_sudo - + + # Check if install base (/opt) exist + mkdir -p "$install_base" + # Check dependencies Install_dependencies From b07692f9061628f3a4f27d06fbc770c437ad2c5f Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Sun, 5 May 2024 23:36:56 +0800 Subject: [PATCH 018/338] add function to check and download MCSM source --- install_update.sh | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/install_update.sh b/install_update.sh index 54fcc47..e13eee0 100644 --- a/install_update.sh +++ b/install_update.sh @@ -127,17 +127,27 @@ Install_node() { } # Check and download MCSM source Check_and_download_source() { - if [ -d "$mcsm_down_temp" ]; then - echo_cyan "[+] Downloading MCSManager..." - # Remove the downloaded source if existed, the source dir name contains current date, so its unlikely to coincide with other name(s) - rm -rf "$mcsm_down_temp" - mkdir -p "$mcsm_down_temp" || Red_Error "[x] Failed to create ${mcsm_down_temp}" - - else - mkdir -p "$mcsm_down_temp" || Red_Error "[x] Failed to create ${mcsm_down_temp}" - fi + # Empty the temp dir if existed + rm -rf "$mcsm_down_temp" + mkdir -p "$mcsm_down_temp" + + # Download the archive directly into the temporary directory + wget -O "${mcsm_down_temp}/mcsmanager.tar.gz" "$mcsmanager_download_addr" + if [ $? -ne 0 ]; then + echo "Download failed." + return 1 # Exit if download fails + fi + + # Extract the archive without changing directories + tar -xzf "${mcsm_down_temp}/mcsmanager.tar.gz" -C "$mcsm_down_temp" --strip-components=1 + if [ $? -ne 0 ]; then + echo "Extraction failed." + return 1 # Exit if extraction fails + fi + + # Clean up the downloaded tar.gz file + rm "${mcsm_down_temp}/mcsmanager.tar.gz" -} # Initialization Initialize() { # Check sudo @@ -150,7 +160,7 @@ Initialize() { Install_dependencies # Check and download MCSM source - + Check_and_download_source } Backup_MCSM() { @@ -188,6 +198,7 @@ Backup_MCSM() { fi } # MCSM Web Base Installation +# Assume a fresh install (i.e. no file(s) from previous installation) Install_MCSM_Web_Base() { From d92adc59a14cf72c7a7ba04546732d76e3a45c5c Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Sun, 5 May 2024 23:39:18 +0800 Subject: [PATCH 019/338] update initialization section --- install_update.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/install_update.sh b/install_update.sh index e13eee0..03e3824 100644 --- a/install_update.sh +++ b/install_update.sh @@ -156,6 +156,9 @@ Initialize() { # Check if install base (/opt) exist mkdir -p "$install_base" + # Create mcsmanager path if not already + mkdir -p "$mcsmanager_install_path" + # Check dependencies Install_dependencies @@ -198,9 +201,9 @@ Backup_MCSM() { fi } # MCSM Web Base Installation -# Assume a fresh install (i.e. no file(s) from previous installation) +# Assuming a fresh install (i.e. no file(s) from previous installation) and downloaded source Install_MCSM_Web_Base() { - + # Creat } From d0e43edba44d3fb09900a9f6abfde38ddd1c8d69 Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Sun, 5 May 2024 23:58:31 +0800 Subject: [PATCH 020/338] add web base install --- install_update.sh | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/install_update.sh b/install_update.sh index 03e3824..1256cb5 100644 --- a/install_update.sh +++ b/install_update.sh @@ -11,8 +11,6 @@ mcsmanager_install_path="${install_base}/mcsmanager" mcsm_backup_dir="${install_base}" # Download URL mcsmanager_donwload_addr="http://oss.duzuii.com/d/MCSManager/MCSManager/MCSManager-v10-linux.tar.gz" -# File name -package_name="MCSManager-v10-linux.tar.gz" # Node.js version to install node="v20.12.2" # Node.js install dir @@ -203,13 +201,23 @@ Backup_MCSM() { # MCSM Web Base Installation # Assuming a fresh install (i.e. no file(s) from previous installation) and downloaded source Install_MCSM_Web_Base() { - # Creat - + # Move downloaded path + mv "${mcsm_down_temp}/${mcsm_web}" "$web_path" + # Move back the data directory + rm -rf "$web_data" + mv "${web_data_tmp}" "${web_data}" + # Dependencies install + cd "${web_path}" || Red_Error "[x] Failed to enter ${web_path}" + # Install dependencies + echo_cyan "[+] Install MCSManager-Web dependencies..." + env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${web_path}" + # Return to general dir + cd "$mcsmanager_install_path" } # MCSM Web Update & Installation -Install_Web_wrapper() { +Install_Web_Wrapper() { web_path="${mcsmanager_install_path}/${mcsm_web}" web_data="${web_path}/data" web_data_tmp="${mcsmanager_install_path}/web_data_${current_date}" @@ -227,13 +235,18 @@ Install_Web_wrapper() { fi echo_cyan "[+] Install MCSManager Web..." - # stop service - systemctl disable --now mcsm-{web} + # stop and disable service + systemctl disable --now mcsm-web # delete service - rm -rf /etc/systemd/system/mcsm-{daemon,web}.service + rm -rf /etc/systemd/system/mcsm-web.service systemctl daemon-reload - + + # Install MCSM Web + Install_MCSM_Web_Base + + + mkdir -p "${mcsmanager_install_path}" || Red_Error "[x] Failed to create ${mcsmanager_install_path}" # cd /opt/mcsmanager From 092021ce45c9ceef2789b6aad062495bf8ffc2c7 Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Mon, 6 May 2024 00:08:05 +0800 Subject: [PATCH 021/338] add mcsm user creation to initialize --- install_update.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/install_update.sh b/install_update.sh index 1256cb5..924b03c 100644 --- a/install_update.sh +++ b/install_update.sh @@ -23,6 +23,10 @@ mcsm_daemon="daemon" local current_date=$(date +%Y_%m_%d) # MCSM local temp dir for downloaded source mcsm_down_temp="/opt/mcsmanager_${current_date}" +# Service file for MCSCM Web +service_file_web="/etc/systemd/system/mcsm-web.service" +# Service file for MCSM daemon +service_file_daemon="/etc/systemd/system/mcsm-daemon.service" # Default systemd user is 'mcsm' USER="mcsm" COMMAND="all" @@ -162,6 +166,17 @@ Initialize() { # Check and download MCSM source Check_and_download_source + + # Create mcsm user if needed + if [[ "$USER" == *"mcsm"* ]]; then + # Create the user 'mcsm' if it doesn't already exist + if ! id "mcsm" &>/dev/null; then + useradd mcsm + echo "User 'mcsm' created." + else + echo "User 'mcsm' already exists." + fi + fi } Backup_MCSM() { @@ -214,7 +229,24 @@ Install_MCSM_Web_Base() { # Return to general dir cd "$mcsmanager_install_path" } +# MCSM Web Service Installation +Install_Web_Systemd() { + echo_cyan "[+] Creating MCSManager Web service..." + echo "[Unit] + Description=MCSManager-Web + + [Service] + WorkingDirectory=${web_path} + ExecStart=${node_install_path}/bin/node app.js + ExecReload=/bin/kill -s QUIT \$MAINPID + ExecStop=/bin/kill -s QUIT \$MAINPID + Environment=\"PATH=${PATH}\" + + [Install] + WantedBy=multi-user.target + " >/etc/systemd/system/mcsm-web.service +} # MCSM Web Update & Installation Install_Web_Wrapper() { From 552fc8c9ce04de565bc7d37280951723e5709c61 Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Mon, 6 May 2024 00:25:31 +0800 Subject: [PATCH 022/338] add mcsm web installation --- install_update.sh | 60 ++++++++++++++++++----------------------------- 1 file changed, 23 insertions(+), 37 deletions(-) diff --git a/install_update.sh b/install_update.sh index 924b03c..c962b76 100644 --- a/install_update.sh +++ b/install_update.sh @@ -228,11 +228,18 @@ Install_MCSM_Web_Base() { env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${web_path}" # Return to general dir cd "$mcsmanager_install_path" + # Configure ownership if needed + if [[ "$USER" == *"mcsm"* ]]; then + # Change file permission to mcsm user + chown -R mcsm:mcsm "$web_path" + fi + chmod -R 755 "$web_path" } # MCSM Web Service Installation Install_Web_Systemd() { echo_cyan "[+] Creating MCSManager Web service..." - echo "[Unit] + # Create the default service file + echo "[Unit] Description=MCSManager-Web [Service] @@ -245,7 +252,19 @@ Install_Web_Systemd() { [Install] WantedBy=multi-user.target " >/etc/systemd/system/mcsm-web.service - + # Add user section if using mcsm user + if [[ "$USER" == *"mcsm"* ]]; then + # Check if the 'User=mcsm' line already exists in the service file + if grep -q "^User=mcsm$" "$service_file"; then + echo "The service file is configured already." + else + # Add 'User=mcsm' to the service file + sed -i '/^\[Service\]$/a User=mcsm' "$service_file" + fi + fi + # Reload Systemd Service + systemctl daemon-reload + } # MCSM Web Update & Installation @@ -277,41 +296,8 @@ Install_Web_Wrapper() { # Install MCSM Web Install_MCSM_Web_Base - - - mkdir -p "${mcsmanager_install_path}" || Red_Error "[x] Failed to create ${mcsmanager_install_path}" - - # cd /opt/mcsmanager - cd "${mcsmanager_install_path}" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}" - - # donwload MCSManager release - wget "${mcsmanager_donwload_addr}" || Red_Error "[x] Failed to download MCSManager" - tar -zxf ${package_name} -o || Red_Error "[x] Failed to untar ${package_name}" - rm -rf "${mcsmanager_install_path}/${package_name}" - - # echo "[→] cd daemon" - cd "${mcsmanager_install_path}/daemon" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/daemon" - - echo_cyan "[+] Install MCSManager-Daemon dependencies..." - env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${mcsmanager_install_path}/daemon" - - # echo "[←] cd .." - cd "${mcsmanager_install_path}/web" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/web" - - echo_cyan "[+] Install MCSManager-Web dependencies..." - env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${mcsmanager_install_path}/web" - - echo - echo_yellow "=============== MCSManager ===============" - echo_green "Daemon: ${mcsmanager_install_path}/daemon" - echo_green "Web: ${mcsmanager_install_path}/web" - echo_yellow "=============== MCSManager ===============" - echo - echo_green "[+] MCSManager installation success!" - - chmod -R 755 "$mcsmanager_install_path" - - sleep 3 + # Install MCSM Web Service + Install_Web_Systemd } From 6de15c8eb18fc92b763b775ba71bc263d5fd18e5 Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Mon, 6 May 2024 00:27:27 +0800 Subject: [PATCH 023/338] add mcsm daemon base install --- install_update.sh | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/install_update.sh b/install_update.sh index c962b76..6dbc123 100644 --- a/install_update.sh +++ b/install_update.sh @@ -300,7 +300,28 @@ Install_Web_Wrapper() { Install_Web_Systemd } - +# MCSM Daemon Base Installation +# Assuming a fresh install (i.e. no file(s) from previous installation) and downloaded source +Install_MCSM_Daemon_Base() { + # Move downloaded path + mv "${mcsm_down_temp}/${mcsm_daemon}" "$daemon_path" + # Move back the data directory + rm -rf "$daemon_data" + mv "${web_daemon_tmp}" "${daemon_data}" + # Dependencies install + cd "${daemon_path}" || Red_Error "[x] Failed to enter ${daemon_path}" + # Install dependencies + echo_cyan "[+] Install MCSManager-Daemon dependencies..." + env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${daemon_path}" + # Return to general dir + cd "$mcsmanager_install_path" + # Configure ownership if needed + if [[ "$USER" == *"mcsm"* ]]; then + # Change file permission to mcsm user + chown -R mcsm:mcsm "$daemon_path" + fi + chmod -R 755 "$daemon_path" +} ########### Main Logic ################ Initialize # Parse provided arguments From acd7f5ca6730b8c7d5d258c7b27af456f7e857a4 Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Mon, 6 May 2024 00:37:45 +0800 Subject: [PATCH 024/338] add mcsm daemon systemd service --- install_update.sh | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/install_update.sh b/install_update.sh index 6dbc123..3fda8e0 100644 --- a/install_update.sh +++ b/install_update.sh @@ -322,6 +322,40 @@ Install_MCSM_Daemon_Base() { fi chmod -R 755 "$daemon_path" } + +# MCSM Daemon Service Installation +Install_Daemon_Systemd() { + echo_cyan "[+] Creating MCSManager Daemon service..." + # Create the default service file + echo "[Unit] + Description=MCSManager-Daemon + + [Service] + WorkingDirectory=${daemon_path} + ExecStart=${node_install_path}/bin/node app.js + ExecReload=/bin/kill -s QUIT \$MAINPID + ExecStop=/bin/kill -s QUIT \$MAINPID + Environment=\"PATH=${PATH}\" + + [Install] + WantedBy=multi-user.target + " >/etc/systemd/system/mcsm-daemon.service + # Add user section if using mcsm user + if [[ "$USER" == *"mcsm"* ]]; then + # Check if the 'User=mcsm' line already exists in the service file + if grep -q "^User=mcsm$" "$service_file"; then + echo "The service file is configured already." + else + # Add 'User=mcsm' to the service file + sed -i '/^\[Service\]$/a User=mcsm' "$service_file" + fi + fi + # Reload Systemd Service + systemctl daemon-reload + +} + + ########### Main Logic ################ Initialize # Parse provided arguments From 9433bf24bbb334e1e54d553ba34fd8cd6fa1354c Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Mon, 6 May 2024 00:38:54 +0800 Subject: [PATCH 025/338] consolidate systemd commands --- install_update.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/install_update.sh b/install_update.sh index 3fda8e0..6d8213e 100644 --- a/install_update.sh +++ b/install_update.sh @@ -238,6 +238,13 @@ Install_MCSM_Web_Base() { # MCSM Web Service Installation Install_Web_Systemd() { echo_cyan "[+] Creating MCSManager Web service..." + # stop and disable existing service + systemctl disable --now mcsm-web + + # delete existing service + rm -rf /etc/systemd/system/mcsm-web.service + systemctl daemon-reload + # Create the default service file echo "[Unit] Description=MCSManager-Web @@ -285,13 +292,6 @@ Install_Web_Wrapper() { echo "The directory '$mcsmanager_install_path' does not exist." fi echo_cyan "[+] Install MCSManager Web..." - - # stop and disable service - systemctl disable --now mcsm-web - - # delete service - rm -rf /etc/systemd/system/mcsm-web.service - systemctl daemon-reload # Install MCSM Web Install_MCSM_Web_Base From 197ef9b12e9e209fae235a3248cbc75a509c5afe Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Mon, 6 May 2024 00:52:44 +0800 Subject: [PATCH 026/338] add argument parsing to separate function --- install_update.sh | 98 +++++++++++++++++++++++++++++------------------ 1 file changed, 60 insertions(+), 38 deletions(-) diff --git a/install_update.sh b/install_update.sh index 6d8213e..4b51331 100644 --- a/install_update.sh +++ b/install_update.sh @@ -354,49 +354,71 @@ Install_Daemon_Systemd() { systemctl daemon-reload } +# MCSM Web Update & Installation +Install_Daemon_Wrapper() { + web_path="${mcsmanager_install_path}/${mcsm_daemon}" + web_data="${web_daemon}/data" + web_data_tmp="${mcsmanager_install_path}/daemon_data_${current_date}" + if [ -d "$daemon_path" ]; then + echo_cyan "[+] Updating MCSManager Daemon..." + # The backup should be created already, moving the DATA dir to /opt/mcsmanager/daemon_data should be fast and safe. + # Use daemon_data, do not use data as in rare circumstance user may run both update at the same time. + # Use mv command, this won't create issue in case of an incomplete previous installation (e.g. empty mcsm dir) + mv "$daemon_data" "$daemon_data_tmp" + # Remove the old daemon dir + rm -rf "$daemon_path" + + else + echo "The directory '$mcsmanager_install_path' does not exist." + fi + echo_cyan "[+] Install MCSManager daemon..." + + # Install MCSM Web + Install_MCSM_Daemon_Base + + # Install MCSM Web Service + Install_Daemon_Systemd +} +# Arguments parsing +Parse_Arguments() { + +} + +# Wrapper for installation +Install_Update() { + while getopts "u:c:" opt; do + case ${opt} in + u ) + if [[ "${OPTARG}" == "mcsm" || "${OPTARG}" == "root" ]]; then + user="${OPTARG}" + else + echo "Invalid user specified." + usage + fi + ;; + c ) + if [[ "${OPTARG}" == "web" || "${OPTARG}" == "daemon" || "${OPTARG}" == "all" ]]; then + command="${OPTARG}" + else + echo "Invalid command specified." + usage + fi + ;; + \? ) + usage + ;; + : ) + echo "Option -$OPTARG requires an argument." + usage + ;; + esac + done +} ########### Main Logic ################ Initialize # Parse provided arguments -while getopts "u:c:" opt; do - case ${opt} in - u ) - if [[ "${OPTARG}" == "mcsm" || "${OPTARG}" == "root" ]]; then - user="${OPTARG}" - else - echo "Invalid user specified." - usage - fi - ;; - c ) - if [[ "${OPTARG}" == "web" || "${OPTARG}" == "daemon" || "${OPTARG}" == "all" ]]; then - command="${OPTARG}" - else - echo "Invalid command specified." - usage - fi - ;; - \? ) - usage - ;; - : ) - echo "Option -$OPTARG requires an argument." - usage - ;; - esac -done - -# Logic for different users -case ${USER} in - root) - ;; - mcsm) - ;; - *) - echo "Unknown user: ${USER}. Using default user mcsm..." - ;; -esac # Check if the mcsmanager_install_path exists From 87cf66b242938d12e66239ecb3b5c24f9445a844 Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Mon, 6 May 2024 00:53:09 +0800 Subject: [PATCH 027/338] fix argument parsing position --- install_update.sh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/install_update.sh b/install_update.sh index 4b51331..8adcf07 100644 --- a/install_update.sh +++ b/install_update.sh @@ -381,13 +381,6 @@ Install_Daemon_Wrapper() { } # Arguments parsing Parse_Arguments() { - - - -} - -# Wrapper for installation -Install_Update() { while getopts "u:c:" opt; do case ${opt} in u ) @@ -416,6 +409,10 @@ Install_Update() { esac done } + +# Wrapper for installation +Install_Update() { +} ########### Main Logic ################ Initialize # Parse provided arguments From 57d02555f87fe4704b90a03f2d6554d5dbf23f9e Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Mon, 6 May 2024 00:59:03 +0800 Subject: [PATCH 028/338] rearrange some commands --- install_update.sh | 42 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 6 deletions(-) diff --git a/install_update.sh b/install_update.sh index 8adcf07..c7b67a4 100644 --- a/install_update.sh +++ b/install_update.sh @@ -412,6 +412,33 @@ Parse_Arguments() { # Wrapper for installation Install_Update() { + case "$COMMAND" in + all) + Install_Web_Wrapper + Install_Daemon_Wrapper + ;; + + web) + Install_Web_Wrapper + ;; + + daemon) + Install_Daemon_Wrapper + ;; + + *) + echo "Unknown command: $COMMAND, this should not happen in general :( Please report this bug." + # Exit with an error if COMMAND is unrecognized + exit 1 + ;; +esac +} +# Finalize installation +Finalize() { + + + + } ########### Main Logic ################ Initialize @@ -424,11 +451,14 @@ if [ -d "$mcsmanager_install_path" ]; then Backup_MCSM # Install Node.js, this is to ensure the version is up to date. Install_node - # else - echo "The directory '$mcsmanager_install_path' does not exist." - # Logic branch when the directory does not exist - # For example, create the directory - echo "Creating $mcsmanager_install_path..." -fi \ No newline at end of file + # Install Node.js, this is to ensure the version is up to date. + Install_node +fi + +# Install Services based on command +Install_Update + +# Print Information +echo "Installation Complete!" \ No newline at end of file From 112ecda518cb652c9d08f05a8c25c6c45de96400 Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Mon, 6 May 2024 00:59:37 +0800 Subject: [PATCH 029/338] enable and start service as install --- install_update.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install_update.sh b/install_update.sh index c7b67a4..77b00ba 100644 --- a/install_update.sh +++ b/install_update.sh @@ -271,7 +271,7 @@ Install_Web_Systemd() { fi # Reload Systemd Service systemctl daemon-reload - + systemctl enable --now mcsm-web } # MCSM Web Update & Installation @@ -352,7 +352,7 @@ Install_Daemon_Systemd() { fi # Reload Systemd Service systemctl daemon-reload - + systemctl enable --now mcsm-daemon } # MCSM Web Update & Installation Install_Daemon_Wrapper() { From 4ae4d8465013836c82191b3762bc1136d9209486 Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Mon, 6 May 2024 01:04:39 +0800 Subject: [PATCH 030/338] print different information based on install cmd --- install_update.sh | 63 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) diff --git a/install_update.sh b/install_update.sh index 77b00ba..992d617 100644 --- a/install_update.sh +++ b/install_update.sh @@ -435,7 +435,68 @@ esac } # Finalize installation Finalize() { - + printf "\n\n\n\n" + case "$COMMAND" in + all) + echo_yellow "==================================================================" + echo_green "Installation is complete! Welcome to the MCSManager!!!" + echo_yellow " " + echo_cyan_n "HTTP Web Service: " + echo_yellow "http://:23333 (Browser)" + echo_cyan_n "Daemon Address: " + echo_yellow "ws://:24444 (Cluster)" + echo_red "You must expose ports 23333 and 24444 to use the service properly on the Internet." + echo_yellow " " + echo_cyan "Usage:" + echo_cyan "systemctl start mcsm-{daemon,web}.service" + echo_cyan "systemctl stop mcsm-{daemon,web}.service" + echo_cyan "systemctl restart mcsm-{daemon,web}.service" + echo_yellow " " + echo_green "Official Document: https://docs.mcsmanager.com/" + echo_yellow "==================================================================" + ;; + + web) + echo_yellow "==================================================================" + echo_green "Installation is complete! Welcome to the MCSManager!!!" + echo_yellow " " + echo_cyan_n "HTTP Web Service: " + echo_yellow "http://:23333 (Browser)" + echo_red "You must expose port 23333 to use the service properly on the Internet." + echo_yellow " " + echo_cyan "Usage:" + echo_cyan "systemctl start mcsm-web.service" + echo_cyan "systemctl stop mcsm-web.service" + echo_cyan "systemctl restart mcsm-web.service" + echo_yellow " " + echo_green "Official Document: https://docs.mcsmanager.com/" + echo_yellow "==================================================================" + ;; + + daemon) + echo_yellow "==================================================================" + echo_green "Installation is complete! Welcome to the MCSManager!!!" + echo_yellow " " + echo_cyan_n "Daemon Address: " + echo_yellow "ws://:24444 (Cluster)" + echo_red "You must expose port 24444 to use the service properly on the Internet." + echo_yellow " " + echo_cyan "Usage:" + echo_cyan "systemctl start mcsm-daemon.service" + echo_cyan "systemctl stop mcsm-daemon.service" + echo_cyan "systemctl restart mcsm-daemon.service" + echo_yellow " " + echo_green "Official Document: https://docs.mcsmanager.com/" + echo_yellow "==================================================================" + ;; + + *) + echo "Unknown command: $COMMAND, this should not happen in general :( Please report this bug." + # Exit with an error if COMMAND is unrecognized + exit 1 + ;; + + From bbc062eb870e701ace94b371d8d73a34ac38e406 Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Mon, 6 May 2024 01:08:00 +0800 Subject: [PATCH 031/338] complete main logic --- install_update.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/install_update.sh b/install_update.sh index 992d617..0c87f6a 100644 --- a/install_update.sh +++ b/install_update.sh @@ -495,11 +495,11 @@ Finalize() { # Exit with an error if COMMAND is unrecognized exit 1 ;; - - - - - + # Check if backup_path is not empty + if [[ -n "$backup_path" ]]; then + echo "Your MCSM has been updated and/or installed. A complete backup was created at: $backup_path" + echo "You can manually delete the backup using command: rm ${backup_path}" + fi } ########### Main Logic ################ Initialize @@ -521,5 +521,7 @@ fi # Install Services based on command Install_Update -# Print Information +# Print helping Information +Finalize + echo "Installation Complete!" \ No newline at end of file From a8dc6dba70f39b136c109646f41e9608671d00de Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Mon, 6 May 2024 01:08:45 +0800 Subject: [PATCH 032/338] add main function --- install_update.sh | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/install_update.sh b/install_update.sh index 0c87f6a..e225551 100644 --- a/install_update.sh +++ b/install_update.sh @@ -502,26 +502,30 @@ Finalize() { fi } ########### Main Logic ################ -Initialize -# Parse provided arguments +main() { + Initialize + # Parse provided arguments -# Check if the mcsmanager_install_path exists -if [ -d "$mcsmanager_install_path" ]; then - # Backup first - Backup_MCSM - # Install Node.js, this is to ensure the version is up to date. - Install_node - -else - # Install Node.js, this is to ensure the version is up to date. - Install_node -fi + # Check if the mcsmanager_install_path exists + if [ -d "$mcsmanager_install_path" ]; then + # Backup first + Backup_MCSM + # Install Node.js, this is to ensure the version is up to date. + Install_node + + else + # Install Node.js, this is to ensure the version is up to date. + Install_node + fi + + # Install Services based on command + Install_Update -# Install Services based on command -Install_Update + # Print helping Information + Finalize -# Print helping Information -Finalize + echo "Installation Complete!" +} -echo "Installation Complete!" \ No newline at end of file +main \ No newline at end of file From f795bde90048609a26839978a4a028e11abd1987 Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Mon, 6 May 2024 01:12:04 +0800 Subject: [PATCH 033/338] add architecture detection --- install_update.sh | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/install_update.sh b/install_update.sh index e225551..caa7ee8 100644 --- a/install_update.sh +++ b/install_update.sh @@ -1,13 +1,13 @@ #!/bin/bash -#Global arguments +#Global varialbles # System architecture arch=$(uname -m) # Install base dir install_base="/opt" # MCSM install dir mcsmanager_install_path="${install_base}/mcsmanager" -# MCSM backup dir +# MCSM backup dir during upgrade mcsm_backup_dir="${install_base}" # Download URL mcsmanager_donwload_addr="http://oss.duzuii.com/d/MCSManager/MCSManager/MCSManager-v10-linux.tar.gz" @@ -150,11 +150,35 @@ Check_and_download_source() { # Clean up the downloaded tar.gz file rm "${mcsm_down_temp}/mcsmanager.tar.gz" +# Detect architecture +Detect_Architecture() { + if [[ "$arch" == x86_64 ]]; then + arch=x64 + #echo "[-] x64 architecture detected" + elif [[ $arch == aarch64 ]]; then + arch=arm64 + #echo "[-] 64-bit ARM architecture detected" + elif [[ $arch == arm ]]; then + arch=armv7l + #echo "[-] 32-bit ARM architecture detected" + elif [[ $arch == ppc64le ]]; then + arch=ppc64le + #echo "[-] IBM POWER architecture detected" + elif [[ $arch == s390x ]]; then + arch=s390x + #echo "[-] IBM LinuxONE architecture detected" + else + Red_Error "[x] Sorry, this architecture is not supported yet!\n[x]Please try to install manually: https://github.com/MCSManager/MCSManager#linux" + fi +} # Initialization Initialize() { # Check sudo check_sudo + # Update architecture + Detect_Architecture + # Check if install base (/opt) exist mkdir -p "$install_base" From dfb2ec53ebfd4592c51255b17bae215f722dd07c Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Mon, 6 May 2024 01:23:19 +0800 Subject: [PATCH 034/338] remove local from variable --- install_update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install_update.sh b/install_update.sh index caa7ee8..7000efa 100644 --- a/install_update.sh +++ b/install_update.sh @@ -20,7 +20,7 @@ mcsm_web="web" # MCSM daemon dir name mcsm_daemon="daemon" # The date variable to be shared across functions -local current_date=$(date +%Y_%m_%d) +current_date=$(date +%Y_%m_%d) # MCSM local temp dir for downloaded source mcsm_down_temp="/opt/mcsmanager_${current_date}" # Service file for MCSCM Web From 6fae21f6416ee085df1805da454add403a81c74a Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Mon, 6 May 2024 01:28:04 +0800 Subject: [PATCH 035/338] fix unclosed cases --- install_update.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install_update.sh b/install_update.sh index 7000efa..e32f754 100644 --- a/install_update.sh +++ b/install_update.sh @@ -455,7 +455,7 @@ Install_Update() { # Exit with an error if COMMAND is unrecognized exit 1 ;; -esac + esac } # Finalize installation Finalize() { @@ -519,6 +519,7 @@ Finalize() { # Exit with an error if COMMAND is unrecognized exit 1 ;; + esac # Check if backup_path is not empty if [[ -n "$backup_path" ]]; then echo "Your MCSM has been updated and/or installed. A complete backup was created at: $backup_path" From d0cabc18c211de54d94e77628a035ea30e294f9e Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Mon, 6 May 2024 01:30:03 +0800 Subject: [PATCH 036/338] fix unclosed function --- install_update.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/install_update.sh b/install_update.sh index e32f754..11098c6 100644 --- a/install_update.sh +++ b/install_update.sh @@ -149,7 +149,7 @@ Check_and_download_source() { # Clean up the downloaded tar.gz file rm "${mcsm_down_temp}/mcsmanager.tar.gz" - +} # Detect architecture Detect_Architecture() { if [[ "$arch" == x86_64 ]]; then @@ -529,9 +529,6 @@ Finalize() { ########### Main Logic ################ main() { Initialize - # Parse provided arguments - - # Check if the mcsmanager_install_path exists if [ -d "$mcsmanager_install_path" ]; then # Backup first From 4f81d40876419c70cc0b491c9453e5f84b8b0ac8 Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Mon, 6 May 2024 01:41:03 +0800 Subject: [PATCH 037/338] use red error instaed of return 1 --- install_update.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/install_update.sh b/install_update.sh index 11098c6..91dcb6b 100644 --- a/install_update.sh +++ b/install_update.sh @@ -115,6 +115,9 @@ Install_node() { if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then echo_green "Success" else + echo "${node_install_path}/bin/node" + $("$node_install_path"/bin/node -v) + Red_Error "[x] Node installation failed!" fi @@ -136,15 +139,13 @@ Check_and_download_source() { # Download the archive directly into the temporary directory wget -O "${mcsm_down_temp}/mcsmanager.tar.gz" "$mcsmanager_download_addr" if [ $? -ne 0 ]; then - echo "Download failed." - return 1 # Exit if download fails + Red_Error "MCSManager Download failed." fi # Extract the archive without changing directories tar -xzf "${mcsm_down_temp}/mcsmanager.tar.gz" -C "$mcsm_down_temp" --strip-components=1 if [ $? -ne 0 ]; then - echo "Extraction failed." - return 1 # Exit if extraction fails + Red_Error "Extraction failed." fi # Clean up the downloaded tar.gz file @@ -152,8 +153,10 @@ Check_and_download_source() { } # Detect architecture Detect_Architecture() { - if [[ "$arch" == x86_64 ]]; then + echo "Detected" + if [[ $arch == x86_64 ]]; then arch=x64 + echo "Detected x64" #echo "[-] x64 architecture detected" elif [[ $arch == aarch64 ]]; then arch=arm64 @@ -206,14 +209,12 @@ Initialize() { Backup_MCSM() { # Ensure both directories are provided if [ -z "$mcsmanager_install_path" ] || [ -z "$mcsm_backup_dir" ]; then - echo "Error: Backup or source path not set." - return 1 # Return with error + Red_Error "Error: Backup or source path not set." fi # Check if the source directory exists if [ ! -d "$mcsmanager_install_path" ]; then - echo "Error: Source directory does not exist." - return 1 # Return with error + Red_Error "Error: Source directory does not exist." fi # Create backup directory (/opt) if it doesn't exist @@ -233,8 +234,7 @@ Backup_MCSM() { if [ $? -eq 0 ]; then echo "Backup created successfully at $backup_path" else - echo "Error creating backup." - return 1 # Return with error + Red_Error "Error creating backup." fi } # MCSM Web Base Installation From 61b9e055095bd9c4c58a49847e9f8278f7624e5e Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Mon, 6 May 2024 01:47:02 +0800 Subject: [PATCH 038/338] fix typo for original variable name --- install_update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install_update.sh b/install_update.sh index 91dcb6b..908d170 100644 --- a/install_update.sh +++ b/install_update.sh @@ -10,7 +10,7 @@ mcsmanager_install_path="${install_base}/mcsmanager" # MCSM backup dir during upgrade mcsm_backup_dir="${install_base}" # Download URL -mcsmanager_donwload_addr="http://oss.duzuii.com/d/MCSManager/MCSManager/MCSManager-v10-linux.tar.gz" +mcsmanager_download_addr="http://oss.duzuii.com/d/MCSManager/MCSManager/MCSManager-v10-linux.tar.gz" # Node.js version to install node="v20.12.2" # Node.js install dir From 88ff6f43d7949e82f5c4ec4199685609190335a4 Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Mon, 6 May 2024 02:00:59 +0800 Subject: [PATCH 039/338] automatically get package name from URL & bug fix --- install_update.sh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/install_update.sh b/install_update.sh index 908d170..514d6fb 100644 --- a/install_update.sh +++ b/install_update.sh @@ -32,6 +32,8 @@ USER="mcsm" COMMAND="all" # Created backup absolute path backup_path="" +# Downloaded package name +package_name="${mcsmanager_download_addr##*/}" # Helper Functions usage() { @@ -143,7 +145,7 @@ Check_and_download_source() { fi # Extract the archive without changing directories - tar -xzf "${mcsm_down_temp}/mcsmanager.tar.gz" -C "$mcsm_down_temp" --strip-components=1 + tar -xzf "${mcsm_down_temp}/${package_name}" -C "$mcsm_down_temp" --strip-components=1 if [ $? -ne 0 ]; then Red_Error "Extraction failed." fi @@ -154,25 +156,27 @@ Check_and_download_source() { # Detect architecture Detect_Architecture() { echo "Detected" + echo "$arch" if [[ $arch == x86_64 ]]; then - arch=x64 + arch="x64" echo "Detected x64" #echo "[-] x64 architecture detected" elif [[ $arch == aarch64 ]]; then - arch=arm64 + arch="arm64" #echo "[-] 64-bit ARM architecture detected" elif [[ $arch == arm ]]; then - arch=armv7l + arch="armv7l" #echo "[-] 32-bit ARM architecture detected" elif [[ $arch == ppc64le ]]; then - arch=ppc64le + arch="ppc64le" #echo "[-] IBM POWER architecture detected" elif [[ $arch == s390x ]]; then - arch=s390x + arch="s390x" #echo "[-] IBM LinuxONE architecture detected" else Red_Error "[x] Sorry, this architecture is not supported yet!\n[x]Please try to install manually: https://github.com/MCSManager/MCSManager#linux" fi + echo "$arch" } # Initialization Initialize() { From 6e059d9db9fef8e1db19ecbb7d5d1a3cf6543093 Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Mon, 6 May 2024 02:03:00 +0800 Subject: [PATCH 040/338] fix extraction dir --- install_update.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install_update.sh b/install_update.sh index 514d6fb..82fbe9a 100644 --- a/install_update.sh +++ b/install_update.sh @@ -145,13 +145,13 @@ Check_and_download_source() { fi # Extract the archive without changing directories - tar -xzf "${mcsm_down_temp}/${package_name}" -C "$mcsm_down_temp" --strip-components=1 + tar -xzf "${mcsm_down_temp}/${package_name}" -C "$mcsm_down_temp" if [ $? -ne 0 ]; then Red_Error "Extraction failed." fi # Clean up the downloaded tar.gz file - rm "${mcsm_down_temp}/mcsmanager.tar.gz" + rm "${mcsm_down_temp}/${package_name}" } # Detect architecture Detect_Architecture() { From d8bb978d5fdc514286e61975daf311e845a3a059 Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Mon, 6 May 2024 02:06:34 +0800 Subject: [PATCH 041/338] include the helper files --- install_update.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/install_update.sh b/install_update.sh index 82fbe9a..fafa095 100644 --- a/install_update.sh +++ b/install_update.sh @@ -246,6 +246,8 @@ Backup_MCSM() { Install_MCSM_Web_Base() { # Move downloaded path mv "${mcsm_down_temp}/${mcsm_web}" "$web_path" + # Move helper file(s) + mv "${mcsm_down_temp}/start-web.sh" "${mcsmanager_install_path}/start-web.sh" # Move back the data directory rm -rf "$web_data" mv "${web_data_tmp}" "${web_data}" @@ -333,6 +335,9 @@ Install_Web_Wrapper() { Install_MCSM_Daemon_Base() { # Move downloaded path mv "${mcsm_down_temp}/${mcsm_daemon}" "$daemon_path" + # Move helper file(s) + mv "${mcsm_down_temp}/start-daemon.sh" "${mcsmanager_install_path}/start-daemon.sh" + # Move back the data directory rm -rf "$daemon_data" mv "${web_daemon_tmp}" "${daemon_data}" @@ -529,6 +534,12 @@ Finalize() { echo "Your MCSM has been updated and/or installed. A complete backup was created at: $backup_path" echo "You can manually delete the backup using command: rm ${backup_path}" fi + # Move quickstart.md + mv "${mcsm_down_temp}/quick-start.md" "${mcsmanager_install_path}/quick-start.md" + # Remove the temp folder + rm -rf "${mcsm_down_temp}" + + } ########### Main Logic ################ main() { From 5d7d4d3404fff22c028a2139c020dd980df0c6f0 Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Mon, 6 May 2024 02:17:29 +0800 Subject: [PATCH 042/338] bypassing Node.js install if already --- install_update.sh | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/install_update.sh b/install_update.sh index fafa095..9d2e706 100644 --- a/install_update.sh +++ b/install_update.sh @@ -13,8 +13,6 @@ mcsm_backup_dir="${install_base}" mcsmanager_download_addr="http://oss.duzuii.com/d/MCSManager/MCSManager/MCSManager-v10-linux.tar.gz" # Node.js version to install node="v20.12.2" -# Node.js install dir -node_install_path="${install_base}/node-$node-linux-$arch" # MCSM Web dir name mcsm_web="web" # MCSM daemon dir name @@ -34,6 +32,8 @@ COMMAND="all" backup_path="" # Downloaded package name package_name="${mcsmanager_download_addr##*/}" +# Node.js install dir +node_install_path="" # Helper Functions usage() { @@ -100,28 +100,30 @@ Install_dependencies() { } Install_node() { - echo_cyan_n "[+] Install Node.js environment...\n" + if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then + echo_green "Desired Node.js is already installed at the target dir, bypassing installation..." + else + echo_cyan_n "[+] Install Node.js environment...\n" - rm -irf "$node_install_path" + rm -irf "$node_install_path" - cd /opt || Red_Error "[x] Failed to enter /opt" + cd /opt || Red_Error "[x] Failed to enter /opt" - rm -rf "node-$node-linux-$arch.tar.gz" + rm -rf "node-$node-linux-$arch.tar.gz" - wget "https://nodejs.org/dist/$node/node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to download node release" + wget "https://nodejs.org/dist/$node/node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to download node release" - tar -zxf "node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to untar node" + tar -zxf "node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to untar node" - rm -rf "node-$node-linux-$arch.tar.gz" + rm -rf "node-$node-linux-$arch.tar.gz" - if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then - echo_green "Success" - else - echo "${node_install_path}/bin/node" - $("$node_install_path"/bin/node -v) - - Red_Error "[x] Node installation failed!" + if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then + echo_green "Success" + else + Red_Error "[x] Node installation failed!" + fi fi + echo echo_yellow "=============== Node.js Version ===============" @@ -129,7 +131,7 @@ Install_node() { echo_yellow " npm: v$(env "$node_install_path"/bin/node "$node_install_path"/bin/npm -v)" echo_yellow "=============== Node.JS Version ===============" echo - + exit 0 sleep 3 } # Check and download MCSM source @@ -139,7 +141,7 @@ Check_and_download_source() { mkdir -p "$mcsm_down_temp" # Download the archive directly into the temporary directory - wget -O "${mcsm_down_temp}/mcsmanager.tar.gz" "$mcsmanager_download_addr" + wget -O "${mcsm_down_temp}/${package_name}" "$mcsmanager_download_addr" if [ $? -ne 0 ]; then Red_Error "MCSManager Download failed." fi @@ -155,11 +157,8 @@ Check_and_download_source() { } # Detect architecture Detect_Architecture() { - echo "Detected" - echo "$arch" if [[ $arch == x86_64 ]]; then arch="x64" - echo "Detected x64" #echo "[-] x64 architecture detected" elif [[ $arch == aarch64 ]]; then arch="arm64" @@ -176,7 +175,8 @@ Detect_Architecture() { else Red_Error "[x] Sorry, this architecture is not supported yet!\n[x]Please try to install manually: https://github.com/MCSManager/MCSManager#linux" fi - echo "$arch" + + node_install_path="${install_base}/node-$node-linux-$arch" } # Initialization Initialize() { @@ -196,7 +196,7 @@ Initialize() { Install_dependencies # Check and download MCSM source - Check_and_download_source + #Check_and_download_source # Create mcsm user if needed if [[ "$USER" == *"mcsm"* ]]; then From e75bf36340b09659a37824ecd4390ccd10f0364a Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Mon, 6 May 2024 02:21:33 +0800 Subject: [PATCH 043/338] create backup containing the mcsmanager dir --- install_update.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/install_update.sh b/install_update.sh index 9d2e706..897d628 100644 --- a/install_update.sh +++ b/install_update.sh @@ -131,7 +131,6 @@ Install_node() { echo_yellow " npm: v$(env "$node_install_path"/bin/node "$node_install_path"/bin/npm -v)" echo_yellow "=============== Node.JS Version ===============" echo - exit 0 sleep 3 } # Check and download MCSM source @@ -232,7 +231,9 @@ Backup_MCSM() { # Create the backup echo "Creating backup..." - tar -czf "$backup_path" -C "$mcsmanager_install_path" . + #tar -czf "$backup_path" -C "$mcsmanager_install_path" . + tar -czf "$backup_path" -C "$(dirname "$mcsmanager_install_path")" "$(basename "$mcsmanager_install_path")" + # Check if the backup was successful if [ $? -eq 0 ]; then @@ -240,6 +241,7 @@ Backup_MCSM() { else Red_Error "Error creating backup." fi + exit 1 } # MCSM Web Base Installation # Assuming a fresh install (i.e. no file(s) from previous installation) and downloaded source From 125a869ebe511989a329351c441ab317aef88b72 Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Mon, 6 May 2024 02:27:50 +0800 Subject: [PATCH 044/338] updating some messages --- install_update.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/install_update.sh b/install_update.sh index 897d628..a5d8142 100644 --- a/install_update.sh +++ b/install_update.sh @@ -195,13 +195,13 @@ Initialize() { Install_dependencies # Check and download MCSM source - #Check_and_download_source + Check_and_download_source # Create mcsm user if needed if [[ "$USER" == *"mcsm"* ]]; then # Create the user 'mcsm' if it doesn't already exist if ! id "mcsm" &>/dev/null; then - useradd mcsm + /usr/sbin/useradd mcsm echo "User 'mcsm' created." else echo "User 'mcsm' already exists." @@ -241,7 +241,6 @@ Backup_MCSM() { else Red_Error "Error creating backup." fi - exit 1 } # MCSM Web Base Installation # Assuming a fresh install (i.e. no file(s) from previous installation) and downloaded source @@ -321,9 +320,9 @@ Install_Web_Wrapper() { rm -rf "$web_path" else - echo "The directory '$mcsmanager_install_path' does not exist." + echo_cyan "[+] Install MCSManager Web..." fi - echo_cyan "[+] Install MCSManager Web..." + # Install MCSM Web Install_MCSM_Web_Base From fd4c550df204976f09749118d5b2db137433b331 Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Mon, 6 May 2024 02:31:00 +0800 Subject: [PATCH 045/338] use variables for service files --- install_update.sh | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/install_update.sh b/install_update.sh index a5d8142..aa0554a 100644 --- a/install_update.sh +++ b/install_update.sh @@ -273,23 +273,24 @@ Install_Web_Systemd() { systemctl disable --now mcsm-web # delete existing service - rm -rf /etc/systemd/system/mcsm-web.service + rm -rf "$service_file_web" systemctl daemon-reload # Create the default service file echo "[Unit] - Description=MCSManager-Web - - [Service] - WorkingDirectory=${web_path} - ExecStart=${node_install_path}/bin/node app.js - ExecReload=/bin/kill -s QUIT \$MAINPID - ExecStop=/bin/kill -s QUIT \$MAINPID - Environment=\"PATH=${PATH}\" - - [Install] - WantedBy=multi-user.target - " >/etc/systemd/system/mcsm-web.service +Description=MCSManager-Web + +[Service] +WorkingDirectory=${web_path} +ExecStart=${node_install_path}/bin/node app.js +ExecReload=/bin/kill -s QUIT \$MAINPID +ExecStop=/bin/kill -s QUIT \$MAINPID +Environment=\"PATH=${PATH}\" + +[Install] +WantedBy=multi-user.target +" >"$service_file_web" + # Add user section if using mcsm user if [[ "$USER" == *"mcsm"* ]]; then # Check if the 'User=mcsm' line already exists in the service file @@ -297,7 +298,7 @@ Install_Web_Systemd() { echo "The service file is configured already." else # Add 'User=mcsm' to the service file - sed -i '/^\[Service\]$/a User=mcsm' "$service_file" + sed -i '/^\[Service\]$/a User=mcsm' "$service_file_web" fi fi # Reload Systemd Service @@ -373,15 +374,16 @@ Install_Daemon_Systemd() { [Install] WantedBy=multi-user.target - " >/etc/systemd/system/mcsm-daemon.service + " >"$service_file_daemon" + # Add user section if using mcsm user if [[ "$USER" == *"mcsm"* ]]; then # Check if the 'User=mcsm' line already exists in the service file - if grep -q "^User=mcsm$" "$service_file"; then + if grep -q "^User=mcsm$" "$service_file_daemon"; then echo "The service file is configured already." else # Add 'User=mcsm' to the service file - sed -i '/^\[Service\]$/a User=mcsm' "$service_file" + sed -i '/^\[Service\]$/a User=mcsm' "$service_file_daemon" fi fi # Reload Systemd Service From c1a6334f4bd542f74c22fb91582fc6a24e1fc17c Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Mon, 6 May 2024 02:31:46 +0800 Subject: [PATCH 046/338] remove daemon service before adding --- install_update.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/install_update.sh b/install_update.sh index aa0554a..ed0747a 100644 --- a/install_update.sh +++ b/install_update.sh @@ -361,6 +361,13 @@ Install_MCSM_Daemon_Base() { # MCSM Daemon Service Installation Install_Daemon_Systemd() { echo_cyan "[+] Creating MCSManager Daemon service..." + # stop and disable existing service + systemctl disable --now mcsm-daemon + + # delete existing service + rm -rf "$service_file_daemon" + systemctl daemon-reload + # Create the default service file echo "[Unit] Description=MCSManager-Daemon From 9d1c2d5f80d129ca58fd3d52f869ce3b49111d43 Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Mon, 6 May 2024 02:39:42 +0800 Subject: [PATCH 047/338] fix daemon install --- install_update.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/install_update.sh b/install_update.sh index ed0747a..7493c61 100644 --- a/install_update.sh +++ b/install_update.sh @@ -294,7 +294,7 @@ WantedBy=multi-user.target # Add user section if using mcsm user if [[ "$USER" == *"mcsm"* ]]; then # Check if the 'User=mcsm' line already exists in the service file - if grep -q "^User=mcsm$" "$service_file"; then + if grep -q "^User=mcsm$" "$service_file_web"; then echo "The service file is configured already." else # Add 'User=mcsm' to the service file @@ -399,9 +399,9 @@ Install_Daemon_Systemd() { } # MCSM Web Update & Installation Install_Daemon_Wrapper() { - web_path="${mcsmanager_install_path}/${mcsm_daemon}" - web_data="${web_daemon}/data" - web_data_tmp="${mcsmanager_install_path}/daemon_data_${current_date}" + daemon_path="${mcsmanager_install_path}/${mcsm_daemon}" + daemon_data="${web_daemon}/data" + daemon_data_tmp="${mcsmanager_install_path}/daemon_data_${current_date}" if [ -d "$daemon_path" ]; then echo_cyan "[+] Updating MCSManager Daemon..." # The backup should be created already, moving the DATA dir to /opt/mcsmanager/daemon_data should be fast and safe. @@ -412,10 +412,9 @@ Install_Daemon_Wrapper() { rm -rf "$daemon_path" else - echo "The directory '$mcsmanager_install_path' does not exist." + echo_cyan "[+] Install MCSManager daemon..." fi - echo_cyan "[+] Install MCSManager daemon..." - + # Install MCSM Web Install_MCSM_Daemon_Base From 13cad79dded61ad6df66f278a709d88fbff5b622 Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Mon, 6 May 2024 02:52:11 +0800 Subject: [PATCH 048/338] fix daemon install --- install_update.sh | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/install_update.sh b/install_update.sh index 7493c61..daff578 100644 --- a/install_update.sh +++ b/install_update.sh @@ -342,7 +342,7 @@ Install_MCSM_Daemon_Base() { # Move back the data directory rm -rf "$daemon_data" - mv "${web_daemon_tmp}" "${daemon_data}" + mv "${daemon_data_tmp}" "${daemon_data}" # Dependencies install cd "${daemon_path}" || Red_Error "[x] Failed to enter ${daemon_path}" # Install dependencies @@ -370,18 +370,18 @@ Install_Daemon_Systemd() { # Create the default service file echo "[Unit] - Description=MCSManager-Daemon - - [Service] - WorkingDirectory=${daemon_path} - ExecStart=${node_install_path}/bin/node app.js - ExecReload=/bin/kill -s QUIT \$MAINPID - ExecStop=/bin/kill -s QUIT \$MAINPID - Environment=\"PATH=${PATH}\" - - [Install] - WantedBy=multi-user.target - " >"$service_file_daemon" +Description=MCSManager-Daemon + +[Service] +WorkingDirectory=${daemon_path} +ExecStart=${node_install_path}/bin/node app.js +ExecReload=/bin/kill -s QUIT \$MAINPID +ExecStop=/bin/kill -s QUIT \$MAINPID +Environment=\"PATH=${PATH}\" + +[Install] +WantedBy=multi-user.target +" >"$service_file_daemon" # Add user section if using mcsm user if [[ "$USER" == *"mcsm"* ]]; then @@ -400,13 +400,13 @@ Install_Daemon_Systemd() { # MCSM Web Update & Installation Install_Daemon_Wrapper() { daemon_path="${mcsmanager_install_path}/${mcsm_daemon}" - daemon_data="${web_daemon}/data" + daemon_data="${daemon_path}/data" daemon_data_tmp="${mcsmanager_install_path}/daemon_data_${current_date}" if [ -d "$daemon_path" ]; then echo_cyan "[+] Updating MCSManager Daemon..." # The backup should be created already, moving the DATA dir to /opt/mcsmanager/daemon_data should be fast and safe. # Use daemon_data, do not use data as in rare circumstance user may run both update at the same time. - # Use mv command, this won't create issue in case of an incomplete previous installation (e.g. empty mcsm dir) + # Use mv command, this won't create issue in case of an incomplete previous installation (e.g. empty mcsm dir) mv "$daemon_data" "$daemon_data_tmp" # Remove the old daemon dir rm -rf "$daemon_path" From d76090511978029011f66fa70ff06931b089065d Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Mon, 6 May 2024 03:02:40 +0800 Subject: [PATCH 049/338] optimize some display --- install_update.sh | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/install_update.sh b/install_update.sh index daff578..46903f1 100644 --- a/install_update.sh +++ b/install_update.sh @@ -26,8 +26,8 @@ service_file_web="/etc/systemd/system/mcsm-web.service" # Service file for MCSM daemon service_file_daemon="/etc/systemd/system/mcsm-daemon.service" # Default systemd user is 'mcsm' -USER="mcsm" -COMMAND="all" +USER="" +COMMAND="" # Created backup absolute path backup_path="" # Downloaded package name @@ -197,6 +197,12 @@ Initialize() { # Check and download MCSM source Check_and_download_source + # Parse input arguments + Parse_Arguments + + echo "$USER" + echo "$COMMAND" + exit 1 # Create mcsm user if needed if [[ "$USER" == *"mcsm"* ]]; then # Create the user 'mcsm' if it doesn't already exist @@ -427,7 +433,7 @@ Parse_Arguments() { case ${opt} in u ) if [[ "${OPTARG}" == "mcsm" || "${OPTARG}" == "root" ]]; then - user="${OPTARG}" + USER="${OPTARG}" else echo "Invalid user specified." usage @@ -435,7 +441,7 @@ Parse_Arguments() { ;; c ) if [[ "${OPTARG}" == "web" || "${OPTARG}" == "daemon" || "${OPTARG}" == "all" ]]; then - command="${OPTARG}" + COMMAND="${OPTARG}" else echo "Invalid command specified." usage @@ -477,11 +483,13 @@ Install_Update() { } # Finalize installation Finalize() { + #Clear screen + #clear printf "\n\n\n\n" case "$COMMAND" in all) echo_yellow "==================================================================" - echo_green "Installation is complete! Welcome to the MCSManager!!!" + echo_green "Installation is complete! Welcome to the MCSManager V10!!!" echo_yellow " " echo_cyan_n "HTTP Web Service: " echo_yellow "http://:23333 (Browser)" @@ -500,7 +508,7 @@ Finalize() { web) echo_yellow "==================================================================" - echo_green "Installation is complete! Welcome to the MCSManager!!!" + echo_green "Installation is complete! Welcome to the MCSManager V10!!!" echo_yellow " " echo_cyan_n "HTTP Web Service: " echo_yellow "http://:23333 (Browser)" @@ -517,7 +525,7 @@ Finalize() { daemon) echo_yellow "==================================================================" - echo_green "Installation is complete! Welcome to the MCSManager!!!" + echo_green "Installation is complete! Welcome to the MCSManager V10!!!" echo_yellow " " echo_cyan_n "Daemon Address: " echo_yellow "ws://:24444 (Cluster)" @@ -540,8 +548,11 @@ Finalize() { esac # Check if backup_path is not empty if [[ -n "$backup_path" ]]; then - echo "Your MCSM has been updated and/or installed. A complete backup was created at: $backup_path" - echo "You can manually delete the backup using command: rm ${backup_path}" + echo_green "Your MCSM has been updated from a previous installation. " + echo_green "A complete backup was created at:" + echo_yellow "$backup_path" + echo_green "You can manually delete the backup using command: " + echo_red "rm ${backup_path}" fi # Move quickstart.md mv "${mcsm_down_temp}/quick-start.md" "${mcsmanager_install_path}/quick-start.md" From e0533886f07dcc74df2f3d877fd641f0a8512050 Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Mon, 6 May 2024 03:10:28 +0800 Subject: [PATCH 050/338] fix user selection and components selection --- install_update.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/install_update.sh b/install_update.sh index 46903f1..086a44c 100644 --- a/install_update.sh +++ b/install_update.sh @@ -26,8 +26,8 @@ service_file_web="/etc/systemd/system/mcsm-web.service" # Service file for MCSM daemon service_file_daemon="/etc/systemd/system/mcsm-daemon.service" # Default systemd user is 'mcsm' -USER="" -COMMAND="" +USER="mcsm" +COMMAND="all" # Created backup absolute path backup_path="" # Downloaded package name @@ -198,11 +198,11 @@ Initialize() { Check_and_download_source # Parse input arguments - Parse_Arguments + Parse_Arguments "$@" echo "$USER" echo "$COMMAND" - exit 1 + # Create mcsm user if needed if [[ "$USER" == *"mcsm"* ]]; then # Create the user 'mcsm' if it doesn't already exist @@ -563,7 +563,7 @@ Finalize() { } ########### Main Logic ################ main() { - Initialize + Initialize "$@" # Check if the mcsmanager_install_path exists if [ -d "$mcsmanager_install_path" ]; then # Backup first @@ -585,4 +585,4 @@ main() { echo "Installation Complete!" } -main \ No newline at end of file +main "$@" \ No newline at end of file From 053dd193fd3ff0968fb30c8dbf6501bcf589184b Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Mon, 6 May 2024 03:11:31 +0800 Subject: [PATCH 051/338] remove debugging info --- install_update.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/install_update.sh b/install_update.sh index 086a44c..8102736 100644 --- a/install_update.sh +++ b/install_update.sh @@ -199,9 +199,6 @@ Initialize() { # Parse input arguments Parse_Arguments "$@" - - echo "$USER" - echo "$COMMAND" # Create mcsm user if needed if [[ "$USER" == *"mcsm"* ]]; then From 065cd8be4efaf58b8fcbb7b167b987bf9f5b0f38 Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Mon, 6 May 2024 03:22:53 +0800 Subject: [PATCH 052/338] suppress mv cmd when not updating --- install_update.sh | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/install_update.sh b/install_update.sh index 8102736..540b418 100644 --- a/install_update.sh +++ b/install_update.sh @@ -188,9 +188,6 @@ Initialize() { # Check if install base (/opt) exist mkdir -p "$install_base" - # Create mcsmanager path if not already - mkdir -p "$mcsmanager_install_path" - # Check dependencies Install_dependencies @@ -249,12 +246,14 @@ Backup_MCSM() { # Assuming a fresh install (i.e. no file(s) from previous installation) and downloaded source Install_MCSM_Web_Base() { # Move downloaded path - mv "${mcsm_down_temp}/${mcsm_web}" "$web_path" + mv "${mcsm_down_temp}/${mcsm_web}" "$web_path" || # Move helper file(s) mv "${mcsm_down_temp}/start-web.sh" "${mcsmanager_install_path}/start-web.sh" - # Move back the data directory - rm -rf "$web_data" - mv "${web_data_tmp}" "${web_data}" + # Move back the data directory only if existed + if [ -d "$web_data_tmp" ]; then + rm -rf "$web_data" + mv "${web_data_tmp}" "${web_data}" + fi # Dependencies install cd "${web_path}" || Red_Error "[x] Failed to enter ${web_path}" # Install dependencies @@ -339,13 +338,15 @@ Install_Web_Wrapper() { # Assuming a fresh install (i.e. no file(s) from previous installation) and downloaded source Install_MCSM_Daemon_Base() { # Move downloaded path - mv "${mcsm_down_temp}/${mcsm_daemon}" "$daemon_path" - # Move helper file(s) + mv "${mcsm_down_temp}/${mcsm_daemon}" "$daemon_path" || + # Move helper file(s) mv "${mcsm_down_temp}/start-daemon.sh" "${mcsmanager_install_path}/start-daemon.sh" - # Move back the data directory - rm -rf "$daemon_data" - mv "${daemon_data_tmp}" "${daemon_data}" + # Move back the data directory only if existed + if [ -d "$daemon_data_tmp" ]; then + rm -rf "$daemon_data" + mv "${daemon_data_tmp}" "${daemon_data}" + fi # Dependencies install cd "${daemon_path}" || Red_Error "[x] Failed to enter ${daemon_path}" # Install dependencies @@ -560,6 +561,7 @@ Finalize() { } ########### Main Logic ################ main() { + # Do not create mcsmanager path yet as it will break the logic detecting existing installation Initialize "$@" # Check if the mcsmanager_install_path exists if [ -d "$mcsmanager_install_path" ]; then @@ -569,6 +571,8 @@ main() { Install_node else + # Create mcsmanager path if not already + mkdir -p "$mcsmanager_install_path" # Install Node.js, this is to ensure the version is up to date. Install_node fi From 55c511b9c82353c47d980194128eda246b2a17a4 Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Mon, 6 May 2024 03:36:25 +0800 Subject: [PATCH 053/338] optimize display --- install_update.sh | 12 ++++++------ setup.sh | 8 ++++++-- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/install_update.sh b/install_update.sh index 540b418..20997cd 100644 --- a/install_update.sh +++ b/install_update.sh @@ -140,7 +140,7 @@ Check_and_download_source() { mkdir -p "$mcsm_down_temp" # Download the archive directly into the temporary directory - wget -O "${mcsm_down_temp}/${package_name}" "$mcsmanager_download_addr" + wget -O "${mcsm_down_temp}/${package_name}" "$mcsmanager_download_addr" || Red_Error "[x] Failed to download MCSManager releases..." if [ $? -ne 0 ]; then Red_Error "MCSManager Download failed." fi @@ -202,9 +202,9 @@ Initialize() { # Create the user 'mcsm' if it doesn't already exist if ! id "mcsm" &>/dev/null; then /usr/sbin/useradd mcsm - echo "User 'mcsm' created." + echo_green "User 'mcsm' created." else - echo "User 'mcsm' already exists." + echo_yellow "User 'mcsm' already exists." fi fi } @@ -222,7 +222,7 @@ Backup_MCSM() { # Create backup directory (/opt) if it doesn't exist if [ ! -d "$mcsm_backup_dir" ]; then - echo "Creating backup directory." + echo_yellow "Creating backup directory." mkdir -p "$mcsm_backup_dir" fi @@ -230,14 +230,14 @@ Backup_MCSM() { backup_path="${mcsm_backup_dir}/mcsm_backup_${current_date}.tar.gz" # Create the backup - echo "Creating backup..." + echo_yellow "Creating backup..." #tar -czf "$backup_path" -C "$mcsmanager_install_path" . tar -czf "$backup_path" -C "$(dirname "$mcsmanager_install_path")" "$(basename "$mcsmanager_install_path")" # Check if the backup was successful if [ $? -eq 0 ]; then - echo "Backup created successfully at $backup_path" + echo_green "Successfully created backup at $backup_path" else Red_Error "Error creating backup." fi diff --git a/setup.sh b/setup.sh index 0f6eeff..308c3a3 100644 --- a/setup.sh +++ b/setup.sh @@ -19,7 +19,7 @@ echo_cyan() { echo_red() { printf '\033[1;31m%b\033[0m\n' "$@" } - +vv echo_green() { printf '\033[1;32m%b\033[0m\n' "$@" } @@ -167,7 +167,11 @@ WantedBy=multi-user.target echo_yellow "http://:23333 (Browser)" echo_cyan_n "Daemon Address: " echo_yellow "ws://:24444 (Cluster)" - echo_red "You must expose ports 23333 and 24444 to use the service properly on the Internet." + echo_red "You must expose ports " + echo_yellow "23333" + echo_red " and " + echo_yellow "24444" + echo_red " to use the service properly on the Internet." echo_yellow " " echo_cyan "Usage:" echo_cyan "systemctl start mcsm-{daemon,web}.service" From f4cb8c155facacfaedac8484e6d8f0450ab9565c Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Mon, 6 May 2024 03:37:00 +0800 Subject: [PATCH 054/338] reduce sleep time --- install_update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install_update.sh b/install_update.sh index 20997cd..b8c5e11 100644 --- a/install_update.sh +++ b/install_update.sh @@ -131,7 +131,7 @@ Install_node() { echo_yellow " npm: v$(env "$node_install_path"/bin/node "$node_install_path"/bin/npm -v)" echo_yellow "=============== Node.JS Version ===============" echo - sleep 3 + sleep 1 } # Check and download MCSM source Check_and_download_source() { From 13e9eff69637750f2c8ed00597a620d1aaf54150 Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Mon, 6 May 2024 03:43:46 +0800 Subject: [PATCH 055/338] add ASCII art --- install_update.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/install_update.sh b/install_update.sh index b8c5e11..ad347f5 100644 --- a/install_update.sh +++ b/install_update.sh @@ -482,8 +482,15 @@ Install_Update() { # Finalize installation Finalize() { #Clear screen - #clear - printf "\n\n\n\n" + clear + #printf "\n\n\n\n" + echo "______ _______________________ ___" + echo "___ |/ /_ ____/_ ___/__ |/ /_____ _____________ _______ _____________" + echo "__ /|_/ /_ / _____ \__ /|_/ /_ __ \`/_ __ \ __ \`/_ __ \`/ _ \_ ___/" + echo "_ / / / / /___ ____/ /_ / / / / /_/ /_ / / / /_/ /_ /_/ // __/ /" + echo "/_/ /_/ \____/ /____/ /_/ /_/ \__,_/ /_/ /_/\__,_/ _\__, / \___//_/" + echo " /____/" + case "$COMMAND" in all) echo_yellow "==================================================================" From 9c113d06542747b649fed0fef90997410d86175f Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Mon, 6 May 2024 03:44:34 +0800 Subject: [PATCH 056/338] add initial CN implementation --- install_update_cn.sh | 596 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 596 insertions(+) create mode 100644 install_update_cn.sh diff --git a/install_update_cn.sh b/install_update_cn.sh new file mode 100644 index 0000000..ad347f5 --- /dev/null +++ b/install_update_cn.sh @@ -0,0 +1,596 @@ +#!/bin/bash + +#Global varialbles +# System architecture +arch=$(uname -m) +# Install base dir +install_base="/opt" +# MCSM install dir +mcsmanager_install_path="${install_base}/mcsmanager" +# MCSM backup dir during upgrade +mcsm_backup_dir="${install_base}" +# Download URL +mcsmanager_download_addr="http://oss.duzuii.com/d/MCSManager/MCSManager/MCSManager-v10-linux.tar.gz" +# Node.js version to install +node="v20.12.2" +# MCSM Web dir name +mcsm_web="web" +# MCSM daemon dir name +mcsm_daemon="daemon" +# The date variable to be shared across functions +current_date=$(date +%Y_%m_%d) +# MCSM local temp dir for downloaded source +mcsm_down_temp="/opt/mcsmanager_${current_date}" +# Service file for MCSCM Web +service_file_web="/etc/systemd/system/mcsm-web.service" +# Service file for MCSM daemon +service_file_daemon="/etc/systemd/system/mcsm-daemon.service" +# Default systemd user is 'mcsm' +USER="mcsm" +COMMAND="all" +# Created backup absolute path +backup_path="" +# Downloaded package name +package_name="${mcsmanager_download_addr##*/}" +# Node.js install dir +node_install_path="" + +# Helper Functions +usage() { + echo "Usage: $0 [-u user] [-c command]" + echo " -u Specify the user (mcsm or root), default is 'mcsm'" + echo " -c Specify the command (web, daemon, or all), default is 'all'" + exit 1 +} +Red_Error() { + echo '=================================================' + printf '\033[1;31;40m%b\033[0m\n' "$@" + echo '=================================================' + exit 1 +} +echo_cyan() { + printf '\033[1;36m%b\033[0m\n' "$@" +} +echo_red() { + printf '\033[1;31m%b\033[0m\n' "$@" +} + +echo_green() { + printf '\033[1;32m%b\033[0m\n' "$@" +} + +echo_cyan_n() { + printf '\033[1;36m%b\033[0m' "$@" +} + +echo_yellow() { + printf '\033[1;33m%b\033[0m\n' "$@" +} + +# Check root permission +check_sudo() { + if [ "$EUID" -ne 0 ]; then + echo "This script must be run as root. Please use \"sudo or root user\" instead." + exit 1 + fi +} + +Install_dependencies() { + # Install related software + echo_cyan_n "[+] Installing dependent software (git, tar, wget)... " + if [[ -x "$(command -v yum)" ]]; then + yum install -y git tar wget + elif [[ -x "$(command -v apt-get)" ]]; then + apt-get install -y git tar wget + elif [[ -x "$(command -v pacman)" ]]; then + pacman -S --noconfirm git tar wget + elif [[ -x "$(command -v zypper)" ]]; then + zypper --non-interactive install git tar wget + else + echo_red "[!] Cannot find your package manager! You may need to install git, tar and wget manually!" + fi + + # Determine whether the relevant software is installed successfully + if [[ -x "$(command -v git)" && -x "$(command -v tar)" && -x "$(command -v wget)" ]]; then + echo_green "Success" + else + Red_Error "[x] Failed to find git, tar and wget, please install them manually!" + fi + +} + +Install_node() { + if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then + echo_green "Desired Node.js is already installed at the target dir, bypassing installation..." + else + echo_cyan_n "[+] Install Node.js environment...\n" + + rm -irf "$node_install_path" + + cd /opt || Red_Error "[x] Failed to enter /opt" + + rm -rf "node-$node-linux-$arch.tar.gz" + + wget "https://nodejs.org/dist/$node/node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to download node release" + + tar -zxf "node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to untar node" + + rm -rf "node-$node-linux-$arch.tar.gz" + + if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then + echo_green "Success" + else + Red_Error "[x] Node installation failed!" + fi + fi + + + echo + echo_yellow "=============== Node.js Version ===============" + echo_yellow " node: $("$node_install_path"/bin/node -v)" + echo_yellow " npm: v$(env "$node_install_path"/bin/node "$node_install_path"/bin/npm -v)" + echo_yellow "=============== Node.JS Version ===============" + echo + sleep 1 +} +# Check and download MCSM source +Check_and_download_source() { + # Empty the temp dir if existed + rm -rf "$mcsm_down_temp" + mkdir -p "$mcsm_down_temp" + + # Download the archive directly into the temporary directory + wget -O "${mcsm_down_temp}/${package_name}" "$mcsmanager_download_addr" || Red_Error "[x] Failed to download MCSManager releases..." + if [ $? -ne 0 ]; then + Red_Error "MCSManager Download failed." + fi + + # Extract the archive without changing directories + tar -xzf "${mcsm_down_temp}/${package_name}" -C "$mcsm_down_temp" + if [ $? -ne 0 ]; then + Red_Error "Extraction failed." + fi + + # Clean up the downloaded tar.gz file + rm "${mcsm_down_temp}/${package_name}" +} +# Detect architecture +Detect_Architecture() { + if [[ $arch == x86_64 ]]; then + arch="x64" + #echo "[-] x64 architecture detected" + elif [[ $arch == aarch64 ]]; then + arch="arm64" + #echo "[-] 64-bit ARM architecture detected" + elif [[ $arch == arm ]]; then + arch="armv7l" + #echo "[-] 32-bit ARM architecture detected" + elif [[ $arch == ppc64le ]]; then + arch="ppc64le" + #echo "[-] IBM POWER architecture detected" + elif [[ $arch == s390x ]]; then + arch="s390x" + #echo "[-] IBM LinuxONE architecture detected" + else + Red_Error "[x] Sorry, this architecture is not supported yet!\n[x]Please try to install manually: https://github.com/MCSManager/MCSManager#linux" + fi + + node_install_path="${install_base}/node-$node-linux-$arch" +} +# Initialization +Initialize() { + # Check sudo + check_sudo + + # Update architecture + Detect_Architecture + + # Check if install base (/opt) exist + mkdir -p "$install_base" + + # Check dependencies + Install_dependencies + + # Check and download MCSM source + Check_and_download_source + + # Parse input arguments + Parse_Arguments "$@" + + # Create mcsm user if needed + if [[ "$USER" == *"mcsm"* ]]; then + # Create the user 'mcsm' if it doesn't already exist + if ! id "mcsm" &>/dev/null; then + /usr/sbin/useradd mcsm + echo_green "User 'mcsm' created." + else + echo_yellow "User 'mcsm' already exists." + fi + fi +} + +Backup_MCSM() { + # Ensure both directories are provided + if [ -z "$mcsmanager_install_path" ] || [ -z "$mcsm_backup_dir" ]; then + Red_Error "Error: Backup or source path not set." + fi + + # Check if the source directory exists + if [ ! -d "$mcsmanager_install_path" ]; then + Red_Error "Error: Source directory does not exist." + fi + + # Create backup directory (/opt) if it doesn't exist + if [ ! -d "$mcsm_backup_dir" ]; then + echo_yellow "Creating backup directory." + mkdir -p "$mcsm_backup_dir" + fi + + # Define the backup path + backup_path="${mcsm_backup_dir}/mcsm_backup_${current_date}.tar.gz" + + # Create the backup + echo_yellow "Creating backup..." + #tar -czf "$backup_path" -C "$mcsmanager_install_path" . + tar -czf "$backup_path" -C "$(dirname "$mcsmanager_install_path")" "$(basename "$mcsmanager_install_path")" + + + # Check if the backup was successful + if [ $? -eq 0 ]; then + echo_green "Successfully created backup at $backup_path" + else + Red_Error "Error creating backup." + fi +} +# MCSM Web Base Installation +# Assuming a fresh install (i.e. no file(s) from previous installation) and downloaded source +Install_MCSM_Web_Base() { + # Move downloaded path + mv "${mcsm_down_temp}/${mcsm_web}" "$web_path" || + # Move helper file(s) + mv "${mcsm_down_temp}/start-web.sh" "${mcsmanager_install_path}/start-web.sh" + # Move back the data directory only if existed + if [ -d "$web_data_tmp" ]; then + rm -rf "$web_data" + mv "${web_data_tmp}" "${web_data}" + fi + # Dependencies install + cd "${web_path}" || Red_Error "[x] Failed to enter ${web_path}" + # Install dependencies + echo_cyan "[+] Install MCSManager-Web dependencies..." + env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${web_path}" + # Return to general dir + cd "$mcsmanager_install_path" + # Configure ownership if needed + if [[ "$USER" == *"mcsm"* ]]; then + # Change file permission to mcsm user + chown -R mcsm:mcsm "$web_path" + fi + chmod -R 755 "$web_path" +} +# MCSM Web Service Installation +Install_Web_Systemd() { + echo_cyan "[+] Creating MCSManager Web service..." + # stop and disable existing service + systemctl disable --now mcsm-web + + # delete existing service + rm -rf "$service_file_web" + systemctl daemon-reload + + # Create the default service file + echo "[Unit] +Description=MCSManager-Web + +[Service] +WorkingDirectory=${web_path} +ExecStart=${node_install_path}/bin/node app.js +ExecReload=/bin/kill -s QUIT \$MAINPID +ExecStop=/bin/kill -s QUIT \$MAINPID +Environment=\"PATH=${PATH}\" + +[Install] +WantedBy=multi-user.target +" >"$service_file_web" + + # Add user section if using mcsm user + if [[ "$USER" == *"mcsm"* ]]; then + # Check if the 'User=mcsm' line already exists in the service file + if grep -q "^User=mcsm$" "$service_file_web"; then + echo "The service file is configured already." + else + # Add 'User=mcsm' to the service file + sed -i '/^\[Service\]$/a User=mcsm' "$service_file_web" + fi + fi + # Reload Systemd Service + systemctl daemon-reload + systemctl enable --now mcsm-web +} + +# MCSM Web Update & Installation +Install_Web_Wrapper() { + web_path="${mcsmanager_install_path}/${mcsm_web}" + web_data="${web_path}/data" + web_data_tmp="${mcsmanager_install_path}/web_data_${current_date}" + if [ -d "$web_path" ]; then + echo_cyan "[+] Updating MCSManager Web..." + # The backup should be created already, moving the DATA dir to /opt/mcsmanager/web_data should be fast and safe. + # Use web_data, do not use data as in rare circumstance user may run both update at the same time. + # Use mv command, this won't create issue in case of an incomplete previous installation (e.g. empty mcsm dir) + mv "$web_data" "$web_data_tmp" + # Remove the old web dir + rm -rf "$web_path" + + else + echo_cyan "[+] Install MCSManager Web..." + fi + + + # Install MCSM Web + Install_MCSM_Web_Base + + # Install MCSM Web Service + Install_Web_Systemd +} + +# MCSM Daemon Base Installation +# Assuming a fresh install (i.e. no file(s) from previous installation) and downloaded source +Install_MCSM_Daemon_Base() { + # Move downloaded path + mv "${mcsm_down_temp}/${mcsm_daemon}" "$daemon_path" || + # Move helper file(s) + mv "${mcsm_down_temp}/start-daemon.sh" "${mcsmanager_install_path}/start-daemon.sh" + + # Move back the data directory only if existed + if [ -d "$daemon_data_tmp" ]; then + rm -rf "$daemon_data" + mv "${daemon_data_tmp}" "${daemon_data}" + fi + # Dependencies install + cd "${daemon_path}" || Red_Error "[x] Failed to enter ${daemon_path}" + # Install dependencies + echo_cyan "[+] Install MCSManager-Daemon dependencies..." + env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${daemon_path}" + # Return to general dir + cd "$mcsmanager_install_path" + # Configure ownership if needed + if [[ "$USER" == *"mcsm"* ]]; then + # Change file permission to mcsm user + chown -R mcsm:mcsm "$daemon_path" + fi + chmod -R 755 "$daemon_path" +} + +# MCSM Daemon Service Installation +Install_Daemon_Systemd() { + echo_cyan "[+] Creating MCSManager Daemon service..." + # stop and disable existing service + systemctl disable --now mcsm-daemon + + # delete existing service + rm -rf "$service_file_daemon" + systemctl daemon-reload + + # Create the default service file + echo "[Unit] +Description=MCSManager-Daemon + +[Service] +WorkingDirectory=${daemon_path} +ExecStart=${node_install_path}/bin/node app.js +ExecReload=/bin/kill -s QUIT \$MAINPID +ExecStop=/bin/kill -s QUIT \$MAINPID +Environment=\"PATH=${PATH}\" + +[Install] +WantedBy=multi-user.target +" >"$service_file_daemon" + + # Add user section if using mcsm user + if [[ "$USER" == *"mcsm"* ]]; then + # Check if the 'User=mcsm' line already exists in the service file + if grep -q "^User=mcsm$" "$service_file_daemon"; then + echo "The service file is configured already." + else + # Add 'User=mcsm' to the service file + sed -i '/^\[Service\]$/a User=mcsm' "$service_file_daemon" + fi + fi + # Reload Systemd Service + systemctl daemon-reload + systemctl enable --now mcsm-daemon +} +# MCSM Web Update & Installation +Install_Daemon_Wrapper() { + daemon_path="${mcsmanager_install_path}/${mcsm_daemon}" + daemon_data="${daemon_path}/data" + daemon_data_tmp="${mcsmanager_install_path}/daemon_data_${current_date}" + if [ -d "$daemon_path" ]; then + echo_cyan "[+] Updating MCSManager Daemon..." + # The backup should be created already, moving the DATA dir to /opt/mcsmanager/daemon_data should be fast and safe. + # Use daemon_data, do not use data as in rare circumstance user may run both update at the same time. + # Use mv command, this won't create issue in case of an incomplete previous installation (e.g. empty mcsm dir) + mv "$daemon_data" "$daemon_data_tmp" + # Remove the old daemon dir + rm -rf "$daemon_path" + + else + echo_cyan "[+] Install MCSManager daemon..." + fi + + # Install MCSM Web + Install_MCSM_Daemon_Base + + # Install MCSM Web Service + Install_Daemon_Systemd +} +# Arguments parsing +Parse_Arguments() { + while getopts "u:c:" opt; do + case ${opt} in + u ) + if [[ "${OPTARG}" == "mcsm" || "${OPTARG}" == "root" ]]; then + USER="${OPTARG}" + else + echo "Invalid user specified." + usage + fi + ;; + c ) + if [[ "${OPTARG}" == "web" || "${OPTARG}" == "daemon" || "${OPTARG}" == "all" ]]; then + COMMAND="${OPTARG}" + else + echo "Invalid command specified." + usage + fi + ;; + \? ) + usage + ;; + : ) + echo "Option -$OPTARG requires an argument." + usage + ;; + esac + done +} + +# Wrapper for installation +Install_Update() { + case "$COMMAND" in + all) + Install_Web_Wrapper + Install_Daemon_Wrapper + ;; + + web) + Install_Web_Wrapper + ;; + + daemon) + Install_Daemon_Wrapper + ;; + + *) + echo "Unknown command: $COMMAND, this should not happen in general :( Please report this bug." + # Exit with an error if COMMAND is unrecognized + exit 1 + ;; + esac +} +# Finalize installation +Finalize() { + #Clear screen + clear + #printf "\n\n\n\n" + echo "______ _______________________ ___" + echo "___ |/ /_ ____/_ ___/__ |/ /_____ _____________ _______ _____________" + echo "__ /|_/ /_ / _____ \__ /|_/ /_ __ \`/_ __ \ __ \`/_ __ \`/ _ \_ ___/" + echo "_ / / / / /___ ____/ /_ / / / / /_/ /_ / / / /_/ /_ /_/ // __/ /" + echo "/_/ /_/ \____/ /____/ /_/ /_/ \__,_/ /_/ /_/\__,_/ _\__, / \___//_/" + echo " /____/" + + case "$COMMAND" in + all) + echo_yellow "==================================================================" + echo_green "Installation is complete! Welcome to the MCSManager V10!!!" + echo_yellow " " + echo_cyan_n "HTTP Web Service: " + echo_yellow "http://:23333 (Browser)" + echo_cyan_n "Daemon Address: " + echo_yellow "ws://:24444 (Cluster)" + echo_red "You must expose ports 23333 and 24444 to use the service properly on the Internet." + echo_yellow " " + echo_cyan "Usage:" + echo_cyan "systemctl start mcsm-{daemon,web}.service" + echo_cyan "systemctl stop mcsm-{daemon,web}.service" + echo_cyan "systemctl restart mcsm-{daemon,web}.service" + echo_yellow " " + echo_green "Official Document: https://docs.mcsmanager.com/" + echo_yellow "==================================================================" + ;; + + web) + echo_yellow "==================================================================" + echo_green "Installation is complete! Welcome to the MCSManager V10!!!" + echo_yellow " " + echo_cyan_n "HTTP Web Service: " + echo_yellow "http://:23333 (Browser)" + echo_red "You must expose port 23333 to use the service properly on the Internet." + echo_yellow " " + echo_cyan "Usage:" + echo_cyan "systemctl start mcsm-web.service" + echo_cyan "systemctl stop mcsm-web.service" + echo_cyan "systemctl restart mcsm-web.service" + echo_yellow " " + echo_green "Official Document: https://docs.mcsmanager.com/" + echo_yellow "==================================================================" + ;; + + daemon) + echo_yellow "==================================================================" + echo_green "Installation is complete! Welcome to the MCSManager V10!!!" + echo_yellow " " + echo_cyan_n "Daemon Address: " + echo_yellow "ws://:24444 (Cluster)" + echo_red "You must expose port 24444 to use the service properly on the Internet." + echo_yellow " " + echo_cyan "Usage:" + echo_cyan "systemctl start mcsm-daemon.service" + echo_cyan "systemctl stop mcsm-daemon.service" + echo_cyan "systemctl restart mcsm-daemon.service" + echo_yellow " " + echo_green "Official Document: https://docs.mcsmanager.com/" + echo_yellow "==================================================================" + ;; + + *) + echo "Unknown command: $COMMAND, this should not happen in general :( Please report this bug." + # Exit with an error if COMMAND is unrecognized + exit 1 + ;; + esac + # Check if backup_path is not empty + if [[ -n "$backup_path" ]]; then + echo_green "Your MCSM has been updated from a previous installation. " + echo_green "A complete backup was created at:" + echo_yellow "$backup_path" + echo_green "You can manually delete the backup using command: " + echo_red "rm ${backup_path}" + fi + # Move quickstart.md + mv "${mcsm_down_temp}/quick-start.md" "${mcsmanager_install_path}/quick-start.md" + # Remove the temp folder + rm -rf "${mcsm_down_temp}" + + +} +########### Main Logic ################ +main() { + # Do not create mcsmanager path yet as it will break the logic detecting existing installation + Initialize "$@" + # Check if the mcsmanager_install_path exists + if [ -d "$mcsmanager_install_path" ]; then + # Backup first + Backup_MCSM + # Install Node.js, this is to ensure the version is up to date. + Install_node + + else + # Create mcsmanager path if not already + mkdir -p "$mcsmanager_install_path" + # Install Node.js, this is to ensure the version is up to date. + Install_node + fi + + # Install Services based on command + Install_Update + + # Print helping Information + Finalize + + echo "Installation Complete!" +} + +main "$@" \ No newline at end of file From c754062b681f016f6e5642c94c7a006276a3517f Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Mon, 6 May 2024 03:50:00 +0800 Subject: [PATCH 057/338] optimizing text styles --- install_update.sh | 7 ++++++- install_update_cn.sh | 12 ++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/install_update.sh b/install_update.sh index ad347f5..3a3e94c 100644 --- a/install_update.sh +++ b/install_update.sh @@ -77,7 +77,7 @@ check_sudo() { Install_dependencies() { # Install related software - echo_cyan_n "[+] Installing dependent software (git, tar, wget)... " + echo_cyan "[+] Installing dependent software (git, tar, wget)... " if [[ -x "$(command -v yum)" ]]; then yum install -y git tar wget elif [[ -x "$(command -v apt-get)" ]]; then @@ -179,6 +179,11 @@ Detect_Architecture() { } # Initialization Initialize() { + echo_cyan "+---------------------------------------------------------------------- +| MCSManager V10 Installation & Upgrading Script ++---------------------------------------------------------------------- + " + # Check sudo check_sudo diff --git a/install_update_cn.sh b/install_update_cn.sh index ad347f5..28d3236 100644 --- a/install_update_cn.sh +++ b/install_update_cn.sh @@ -12,7 +12,7 @@ mcsm_backup_dir="${install_base}" # Download URL mcsmanager_download_addr="http://oss.duzuii.com/d/MCSManager/MCSManager/MCSManager-v10-linux.tar.gz" # Node.js version to install -node="v20.12.2" +node="v16.20.2" # MCSM Web dir name mcsm_web="web" # MCSM daemon dir name @@ -77,7 +77,7 @@ check_sudo() { Install_dependencies() { # Install related software - echo_cyan_n "[+] Installing dependent software (git, tar, wget)... " + echo_cyan "[+] Installing dependent software (git, tar, wget)... " if [[ -x "$(command -v yum)" ]]; then yum install -y git tar wget elif [[ -x "$(command -v apt-get)" ]]; then @@ -179,6 +179,10 @@ Detect_Architecture() { } # Initialization Initialize() { + echo_cyan "+---------------------------------------------------------------------- +| MCSManager V10安装升级脚本 ++---------------------------------------------------------------------- + " # Check sudo check_sudo @@ -482,7 +486,7 @@ Install_Update() { # Finalize installation Finalize() { #Clear screen - clear + #clear #printf "\n\n\n\n" echo "______ _______________________ ___" echo "___ |/ /_ ____/_ ___/__ |/ /_____ _____________ _______ _____________" @@ -494,7 +498,7 @@ Finalize() { case "$COMMAND" in all) echo_yellow "==================================================================" - echo_green "Installation is complete! Welcome to the MCSManager V10!!!" + echo_green "安装已完成! 欢迎使用 MCSManager V10!!!" echo_yellow " " echo_cyan_n "HTTP Web Service: " echo_yellow "http://:23333 (Browser)" From 008b50239d0d0761e2e2d3c79fefe2f4131e5158 Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Mon, 6 May 2024 03:54:00 +0800 Subject: [PATCH 058/338] add cn translation --- install_update_cn.sh | 64 ++++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/install_update_cn.sh b/install_update_cn.sh index 28d3236..794a501 100644 --- a/install_update_cn.sh +++ b/install_update_cn.sh @@ -500,52 +500,52 @@ Finalize() { echo_yellow "==================================================================" echo_green "安装已完成! 欢迎使用 MCSManager V10!!!" echo_yellow " " - echo_cyan_n "HTTP Web Service: " - echo_yellow "http://:23333 (Browser)" - echo_cyan_n "Daemon Address: " - echo_yellow "ws://:24444 (Cluster)" - echo_red "You must expose ports 23333 and 24444 to use the service properly on the Internet." + echo_cyan_n "网页 服务: " + echo_yellow "http://<您的 IP>:23333 (Browser)" + echo_cyan_n "节点 地址: " + echo_yellow "ws://<您的 IP>:24444 (Cluster)" + echo_red "您必须开放 23333 与 24444 端口才可以正常从公网访问" echo_yellow " " - echo_cyan "Usage:" - echo_cyan "systemctl start mcsm-{daemon,web}.service" - echo_cyan "systemctl stop mcsm-{daemon,web}.service" - echo_cyan "systemctl restart mcsm-{daemon,web}.service" + echo_cyan "使用方法:" + echo_cyan "启动: systemctl start mcsm-{daemon,web}.service" + echo_cyan "关闭: systemctl stop mcsm-{daemon,web}.service" + echo_cyan "重启: systemctl restart mcsm-{daemon,web}.service" echo_yellow " " - echo_green "Official Document: https://docs.mcsmanager.com/" + echo_green "官方文档: https://docs.mcsmanager.com/" echo_yellow "==================================================================" ;; web) echo_yellow "==================================================================" - echo_green "Installation is complete! Welcome to the MCSManager V10!!!" + echo_green "安装已完成! 欢迎使用 MCSManager V10!!!" echo_yellow " " - echo_cyan_n "HTTP Web Service: " - echo_yellow "http://:23333 (Browser)" - echo_red "You must expose port 23333 to use the service properly on the Internet." + echo_cyan_n "网页 服务: " + echo_yellow "http://<您的 IP>:23333 (Browser)" + echo_red "您必须开放 23333 端口才可以正常从公网访问" echo_yellow " " - echo_cyan "Usage:" - echo_cyan "systemctl start mcsm-web.service" - echo_cyan "systemctl stop mcsm-web.service" - echo_cyan "systemctl restart mcsm-web.service" + echo_cyan "使用方法:" + echo_cyan "启动: systemctl start mcsm-{daemon,web}.service" + echo_cyan "关闭: systemctl stop mcsm-{daemon,web}.service" + echo_cyan "重启: systemctl restart mcsm-{daemon,web}.service" echo_yellow " " - echo_green "Official Document: https://docs.mcsmanager.com/" + echo_green "官方文档: https://docs.mcsmanager.com/" echo_yellow "==================================================================" ;; daemon) echo_yellow "==================================================================" - echo_green "Installation is complete! Welcome to the MCSManager V10!!!" + echo_green "安装已完成! 欢迎使用 MCSManager V10!!!" echo_yellow " " - echo_cyan_n "Daemon Address: " - echo_yellow "ws://:24444 (Cluster)" - echo_red "You must expose port 24444 to use the service properly on the Internet." + echo_cyan_n "节点 地址: " + echo_yellow "ws://<您的 IP>:24444 (Cluster)" + echo_red "您必须开放 24444 端口才可以正常从公网访问" echo_yellow " " - echo_cyan "Usage:" - echo_cyan "systemctl start mcsm-daemon.service" - echo_cyan "systemctl stop mcsm-daemon.service" - echo_cyan "systemctl restart mcsm-daemon.service" + echo_cyan "使用方法:" + echo_cyan "启动: systemctl start mcsm-{daemon,web}.service" + echo_cyan "关闭: systemctl stop mcsm-{daemon,web}.service" + echo_cyan "重启: systemctl restart mcsm-{daemon,web}.service" echo_yellow " " - echo_green "Official Document: https://docs.mcsmanager.com/" + echo_green "官方文档: https://docs.mcsmanager.com/" echo_yellow "==================================================================" ;; @@ -557,10 +557,10 @@ Finalize() { esac # Check if backup_path is not empty if [[ -n "$backup_path" ]]; then - echo_green "Your MCSM has been updated from a previous installation. " - echo_green "A complete backup was created at:" + echo_green "您的MCSManager是从上一个版本升级而来. " + echo_green "我们已经为您创建了一个备份, 位于:" echo_yellow "$backup_path" - echo_green "You can manually delete the backup using command: " + echo_green "如果需要, 您可以使用下列命令手动删除备份: " echo_red "rm ${backup_path}" fi # Move quickstart.md @@ -594,7 +594,7 @@ main() { # Print helping Information Finalize - echo "Installation Complete!" + echo "安装或升级已完成!" } main "$@" \ No newline at end of file From f5bc278b0fc265d68df2ead8957b0e882383e478 Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Mon, 6 May 2024 03:54:33 +0800 Subject: [PATCH 059/338] optimize text style --- install_update.sh | 2 +- install_update_cn.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/install_update.sh b/install_update.sh index 3a3e94c..a92cd09 100644 --- a/install_update.sh +++ b/install_update.sh @@ -595,7 +595,7 @@ main() { # Print helping Information Finalize - echo "Installation Complete!" + echo_green "Installation/Upgrading Complete!" } main "$@" \ No newline at end of file diff --git a/install_update_cn.sh b/install_update_cn.sh index 794a501..ff1add3 100644 --- a/install_update_cn.sh +++ b/install_update_cn.sh @@ -594,7 +594,7 @@ main() { # Print helping Information Finalize - echo "安装或升级已完成!" + echo_green "安装或升级已完成!" } main "$@" \ No newline at end of file From 856ac0afa2726b7bff265cd209ab5460531b10ac Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Mon, 6 May 2024 04:01:25 +0800 Subject: [PATCH 060/338] cn localization --- install_update_cn.sh | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/install_update_cn.sh b/install_update_cn.sh index ff1add3..66ee6e5 100644 --- a/install_update_cn.sh +++ b/install_update_cn.sh @@ -38,8 +38,8 @@ node_install_path="" # Helper Functions usage() { echo "Usage: $0 [-u user] [-c command]" - echo " -u Specify the user (mcsm or root), default is 'mcsm'" - echo " -c Specify the command (web, daemon, or all), default is 'all'" + echo " -u 指定用户安装 (mcsm 或 root), 默认是 'mcsm'" + echo " -c 安装指定组件 (web, daemon, 或 all), 默认是 'all'" exit 1 } Red_Error() { @@ -92,7 +92,7 @@ Install_dependencies() { # Determine whether the relevant software is installed successfully if [[ -x "$(command -v git)" && -x "$(command -v tar)" && -x "$(command -v wget)" ]]; then - echo_green "Success" + echo_green "成功!" else Red_Error "[x] Failed to find git, tar and wget, please install them manually!" fi @@ -101,9 +101,9 @@ Install_dependencies() { Install_node() { if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then - echo_green "Desired Node.js is already installed at the target dir, bypassing installation..." + echo_green "检测到已安装的Node.js版本, 已为您跳过安装." else - echo_cyan_n "[+] Install Node.js environment...\n" + echo_cyan_n "[+] 安装 Node.js 环境中...\n" rm -irf "$node_install_path" @@ -206,9 +206,9 @@ Initialize() { # Create the user 'mcsm' if it doesn't already exist if ! id "mcsm" &>/dev/null; then /usr/sbin/useradd mcsm - echo_green "User 'mcsm' created." + echo_green "用户 'mcsm' 已创建." else - echo_yellow "User 'mcsm' already exists." + echo_yellow "用户 'mcsm' 已经存在." fi fi } @@ -216,17 +216,17 @@ Initialize() { Backup_MCSM() { # Ensure both directories are provided if [ -z "$mcsmanager_install_path" ] || [ -z "$mcsm_backup_dir" ]; then - Red_Error "Error: Backup or source path not set." + Red_Error "错误: 备份或源路径为空." fi # Check if the source directory exists if [ ! -d "$mcsmanager_install_path" ]; then - Red_Error "Error: Source directory does not exist." + Red_Error "错误: 源目录不存在." fi # Create backup directory (/opt) if it doesn't exist if [ ! -d "$mcsm_backup_dir" ]; then - echo_yellow "Creating backup directory." + echo_yellow "正在创建备份目录..." mkdir -p "$mcsm_backup_dir" fi @@ -234,16 +234,16 @@ Backup_MCSM() { backup_path="${mcsm_backup_dir}/mcsm_backup_${current_date}.tar.gz" # Create the backup - echo_yellow "Creating backup..." + echo_yellow "正在创建备份..." #tar -czf "$backup_path" -C "$mcsmanager_install_path" . tar -czf "$backup_path" -C "$(dirname "$mcsmanager_install_path")" "$(basename "$mcsmanager_install_path")" # Check if the backup was successful if [ $? -eq 0 ]; then - echo_green "Successfully created backup at $backup_path" + echo_green "成功创建了备份,位于: $backup_path" else - Red_Error "Error creating backup." + Red_Error "创建备份时出错" fi } # MCSM Web Base Installation @@ -261,8 +261,8 @@ Install_MCSM_Web_Base() { # Dependencies install cd "${web_path}" || Red_Error "[x] Failed to enter ${web_path}" # Install dependencies - echo_cyan "[+] Install MCSManager-Web dependencies..." - env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${web_path}" + echo_cyan "[+] 安装 MCSManager 网页 依赖中..." + env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] 在 ${web_path} 安装依赖时出错." # Return to general dir cd "$mcsmanager_install_path" # Configure ownership if needed @@ -274,7 +274,7 @@ Install_MCSM_Web_Base() { } # MCSM Web Service Installation Install_Web_Systemd() { - echo_cyan "[+] Creating MCSManager Web service..." + echo_cyan "[+] 创建 MCSManager 网页服务中..." # stop and disable existing service systemctl disable --now mcsm-web @@ -318,7 +318,7 @@ Install_Web_Wrapper() { web_data="${web_path}/data" web_data_tmp="${mcsmanager_install_path}/web_data_${current_date}" if [ -d "$web_path" ]; then - echo_cyan "[+] Updating MCSManager Web..." + echo_cyan "[+] 升级 MCSManager 网页端中..." # The backup should be created already, moving the DATA dir to /opt/mcsmanager/web_data should be fast and safe. # Use web_data, do not use data as in rare circumstance user may run both update at the same time. # Use mv command, this won't create issue in case of an incomplete previous installation (e.g. empty mcsm dir) @@ -327,7 +327,7 @@ Install_Web_Wrapper() { rm -rf "$web_path" else - echo_cyan "[+] Install MCSManager Web..." + echo_cyan "[+] 安装 MCSManager 网页端中..." fi @@ -354,7 +354,7 @@ Install_MCSM_Daemon_Base() { # Dependencies install cd "${daemon_path}" || Red_Error "[x] Failed to enter ${daemon_path}" # Install dependencies - echo_cyan "[+] Install MCSManager-Daemon dependencies..." + echo_cyan "[+] 安装 MCSManager 节点依赖中..." env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${daemon_path}" # Return to general dir cd "$mcsmanager_install_path" @@ -368,7 +368,7 @@ Install_MCSM_Daemon_Base() { # MCSM Daemon Service Installation Install_Daemon_Systemd() { - echo_cyan "[+] Creating MCSManager Daemon service..." + echo_cyan "[+] 创建 MCSManager 节点服务中..." # stop and disable existing service systemctl disable --now mcsm-daemon @@ -411,7 +411,7 @@ Install_Daemon_Wrapper() { daemon_data="${daemon_path}/data" daemon_data_tmp="${mcsmanager_install_path}/daemon_data_${current_date}" if [ -d "$daemon_path" ]; then - echo_cyan "[+] Updating MCSManager Daemon..." + echo_cyan "[+] 升级 MCSManager 节点中..." # The backup should be created already, moving the DATA dir to /opt/mcsmanager/daemon_data should be fast and safe. # Use daemon_data, do not use data as in rare circumstance user may run both update at the same time. # Use mv command, this won't create issue in case of an incomplete previous installation (e.g. empty mcsm dir) @@ -420,7 +420,7 @@ Install_Daemon_Wrapper() { rm -rf "$daemon_path" else - echo_cyan "[+] Install MCSManager daemon..." + echo_cyan "[+] 安装 MCSManager 节点中..." fi # Install MCSM Web From 36a3f3704b63c08496ba1d92d9ceec7f8a27531e Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Mon, 6 May 2024 04:02:37 +0800 Subject: [PATCH 061/338] optimize cn text --- install_update_cn.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install_update_cn.sh b/install_update_cn.sh index 66ee6e5..73bee7d 100644 --- a/install_update_cn.sh +++ b/install_update_cn.sh @@ -77,7 +77,7 @@ check_sudo() { Install_dependencies() { # Install related software - echo_cyan "[+] Installing dependent software (git, tar, wget)... " + echo_cyan "[+] 正在安装以来软件 (git, tar, wget)... " if [[ -x "$(command -v yum)" ]]; then yum install -y git tar wget elif [[ -x "$(command -v apt-get)" ]]; then @@ -557,7 +557,7 @@ Finalize() { esac # Check if backup_path is not empty if [[ -n "$backup_path" ]]; then - echo_green "您的MCSManager是从上一个版本升级而来. " + echo_green "您的MCSManager是由一个已存在的版本升级而来. " echo_green "我们已经为您创建了一个备份, 位于:" echo_yellow "$backup_path" echo_green "如果需要, 您可以使用下列命令手动删除备份: " From ff9a71e6a23324c34098312960b7c0f449726677 Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Mon, 6 May 2024 04:04:21 +0800 Subject: [PATCH 062/338] optimize cn text --- install_update_cn.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install_update_cn.sh b/install_update_cn.sh index 73bee7d..60e64b6 100644 --- a/install_update_cn.sh +++ b/install_update_cn.sh @@ -77,7 +77,7 @@ check_sudo() { Install_dependencies() { # Install related software - echo_cyan "[+] 正在安装以来软件 (git, tar, wget)... " + echo_cyan "[+] 正在安装依赖软件 (git, tar, wget)... " if [[ -x "$(command -v yum)" ]]; then yum install -y git tar wget elif [[ -x "$(command -v apt-get)" ]]; then @@ -126,10 +126,10 @@ Install_node() { echo - echo_yellow "=============== Node.js Version ===============" + echo_yellow "=============== Node.js 版本 ===============" echo_yellow " node: $("$node_install_path"/bin/node -v)" echo_yellow " npm: v$(env "$node_install_path"/bin/node "$node_install_path"/bin/npm -v)" - echo_yellow "=============== Node.JS Version ===============" + echo_yellow "=============== Node.js 版本 ===============" echo sleep 1 } From c3ac0771da79f92d2bd9e7742e0c4a6d6cd4bc3f Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Mon, 6 May 2024 04:04:39 +0800 Subject: [PATCH 063/338] optimized text --- install_update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install_update.sh b/install_update.sh index a92cd09..5ef103e 100644 --- a/install_update.sh +++ b/install_update.sh @@ -129,7 +129,7 @@ Install_node() { echo_yellow "=============== Node.js Version ===============" echo_yellow " node: $("$node_install_path"/bin/node -v)" echo_yellow " npm: v$(env "$node_install_path"/bin/node "$node_install_path"/bin/npm -v)" - echo_yellow "=============== Node.JS Version ===============" + echo_yellow "=============== Node.js Version ===============" echo sleep 1 } From b96deae51c0c44b76bfb01a46d51a06b70172e67 Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Mon, 6 May 2024 04:06:18 +0800 Subject: [PATCH 064/338] wipe screen once installed --- install_update_cn.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install_update_cn.sh b/install_update_cn.sh index 60e64b6..2b5c4db 100644 --- a/install_update_cn.sh +++ b/install_update_cn.sh @@ -486,7 +486,7 @@ Install_Update() { # Finalize installation Finalize() { #Clear screen - #clear + clear #printf "\n\n\n\n" echo "______ _______________________ ___" echo "___ |/ /_ ____/_ ___/__ |/ /_____ _____________ _______ _____________" From d4f7c77fa27ae7515d2fb818a6084f05bd07c0b5 Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Mon, 6 May 2024 04:19:12 +0800 Subject: [PATCH 065/338] use github link for latest release --- install_update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install_update.sh b/install_update.sh index 5ef103e..4bec48a 100644 --- a/install_update.sh +++ b/install_update.sh @@ -10,7 +10,7 @@ mcsmanager_install_path="${install_base}/mcsmanager" # MCSM backup dir during upgrade mcsm_backup_dir="${install_base}" # Download URL -mcsmanager_download_addr="http://oss.duzuii.com/d/MCSManager/MCSManager/MCSManager-v10-linux.tar.gz" +mcsmanager_download_addr="https://github.com/MCSManager/MCSManager/releases/latest/download/mcsmanager_linux_release.tar.gz " # Node.js version to install node="v20.12.2" # MCSM Web dir name From 3ff580dda564cdd7b798649bbb02b3165dc7092e Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Mon, 6 May 2024 13:10:14 +0800 Subject: [PATCH 066/338] remove typo --- setup.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.sh b/setup.sh index 308c3a3..1291155 100644 --- a/setup.sh +++ b/setup.sh @@ -19,7 +19,6 @@ echo_cyan() { echo_red() { printf '\033[1;31m%b\033[0m\n' "$@" } -vv echo_green() { printf '\033[1;32m%b\033[0m\n' "$@" } From 87eae296650a25d58d8370d99c2b10a103bc9171 Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Mon, 6 May 2024 13:12:24 +0800 Subject: [PATCH 067/338] disable backup --- install_update.sh | 4 ++-- install_update_cn.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/install_update.sh b/install_update.sh index 4bec48a..f4f11eb 100644 --- a/install_update.sh +++ b/install_update.sh @@ -577,8 +577,8 @@ main() { Initialize "$@" # Check if the mcsmanager_install_path exists if [ -d "$mcsmanager_install_path" ]; then - # Backup first - Backup_MCSM + # Backup first, due to potential large file being archived, backup is disabled. + # Backup_MCSM # Install Node.js, this is to ensure the version is up to date. Install_node diff --git a/install_update_cn.sh b/install_update_cn.sh index 2b5c4db..a292ece 100644 --- a/install_update_cn.sh +++ b/install_update_cn.sh @@ -576,8 +576,8 @@ main() { Initialize "$@" # Check if the mcsmanager_install_path exists if [ -d "$mcsmanager_install_path" ]; then - # Backup first - Backup_MCSM + # Backup first, due to potential large file being archived, backup is disabled. + # Backup_MCSM # Install Node.js, this is to ensure the version is up to date. Install_node From fbfa9fecd94af7a001df0dc8d5cf9669f05fc25d Mon Sep 17 00:00:00 2001 From: Unitwk Date: Mon, 6 May 2024 14:15:22 +0800 Subject: [PATCH 068/338] Fix: https://github.com/MCSManager/Script/pull/28 --- setup.sh | 6 +++--- setup_cn.sh | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/setup.sh b/setup.sh index 0f6eeff..87714b5 100644 --- a/setup.sh +++ b/setup.sh @@ -1,7 +1,7 @@ #!/bin/bash mcsmanager_install_path="/opt/mcsmanager" -mcsmanager_donwload_addr="http://oss.duzuii.com/d/MCSManager/MCSManager/MCSManager-v10-linux.tar.gz" +mcsmanager_download_addr="http://oss.duzuii.com/d/MCSManager/MCSManager/MCSManager-v10-linux.tar.gz" package_name="MCSManager-v10-linux.tar.gz" node="v20.12.2" arch=$(uname -m) @@ -91,8 +91,8 @@ Install_MCSManager() { # cd /opt/mcsmanager cd "${mcsmanager_install_path}" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}" - # donwload MCSManager release - wget "${mcsmanager_donwload_addr}" || Red_Error "[x] Failed to download MCSManager" + # download MCSManager release + wget "${mcsmanager_download_addr}" || Red_Error "[x] Failed to download MCSManager" tar -zxf ${package_name} -o || Red_Error "[x] Failed to untar ${package_name}" rm -rf "${mcsmanager_install_path}/${package_name}" diff --git a/setup_cn.sh b/setup_cn.sh index a518aa6..8af40ec 100755 --- a/setup_cn.sh +++ b/setup_cn.sh @@ -1,7 +1,7 @@ #!/bin/bash mcsmanager_install_path="/opt/mcsmanager" -mcsmanager_donwload_addr="http://oss.duzuii.com/d/MCSManager/MCSManager/MCSManager-v10-linux.tar.gz" +mcsmanager_download_addr="http://oss.duzuii.com/d/MCSManager/MCSManager/MCSManager-v10-linux.tar.gz" package_name="MCSManager-v10-linux.tar.gz" node="v16.20.2" arch=$(uname -m) @@ -91,8 +91,8 @@ Install_MCSManager() { # cd /opt/mcsmanager cd "${mcsmanager_install_path}" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}" - # donwload MCSManager release - wget "${mcsmanager_donwload_addr}" || Red_Error "[x] Failed to download MCSManager" + # download MCSManager release + wget "${mcsmanager_download_addr}" || Red_Error "[x] Failed to download MCSManager" tar -zxf ${package_name} -o || Red_Error "[x] Failed to untar ${package_name}" rm -rf "${mcsmanager_install_path}/${package_name}" From 8738b986b8d406b1882e3316e78cc3d0e1ce7849 Mon Sep 17 00:00:00 2001 From: Unitwk Date: Tue, 7 May 2024 11:45:17 +0800 Subject: [PATCH 069/338] Feat: add forge --- templates.json | 120 ++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 108 insertions(+), 12 deletions(-) diff --git a/templates.json b/templates.json index 7a0fe9f..6c67663 100644 --- a/templates.json +++ b/templates.json @@ -11,6 +11,25 @@ } ], "packages": [ + { + "language": "en_us", + "description": "[Forge] Forge-1.19.2-43.3.13-installer.jar", + "title": "Forge 1.19.2-43.3.13", + "runtime": "Java 17+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.19.2-43.3.13/forge-1.19.2-43.3.13-installer.jar", + "author": "mcsmanager.com", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.19.2-43.3.13-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "language": "en_us", "description": "[Paper] Recommendation for friends with multiple players, Fast setup.", @@ -20,7 +39,14 @@ "size": "140MB", "remark": "Paper Software", "targetLink": "http://oss.duzuii.com/d/MCSManager/Minecraft-Server-Software/Global-Paper-1.20.4.zip", - "author": "mcsmanager.com" + "author": "mcsmanager.com", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar server.jar -nogui", + "stopCommand": "stop", + "ie": "utf-8", + "oe": "utf-8" + } }, { "language": "en_us", @@ -31,7 +57,14 @@ "size": "140MB", "remark": "Paper Software", "targetLink": "http://oss.duzuii.com/d/MCSManager/Minecraft-Server-Software/Global-Paper-1.19.2.zip", - "author": "mcsmanager.com" + "author": "mcsmanager.com", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar server.jar -nogui", + "stopCommand": "stop", + "ie": "utf-8", + "oe": "utf-8" + } }, { "language": "en_us", @@ -42,7 +75,14 @@ "size": "140MB", "remark": "Paper Software", "targetLink": "http://oss.duzuii.com/d/MCSManager/Minecraft-Server-Software/Global-Paper-1.18.2.zip", - "author": "mcsmanager.com" + "author": "mcsmanager.com", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar server.jar -nogui", + "stopCommand": "stop", + "ie": "utf-8", + "oe": "utf-8" + } }, { @@ -56,7 +96,7 @@ "author": "alongw.cn", "setupInfo": { "type": "minecraft/java", - "startCommand": "java -Xmx2048M -jar server.jar -nogui", + "startCommand": "java -jar server.jar -nogui", "stopCommand": "stop", "ie": "utf-8", "oe": "utf-8" @@ -71,7 +111,14 @@ "size": "140MB", "remark": "支持插件,最低 8GB 内存要求", "targetLink": "http://oss.duzuii.com/d/MCSManager/Minecraft-Server-Software/paper-1.19.2.zip", - "author": "mcsmanager.com" + "author": "mcsmanager.com", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar server.jar -nogui", + "stopCommand": "stop", + "ie": "utf-8", + "oe": "utf-8" + } }, { "language": "zh_cn", @@ -82,7 +129,14 @@ "size": "210MB", "remark": "支持插件,最低 8GB 内存要求", "targetLink": "https://url.alww.top/mcsm/paper1.19.2", - "author": "alongw.cn" + "author": "alongw.cn", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar server.jar -nogui", + "stopCommand": "stop", + "ie": "utf-8", + "oe": "utf-8" + } }, { "language": "zh_cn", @@ -93,7 +147,14 @@ "size": "100MB", "remark": "支持插件,支持mod(Forge),最低 6GB 内存要求", "targetLink": "https://url.alww.top/mcsm/arclight1.19.2", - "author": "alongw.cn" + "author": "alongw.cn", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar server.jar -nogui", + "stopCommand": "stop", + "ie": "utf-8", + "oe": "utf-8" + } }, { "language": "zh_cn", @@ -104,7 +165,14 @@ "size": "230MB", "remark": "支持插件,最低 6GB 内存要求", "targetLink": "https://url.alww.top/mcsm/paper-geyser1.19.2", - "author": "alongw.cn" + "author": "alongw.cn", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar server.jar -nogui", + "stopCommand": "stop", + "ie": "utf-8", + "oe": "utf-8" + } }, { "language": "zh_cn", @@ -115,7 +183,14 @@ "size": "140MB", "remark": "支持插件,最低 4GB 内存要求", "targetLink": "http://oss.duzuii.com/d/MCSManager/Minecraft-Server-Software/paper-1.19.1.zip", - "author": "mcsmanager.com" + "author": "mcsmanager.com", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar server.jar -nogui", + "stopCommand": "stop", + "ie": "utf-8", + "oe": "utf-8" + } }, { "language": "zh_cn", @@ -126,7 +201,14 @@ "size": "140MB", "remark": "支持插件,最低 4GB 内存要求", "targetLink": "http://oss.duzuii.com/d/MCSManager/Minecraft-Server-Software/paper-1.19.zip", - "author": "mcsmanager.com" + "author": "mcsmanager.com", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar server.jar -nogui", + "stopCommand": "stop", + "ie": "utf-8", + "oe": "utf-8" + } }, { "language": "zh_cn", @@ -137,7 +219,14 @@ "size": "140MB", "remark": "支持插件,最低 4GB 内存要求", "targetLink": "http://oss.duzuii.com/d/MCSManager/Minecraft-Server-Software/paper-1.18.2.zip", - "author": "mcsmanager.com" + "author": "mcsmanager.com", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar server.jar -nogui", + "stopCommand": "stop", + "ie": "utf-8", + "oe": "utf-8" + } }, { "language": "zh_cn", @@ -148,7 +237,14 @@ "size": "160MB", "remark": "支持插件,最低 4GB 内存要求", "targetLink": "http://oss.duzuii.com/d/MCSManager/Minecraft-Server-Software/paper-1.17.1.zip", - "author": "mcsmanager.com" + "author": "mcsmanager.com", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar server.jar -nogui", + "stopCommand": "stop", + "ie": "utf-8", + "oe": "utf-8" + } } ] } From d9063109f0a8f77be23c7e7742791837e2abb9a0 Mon Sep 17 00:00:00 2001 From: Unitwk Date: Tue, 7 May 2024 14:26:02 +0800 Subject: [PATCH 070/338] Feat: add forge pack --- templates.json | 82 ++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 69 insertions(+), 13 deletions(-) diff --git a/templates.json b/templates.json index 6c67663..55354e4 100644 --- a/templates.json +++ b/templates.json @@ -11,10 +11,29 @@ } ], "packages": [ + { + "language": "en_us", + "description": "[Forge] forge-1.20.6-50.0.8-installer.jar", + "title": "Forge 1.20.6 (Support Mods)", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.6-50.0.8/forge-1.20.6-50.0.8-installer.jar", + "author": "mcsmanager.com", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.20.6-50.0.8-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "language": "en_us", "description": "[Forge] Forge-1.19.2-43.3.13-installer.jar", - "title": "Forge 1.19.2-43.3.13", + "title": "Forge 1.19.2 (Support Mods)", "runtime": "Java 17+", "hardware": "RAM 8G+", "size": "7MB", @@ -35,7 +54,7 @@ "description": "[Paper] Recommendation for friends with multiple players, Fast setup.", "title": "Minecraft 1.20.4 Java", "runtime": "Java 17+", - "hardware": "RAM 8G", + "hardware": "RAM 8G+", "size": "140MB", "remark": "Paper Software", "targetLink": "http://oss.duzuii.com/d/MCSManager/Minecraft-Server-Software/Global-Paper-1.20.4.zip", @@ -53,7 +72,7 @@ "description": "[Paper] Recommendation for friends with multiple players", "title": "Minecraft 1.19.2 Java", "runtime": "Java 17+", - "hardware": "RAM 8G", + "hardware": "RAM 8G+", "size": "140MB", "remark": "Paper Software", "targetLink": "http://oss.duzuii.com/d/MCSManager/Minecraft-Server-Software/Global-Paper-1.19.2.zip", @@ -71,7 +90,7 @@ "description": "[Paper] Recommendation for friends with multiple players", "title": "Minecraft 1.18.2 Java", "runtime": "Java 17+", - "hardware": "RAM 8G", + "hardware": "RAM 8G+", "size": "140MB", "remark": "Paper Software", "targetLink": "http://oss.duzuii.com/d/MCSManager/Minecraft-Server-Software/Global-Paper-1.18.2.zip", @@ -84,7 +103,44 @@ "oe": "utf-8" } }, - + { + "language": "zh_cn", + "description": "[Forge] forge-1.20.6-50.0.8-installer.jar,来自官方网站源。", + "title": "Forge 1.20.6 Java 版 (支持模组)", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.6-50.0.8/forge-1.20.6-50.0.8-installer.jar", + "author": "mcsmanager.com", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.20.6-50.0.8-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "zh_cn", + "description": "[Forge] Forge-1.19.2-43.3.13,支持安装 MOD。", + "title": "Forge 1.19.2 Java 版 (支持模组)", + "runtime": "Java 17+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.19.2-43.3.13/forge-1.19.2-43.3.13-installer.jar", + "author": "mcsmanager.com", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.19.2-43.3.13-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "language": "zh_cn", "description": "[Paper] 中小型互通服推荐,1.20.4 版本,快速开服,包含ESS、锁箱子、操作回滚、领地商店等基础插件。", @@ -107,7 +163,7 @@ "description": "[原版生存] 朋友联机推荐,1.19.2 版本,快速开服,享受原汁原味的极致生存与探索。", "title": "Minecraft 1.19.2 Java 原版", "runtime": "Java 17+", - "hardware": "RAM 8G", + "hardware": "RAM 8G+", "size": "140MB", "remark": "支持插件,最低 8GB 内存要求", "targetLink": "http://oss.duzuii.com/d/MCSManager/Minecraft-Server-Software/paper-1.19.2.zip", @@ -125,7 +181,7 @@ "description": "[整合包] 小型服务器推荐,包含基础插件、箱子锁、操作回滚、领地和商店等插件。", "title": "Minecraft 1.19.2 Java 版整合包", "runtime": "Java 17+", - "hardware": "RAM 8G", + "hardware": "RAM 8G+", "size": "210MB", "remark": "支持插件,最低 8GB 内存要求", "targetLink": "https://url.alww.top/mcsm/paper1.19.2", @@ -143,7 +199,7 @@ "description": "[Arclight] 小型服务器推荐,1.19.2 版本,可安装mod,互通基岩版,快速开服,包含ESS、锁箱子、操作回滚、领地商店等基础插件。", "title": "Minecraft 1.19.2", "runtime": "Java 17+", - "hardware": "RAM 8G", + "hardware": "RAM 8G+", "size": "100MB", "remark": "支持插件,支持mod(Forge),最低 6GB 内存要求", "targetLink": "https://url.alww.top/mcsm/arclight1.19.2", @@ -161,7 +217,7 @@ "description": "[整合包/Java&基岩版互通] 小型服务器推荐,互通基岩版,包含基础插件、箱子锁、操作回滚、领地和商店等插件。", "title": "Minecraft 1.19.2 基岩互通版", "runtime": "Java 17+", - "hardware": "RAM 8G", + "hardware": "RAM 8G+", "size": "230MB", "remark": "支持插件,最低 6GB 内存要求", "targetLink": "https://url.alww.top/mcsm/paper-geyser1.19.2", @@ -179,7 +235,7 @@ "description": "[原版生存] 朋友联机推荐,让你和你的小伙伴一起享受原汁原味的极致生存。", "title": "Minecraft 1.19.1 Java 原版", "runtime": "Java 17+", - "hardware": "RAM 8G", + "hardware": "RAM 8G+", "size": "140MB", "remark": "支持插件,最低 4GB 内存要求", "targetLink": "http://oss.duzuii.com/d/MCSManager/Minecraft-Server-Software/paper-1.19.1.zip", @@ -197,7 +253,7 @@ "description": "[原版生存] 适合朋友联机,“荒野更新”(The Wild)旨在为玩家带来现有生物群系的改进和优化。", "title": "Minecraft 1.19 Java 原版", "runtime": "Java 17+", - "hardware": "RAM 8G", + "hardware": "RAM 8G+", "size": "140MB", "remark": "支持插件,最低 4GB 内存要求", "targetLink": "http://oss.duzuii.com/d/MCSManager/Minecraft-Server-Software/paper-1.19.zip", @@ -215,7 +271,7 @@ "description": "[原版生存] 适合朋友联机推荐,继承上版本的功能并进行了一系列的优化,主流联机版本,插件与MOD较为丰富。", "title": "Minecraft 1.18.2 Java 原版", "runtime": "Java 17+", - "hardware": "RAM 8G", + "hardware": "RAM 8G+", "size": "140MB", "remark": "支持插件,最低 4GB 内存要求", "targetLink": "http://oss.duzuii.com/d/MCSManager/Minecraft-Server-Software/paper-1.18.2.zip", @@ -233,7 +289,7 @@ "description": "[原版生存] 适合朋友联机,快速开服,服务器搭建,回味老版本的地穴探索。", "title": "Minecraft 17.1 Java 原版", "runtime": "Java 17+", - "hardware": "RAM 8G", + "hardware": "RAM 8G+", "size": "160MB", "remark": "支持插件,最低 4GB 内存要求", "targetLink": "http://oss.duzuii.com/d/MCSManager/Minecraft-Server-Software/paper-1.17.1.zip", From 9783e858592af55cc9f02e6e1d9f379f97cbd002 Mon Sep 17 00:00:00 2001 From: Unitwk Date: Tue, 7 May 2024 14:51:05 +0800 Subject: [PATCH 071/338] Feat: add forge pack --- templates.json | 91 ++++++++------------------------------------------ 1 file changed, 14 insertions(+), 77 deletions(-) diff --git a/templates.json b/templates.json index 55354e4..bfacc70 100644 --- a/templates.json +++ b/templates.json @@ -13,14 +13,14 @@ "packages": [ { "language": "en_us", - "description": "[Forge] forge-1.20.6-50.0.8-installer.jar", + "description": "Forge-1.20.6-50.0.8-installer.jar", "title": "Forge 1.20.6 (Support Mods)", "runtime": "Java 21+", "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.6-50.0.8/forge-1.20.6-50.0.8-installer.jar", - "author": "mcsmanager.com", + "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", @@ -32,14 +32,14 @@ }, { "language": "en_us", - "description": "[Forge] Forge-1.19.2-43.3.13-installer.jar", + "description": "Forge-1.19.2-43.3.13-installer.jar", "title": "Forge 1.19.2 (Support Mods)", "runtime": "Java 17+", "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.19.2-43.3.13/forge-1.19.2-43.3.13-installer.jar", - "author": "mcsmanager.com", + "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", @@ -63,6 +63,7 @@ "type": "minecraft/java", "startCommand": "java -jar server.jar -nogui", "stopCommand": "stop", + "updateCommand": "", "ie": "utf-8", "oe": "utf-8" } @@ -81,6 +82,7 @@ "type": "minecraft/java", "startCommand": "java -jar server.jar -nogui", "stopCommand": "stop", + "updateCommand": "", "ie": "utf-8", "oe": "utf-8" } @@ -99,6 +101,7 @@ "type": "minecraft/java", "startCommand": "java -jar server.jar -nogui", "stopCommand": "stop", + "updateCommand": "", "ie": "utf-8", "oe": "utf-8" } @@ -112,7 +115,7 @@ "size": "7MB", "remark": "Minecraft Forge", "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.6-50.0.8/forge-1.20.6-50.0.8-installer.jar", - "author": "mcsmanager.com", + "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", @@ -131,7 +134,7 @@ "size": "7MB", "remark": "Minecraft Forge", "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.19.2-43.3.13/forge-1.19.2-43.3.13-installer.jar", - "author": "mcsmanager.com", + "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", @@ -141,23 +144,6 @@ "oe": "utf-8" } }, - { - "language": "zh_cn", - "description": "[Paper] 中小型互通服推荐,1.20.4 版本,快速开服,包含ESS、锁箱子、操作回滚、领地商店等基础插件。", - "title": "Minecraft 1.20.4", - "runtime": "Java 17+", - "size": "140MB", - "remark": "支持插件,最低 8GB 内存要求", - "targetLink": "https://url.alww.top/mcsm/paper1.20.4", - "author": "alongw.cn", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "java -jar server.jar -nogui", - "stopCommand": "stop", - "ie": "utf-8", - "oe": "utf-8" - } - }, { "language": "zh_cn", "description": "[原版生存] 朋友联机推荐,1.19.2 版本,快速开服,享受原汁原味的极致生存与探索。", @@ -172,60 +158,7 @@ "type": "minecraft/java", "startCommand": "java -jar server.jar -nogui", "stopCommand": "stop", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "zh_cn", - "description": "[整合包] 小型服务器推荐,包含基础插件、箱子锁、操作回滚、领地和商店等插件。", - "title": "Minecraft 1.19.2 Java 版整合包", - "runtime": "Java 17+", - "hardware": "RAM 8G+", - "size": "210MB", - "remark": "支持插件,最低 8GB 内存要求", - "targetLink": "https://url.alww.top/mcsm/paper1.19.2", - "author": "alongw.cn", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "java -jar server.jar -nogui", - "stopCommand": "stop", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "zh_cn", - "description": "[Arclight] 小型服务器推荐,1.19.2 版本,可安装mod,互通基岩版,快速开服,包含ESS、锁箱子、操作回滚、领地商店等基础插件。", - "title": "Minecraft 1.19.2", - "runtime": "Java 17+", - "hardware": "RAM 8G+", - "size": "100MB", - "remark": "支持插件,支持mod(Forge),最低 6GB 内存要求", - "targetLink": "https://url.alww.top/mcsm/arclight1.19.2", - "author": "alongw.cn", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "java -jar server.jar -nogui", - "stopCommand": "stop", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "zh_cn", - "description": "[整合包/Java&基岩版互通] 小型服务器推荐,互通基岩版,包含基础插件、箱子锁、操作回滚、领地和商店等插件。", - "title": "Minecraft 1.19.2 基岩互通版", - "runtime": "Java 17+", - "hardware": "RAM 8G+", - "size": "230MB", - "remark": "支持插件,最低 6GB 内存要求", - "targetLink": "https://url.alww.top/mcsm/paper-geyser1.19.2", - "author": "alongw.cn", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "java -jar server.jar -nogui", - "stopCommand": "stop", + "updateCommand": "", "ie": "utf-8", "oe": "utf-8" } @@ -244,6 +177,7 @@ "type": "minecraft/java", "startCommand": "java -jar server.jar -nogui", "stopCommand": "stop", + "updateCommand": "", "ie": "utf-8", "oe": "utf-8" } @@ -262,6 +196,7 @@ "type": "minecraft/java", "startCommand": "java -jar server.jar -nogui", "stopCommand": "stop", + "updateCommand": "", "ie": "utf-8", "oe": "utf-8" } @@ -280,6 +215,7 @@ "type": "minecraft/java", "startCommand": "java -jar server.jar -nogui", "stopCommand": "stop", + "updateCommand": "", "ie": "utf-8", "oe": "utf-8" } @@ -298,6 +234,7 @@ "type": "minecraft/java", "startCommand": "java -jar server.jar -nogui", "stopCommand": "stop", + "updateCommand": "", "ie": "utf-8", "oe": "utf-8" } From deecea070efc388377e234ccf30ff8b7c2f8c132 Mon Sep 17 00:00:00 2001 From: Unitwk Date: Tue, 7 May 2024 14:59:53 +0800 Subject: [PATCH 072/338] Feat: pack --- templates.json | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/templates.json b/templates.json index bfacc70..5b74fa9 100644 --- a/templates.json +++ b/templates.json @@ -106,6 +106,25 @@ "oe": "utf-8" } }, + { + "language": "zh_cn", + "description": "[Paper] 中小型互通服推荐,1.20.4 版本,快速开服,包含ESS、锁箱子、操作回滚、领地商店等基础插件。", + "title": "Minecraft 1.20.4", + "runtime": "Java 17+", + "hardware": "RAM 8G+", + "size": "140MB", + "remark": "支持插件,最低 8GB 内存要求", + "targetLink": "https://url.alww.top/mcsm/paper1.20.4.zip", + "author": "alongw.cn", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar server.jar -nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "language": "zh_cn", "description": "[Forge] forge-1.20.6-50.0.8-installer.jar,来自官方网站源。", From e761f8d3fe5fe6928d7c61915319d9d7400c1b20 Mon Sep 17 00:00:00 2001 From: Unitwk Date: Tue, 7 May 2024 15:04:25 +0800 Subject: [PATCH 073/338] Feat: pack --- templates.json | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/templates.json b/templates.json index 5b74fa9..5529dae 100644 --- a/templates.json +++ b/templates.json @@ -11,6 +11,25 @@ } ], "packages": [ + { + "language": "en_us", + "description": "[Paper] Recommendation for friends with multiple players, Fast setup.", + "title": "Minecraft 1.20.4 Java", + "runtime": "Java 17+", + "hardware": "RAM 6G+", + "size": "140MB", + "remark": "Paper Software", + "targetLink": "http://oss.duzuii.com/d/MCSManager/Minecraft-Server-Software/Global-Paper-1.20.4.zip", + "author": "mcsmanager.com", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar server.jar -nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "language": "en_us", "description": "Forge-1.20.6-50.0.8-installer.jar", @@ -49,25 +68,6 @@ "oe": "utf-8" } }, - { - "language": "en_us", - "description": "[Paper] Recommendation for friends with multiple players, Fast setup.", - "title": "Minecraft 1.20.4 Java", - "runtime": "Java 17+", - "hardware": "RAM 8G+", - "size": "140MB", - "remark": "Paper Software", - "targetLink": "http://oss.duzuii.com/d/MCSManager/Minecraft-Server-Software/Global-Paper-1.20.4.zip", - "author": "mcsmanager.com", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "java -jar server.jar -nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, { "language": "en_us", "description": "[Paper] Recommendation for friends with multiple players", @@ -109,9 +109,9 @@ { "language": "zh_cn", "description": "[Paper] 中小型互通服推荐,1.20.4 版本,快速开服,包含ESS、锁箱子、操作回滚、领地商店等基础插件。", - "title": "Minecraft 1.20.4", + "title": "Minecraft 1.20.4 (低配机器推荐)", "runtime": "Java 17+", - "hardware": "RAM 8G+", + "hardware": "RAM 6G+", "size": "140MB", "remark": "支持插件,最低 8GB 内存要求", "targetLink": "https://url.alww.top/mcsm/paper1.20.4.zip", @@ -127,7 +127,7 @@ }, { "language": "zh_cn", - "description": "[Forge] forge-1.20.6-50.0.8-installer.jar,来自官方网站源。", + "description": "[Forge] forge-1.20.6-50.0.8-installer.jar,来自官方网站源,需要高配机器支撑。", "title": "Forge 1.20.6 Java 版 (支持模组)", "runtime": "Java 21+", "hardware": "RAM 8G+", @@ -146,7 +146,7 @@ }, { "language": "zh_cn", - "description": "[Forge] Forge-1.19.2-43.3.13,支持安装 MOD。", + "description": "[Forge] Forge-1.19.2-43.3.13,支持安装 MOD,需要高配机器支撑。", "title": "Forge 1.19.2 Java 版 (支持模组)", "runtime": "Java 17+", "hardware": "RAM 8G+", From 67aa076d532adf3b88aa6c0e67f7a0668192f3a3 Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Thu, 9 May 2024 22:13:46 +0800 Subject: [PATCH 074/338] update function signature --- install_update.sh | 190 +++++++++++++++++++++---------------------- install_update_cn.sh | 181 ++++++++++++++++++++--------------------- 2 files changed, 185 insertions(+), 186 deletions(-) diff --git a/install_update.sh b/install_update.sh index f4f11eb..5ffff6f 100644 --- a/install_update.sh +++ b/install_update.sh @@ -36,7 +36,7 @@ package_name="${mcsmanager_download_addr##*/}" node_install_path="" # Helper Functions -usage() { +Usage() { echo "Usage: $0 [-u user] [-c command]" echo " -u Specify the user (mcsm or root), default is 'mcsm'" echo " -c Specify the command (web, daemon, or all), default is 'all'" @@ -48,36 +48,36 @@ Red_Error() { echo '=================================================' exit 1 } -echo_cyan() { +Echo_Cyan() { printf '\033[1;36m%b\033[0m\n' "$@" } -echo_red() { +Echo_Red() { printf '\033[1;31m%b\033[0m\n' "$@" } -echo_green() { +Echo_Green() { printf '\033[1;32m%b\033[0m\n' "$@" } -echo_cyan_n() { +Echo_Cyan_N() { printf '\033[1;36m%b\033[0m' "$@" } -echo_yellow() { +Echo_Yellow() { printf '\033[1;33m%b\033[0m\n' "$@" } # Check root permission -check_sudo() { +Check_Sudo() { if [ "$EUID" -ne 0 ]; then echo "This script must be run as root. Please use \"sudo or root user\" instead." exit 1 fi } -Install_dependencies() { +Install_Dependencies() { # Install related software - echo_cyan "[+] Installing dependent software (git, tar, wget)... " + Echo_Cyan "[+] Installing dependent software (git, tar, wget)... " if [[ -x "$(command -v yum)" ]]; then yum install -y git tar wget elif [[ -x "$(command -v apt-get)" ]]; then @@ -87,23 +87,23 @@ Install_dependencies() { elif [[ -x "$(command -v zypper)" ]]; then zypper --non-interactive install git tar wget else - echo_red "[!] Cannot find your package manager! You may need to install git, tar and wget manually!" + Echo_Red "[!] Cannot find your package manager! You may need to install git, tar and wget manually!" fi # Determine whether the relevant software is installed successfully if [[ -x "$(command -v git)" && -x "$(command -v tar)" && -x "$(command -v wget)" ]]; then - echo_green "Success" + Echo_Green "Success" else Red_Error "[x] Failed to find git, tar and wget, please install them manually!" fi } -Install_node() { +Install_Node() { if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then - echo_green "Desired Node.js is already installed at the target dir, bypassing installation..." + Echo_Green "Desired Node.js is already installed at the target dir, bypassing installation..." else - echo_cyan_n "[+] Install Node.js environment...\n" + Echo_Cyan_N "[+] Install Node.js environment...\n" rm -irf "$node_install_path" @@ -118,7 +118,7 @@ Install_node() { rm -rf "node-$node-linux-$arch.tar.gz" if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then - echo_green "Success" + Echo_Green "Success" else Red_Error "[x] Node installation failed!" fi @@ -126,15 +126,15 @@ Install_node() { echo - echo_yellow "=============== Node.js Version ===============" - echo_yellow " node: $("$node_install_path"/bin/node -v)" - echo_yellow " npm: v$(env "$node_install_path"/bin/node "$node_install_path"/bin/npm -v)" - echo_yellow "=============== Node.js Version ===============" + Echo_Yellow "=============== Node.js Version ===============" + Echo_Yellow " node: $("$node_install_path"/bin/node -v)" + Echo_Yellow " npm: v$(env "$node_install_path"/bin/node "$node_install_path"/bin/npm -v)" + Echo_Yellow "=============== Node.js Version ===============" echo sleep 1 } # Check and download MCSM source -Check_and_download_source() { +Check_And_Download_Source() { # Empty the temp dir if existed rm -rf "$mcsm_down_temp" mkdir -p "$mcsm_down_temp" @@ -179,13 +179,13 @@ Detect_Architecture() { } # Initialization Initialize() { - echo_cyan "+---------------------------------------------------------------------- + Echo_Cyan "+---------------------------------------------------------------------- | MCSManager V10 Installation & Upgrading Script +---------------------------------------------------------------------- " # Check sudo - check_sudo + Check_Sudo # Update architecture Detect_Architecture @@ -194,10 +194,10 @@ Initialize() { mkdir -p "$install_base" # Check dependencies - Install_dependencies + Install_Dependencies # Check and download MCSM source - Check_and_download_source + Check_And_Download_Source # Parse input arguments Parse_Arguments "$@" @@ -207,9 +207,9 @@ Initialize() { # Create the user 'mcsm' if it doesn't already exist if ! id "mcsm" &>/dev/null; then /usr/sbin/useradd mcsm - echo_green "User 'mcsm' created." + Echo_Green "User 'mcsm' created." else - echo_yellow "User 'mcsm' already exists." + Echo_Yellow "User 'mcsm' already exists." fi fi } @@ -227,7 +227,7 @@ Backup_MCSM() { # Create backup directory (/opt) if it doesn't exist if [ ! -d "$mcsm_backup_dir" ]; then - echo_yellow "Creating backup directory." + Echo_Yellow "Creating backup directory." mkdir -p "$mcsm_backup_dir" fi @@ -235,14 +235,14 @@ Backup_MCSM() { backup_path="${mcsm_backup_dir}/mcsm_backup_${current_date}.tar.gz" # Create the backup - echo_yellow "Creating backup..." + Echo_Yellow "Creating backup..." #tar -czf "$backup_path" -C "$mcsmanager_install_path" . tar -czf "$backup_path" -C "$(dirname "$mcsmanager_install_path")" "$(basename "$mcsmanager_install_path")" # Check if the backup was successful if [ $? -eq 0 ]; then - echo_green "Successfully created backup at $backup_path" + Echo_Green "Successfully created backup at $backup_path" else Red_Error "Error creating backup." fi @@ -262,7 +262,7 @@ Install_MCSM_Web_Base() { # Dependencies install cd "${web_path}" || Red_Error "[x] Failed to enter ${web_path}" # Install dependencies - echo_cyan "[+] Install MCSManager-Web dependencies..." + Echo_Cyan "[+] Install MCSManager-Web dependencies..." env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${web_path}" # Return to general dir cd "$mcsmanager_install_path" @@ -275,7 +275,7 @@ Install_MCSM_Web_Base() { } # MCSM Web Service Installation Install_Web_Systemd() { - echo_cyan "[+] Creating MCSManager Web service..." + Echo_Cyan "[+] Creating MCSManager Web service..." # stop and disable existing service systemctl disable --now mcsm-web @@ -319,7 +319,7 @@ Install_Web_Wrapper() { web_data="${web_path}/data" web_data_tmp="${mcsmanager_install_path}/web_data_${current_date}" if [ -d "$web_path" ]; then - echo_cyan "[+] Updating MCSManager Web..." + Echo_Cyan "[+] Updating MCSManager Web..." # The backup should be created already, moving the DATA dir to /opt/mcsmanager/web_data should be fast and safe. # Use web_data, do not use data as in rare circumstance user may run both update at the same time. # Use mv command, this won't create issue in case of an incomplete previous installation (e.g. empty mcsm dir) @@ -328,7 +328,7 @@ Install_Web_Wrapper() { rm -rf "$web_path" else - echo_cyan "[+] Install MCSManager Web..." + Echo_Cyan "[+] Install MCSManager Web..." fi @@ -355,7 +355,7 @@ Install_MCSM_Daemon_Base() { # Dependencies install cd "${daemon_path}" || Red_Error "[x] Failed to enter ${daemon_path}" # Install dependencies - echo_cyan "[+] Install MCSManager-Daemon dependencies..." + Echo_Cyan "[+] Install MCSManager-Daemon dependencies..." env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${daemon_path}" # Return to general dir cd "$mcsmanager_install_path" @@ -369,7 +369,7 @@ Install_MCSM_Daemon_Base() { # MCSM Daemon Service Installation Install_Daemon_Systemd() { - echo_cyan "[+] Creating MCSManager Daemon service..." + Echo_Cyan "[+] Creating MCSManager Daemon service..." # stop and disable existing service systemctl disable --now mcsm-daemon @@ -412,7 +412,7 @@ Install_Daemon_Wrapper() { daemon_data="${daemon_path}/data" daemon_data_tmp="${mcsmanager_install_path}/daemon_data_${current_date}" if [ -d "$daemon_path" ]; then - echo_cyan "[+] Updating MCSManager Daemon..." + Echo_Cyan "[+] Updating MCSManager Daemon..." # The backup should be created already, moving the DATA dir to /opt/mcsmanager/daemon_data should be fast and safe. # Use daemon_data, do not use data as in rare circumstance user may run both update at the same time. # Use mv command, this won't create issue in case of an incomplete previous installation (e.g. empty mcsm dir) @@ -421,7 +421,7 @@ Install_Daemon_Wrapper() { rm -rf "$daemon_path" else - echo_cyan "[+] Install MCSManager daemon..." + Echo_Cyan "[+] Install MCSManager daemon..." fi # Install MCSM Web @@ -439,7 +439,7 @@ Parse_Arguments() { USER="${OPTARG}" else echo "Invalid user specified." - usage + Usage fi ;; c ) @@ -447,15 +447,15 @@ Parse_Arguments() { COMMAND="${OPTARG}" else echo "Invalid command specified." - usage + Usage fi ;; \? ) - usage + Usage ;; : ) echo "Option -$OPTARG requires an argument." - usage + Usage ;; esac done @@ -498,56 +498,56 @@ Finalize() { case "$COMMAND" in all) - echo_yellow "==================================================================" - echo_green "Installation is complete! Welcome to the MCSManager V10!!!" - echo_yellow " " - echo_cyan_n "HTTP Web Service: " - echo_yellow "http://:23333 (Browser)" - echo_cyan_n "Daemon Address: " - echo_yellow "ws://:24444 (Cluster)" - echo_red "You must expose ports 23333 and 24444 to use the service properly on the Internet." - echo_yellow " " - echo_cyan "Usage:" - echo_cyan "systemctl start mcsm-{daemon,web}.service" - echo_cyan "systemctl stop mcsm-{daemon,web}.service" - echo_cyan "systemctl restart mcsm-{daemon,web}.service" - echo_yellow " " - echo_green "Official Document: https://docs.mcsmanager.com/" - echo_yellow "==================================================================" + Echo_Yellow "==================================================================" + Echo_Green "Installation is complete! Welcome to the MCSManager V10!!!" + Echo_Yellow " " + Echo_Cyan_N "HTTP Web Service: " + Echo_Yellow "http://:23333 (Browser)" + Echo_Cyan_N "Daemon Address: " + Echo_Yellow "ws://:24444 (Cluster)" + Echo_Red "You must expose ports 23333 and 24444 to use the service properly on the Internet." + Echo_Yellow " " + Echo_Cyan "Usage:" + Echo_Cyan "systemctl start mcsm-{daemon,web}.service" + Echo_Cyan "systemctl stop mcsm-{daemon,web}.service" + Echo_Cyan "systemctl restart mcsm-{daemon,web}.service" + Echo_Yellow " " + Echo_Green "Official Document: https://docs.mcsmanager.com/" + Echo_Yellow "==================================================================" ;; web) - echo_yellow "==================================================================" - echo_green "Installation is complete! Welcome to the MCSManager V10!!!" - echo_yellow " " - echo_cyan_n "HTTP Web Service: " - echo_yellow "http://:23333 (Browser)" - echo_red "You must expose port 23333 to use the service properly on the Internet." - echo_yellow " " - echo_cyan "Usage:" - echo_cyan "systemctl start mcsm-web.service" - echo_cyan "systemctl stop mcsm-web.service" - echo_cyan "systemctl restart mcsm-web.service" - echo_yellow " " - echo_green "Official Document: https://docs.mcsmanager.com/" - echo_yellow "==================================================================" + Echo_Yellow "==================================================================" + Echo_Green "Installation is complete! Welcome to the MCSManager V10!!!" + Echo_Yellow " " + Echo_Cyan_N "HTTP Web Service: " + Echo_Yellow "http://:23333 (Browser)" + Echo_Red "You must expose port 23333 to use the service properly on the Internet." + Echo_Yellow " " + Echo_Cyan "Usage:" + Echo_Cyan "systemctl start mcsm-web.service" + Echo_Cyan "systemctl stop mcsm-web.service" + Echo_Cyan "systemctl restart mcsm-web.service" + Echo_Yellow " " + Echo_Green "Official Document: https://docs.mcsmanager.com/" + Echo_Yellow "==================================================================" ;; daemon) - echo_yellow "==================================================================" - echo_green "Installation is complete! Welcome to the MCSManager V10!!!" - echo_yellow " " - echo_cyan_n "Daemon Address: " - echo_yellow "ws://:24444 (Cluster)" - echo_red "You must expose port 24444 to use the service properly on the Internet." - echo_yellow " " - echo_cyan "Usage:" - echo_cyan "systemctl start mcsm-daemon.service" - echo_cyan "systemctl stop mcsm-daemon.service" - echo_cyan "systemctl restart mcsm-daemon.service" - echo_yellow " " - echo_green "Official Document: https://docs.mcsmanager.com/" - echo_yellow "==================================================================" + Echo_Yellow "==================================================================" + Echo_Green "Installation is complete! Welcome to the MCSManager V10!!!" + Echo_Yellow " " + Echo_Cyan_N "Daemon Address: " + Echo_Yellow "ws://:24444 (Cluster)" + Echo_Red "You must expose port 24444 to use the service properly on the Internet." + Echo_Yellow " " + Echo_Cyan "Usage:" + Echo_Cyan "systemctl start mcsm-daemon.service" + Echo_Cyan "systemctl stop mcsm-daemon.service" + Echo_Cyan "systemctl restart mcsm-daemon.service" + Echo_Yellow " " + Echo_Green "Official Document: https://docs.mcsmanager.com/" + Echo_Yellow "==================================================================" ;; *) @@ -558,11 +558,11 @@ Finalize() { esac # Check if backup_path is not empty if [[ -n "$backup_path" ]]; then - echo_green "Your MCSM has been updated from a previous installation. " - echo_green "A complete backup was created at:" - echo_yellow "$backup_path" - echo_green "You can manually delete the backup using command: " - echo_red "rm ${backup_path}" + Echo_Green "Your MCSM has been updated from a previous installation. " + Echo_Green "A complete backup was created at:" + Echo_Yellow "$backup_path" + Echo_Green "You can manually delete the backup using command: " + Echo_Red "rm ${backup_path}" fi # Move quickstart.md mv "${mcsm_down_temp}/quick-start.md" "${mcsmanager_install_path}/quick-start.md" @@ -572,7 +572,7 @@ Finalize() { } ########### Main Logic ################ -main() { +Main() { # Do not create mcsmanager path yet as it will break the logic detecting existing installation Initialize "$@" # Check if the mcsmanager_install_path exists @@ -580,13 +580,13 @@ main() { # Backup first, due to potential large file being archived, backup is disabled. # Backup_MCSM # Install Node.js, this is to ensure the version is up to date. - Install_node + Install_Node else # Create mcsmanager path if not already mkdir -p "$mcsmanager_install_path" # Install Node.js, this is to ensure the version is up to date. - Install_node + Install_Node fi # Install Services based on command @@ -595,7 +595,7 @@ main() { # Print helping Information Finalize - echo_green "Installation/Upgrading Complete!" + Echo_Green "Installation/Upgrading Complete!" } -main "$@" \ No newline at end of file +Main "$@" \ No newline at end of file diff --git a/install_update_cn.sh b/install_update_cn.sh index a292ece..9d52abf 100644 --- a/install_update_cn.sh +++ b/install_update_cn.sh @@ -48,36 +48,35 @@ Red_Error() { echo '=================================================' exit 1 } -echo_cyan() { +Echo_Cyan() { printf '\033[1;36m%b\033[0m\n' "$@" } -echo_red() { +Echo_Red() { printf '\033[1;31m%b\033[0m\n' "$@" } -echo_green() { +Echo_Green() { printf '\033[1;32m%b\033[0m\n' "$@" } -echo_cyan_n() { +Echo_Cyan_N() { printf '\033[1;36m%b\033[0m' "$@" } -echo_yellow() { +Echo_Yellow() { printf '\033[1;33m%b\033[0m\n' "$@" } - # Check root permission -check_sudo() { +Check_Sudo() { if [ "$EUID" -ne 0 ]; then echo "This script must be run as root. Please use \"sudo or root user\" instead." exit 1 fi } -Install_dependencies() { +Install_Dependencies() { # Install related software - echo_cyan "[+] 正在安装依赖软件 (git, tar, wget)... " + Echo_Cyan "[+] 正在安装依赖软件 (git, tar, wget)... " if [[ -x "$(command -v yum)" ]]; then yum install -y git tar wget elif [[ -x "$(command -v apt-get)" ]]; then @@ -87,23 +86,23 @@ Install_dependencies() { elif [[ -x "$(command -v zypper)" ]]; then zypper --non-interactive install git tar wget else - echo_red "[!] Cannot find your package manager! You may need to install git, tar and wget manually!" + Echo_Red "[!] Cannot find your package manager! You may need to install git, tar and wget manually!" fi # Determine whether the relevant software is installed successfully if [[ -x "$(command -v git)" && -x "$(command -v tar)" && -x "$(command -v wget)" ]]; then - echo_green "成功!" + Echo_Green "成功!" else Red_Error "[x] Failed to find git, tar and wget, please install them manually!" fi } -Install_node() { +Install_Node() { if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then - echo_green "检测到已安装的Node.js版本, 已为您跳过安装." + Echo_Green "检测到已安装的Node.js版本, 已为您跳过安装." else - echo_cyan_n "[+] 安装 Node.js 环境中...\n" + Echo_Cyan_N "[+] 安装 Node.js 环境中...\n" rm -irf "$node_install_path" @@ -118,7 +117,7 @@ Install_node() { rm -rf "node-$node-linux-$arch.tar.gz" if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then - echo_green "Success" + Echo_Green "Success" else Red_Error "[x] Node installation failed!" fi @@ -126,15 +125,15 @@ Install_node() { echo - echo_yellow "=============== Node.js 版本 ===============" - echo_yellow " node: $("$node_install_path"/bin/node -v)" - echo_yellow " npm: v$(env "$node_install_path"/bin/node "$node_install_path"/bin/npm -v)" - echo_yellow "=============== Node.js 版本 ===============" + Echo_Yellow "=============== Node.js 版本 ===============" + Echo_Yellow " node: $("$node_install_path"/bin/node -v)" + Echo_Yellow " npm: v$(env "$node_install_path"/bin/node "$node_install_path"/bin/npm -v)" + Echo_Yellow "=============== Node.js 版本 ===============" echo sleep 1 } # Check and download MCSM source -Check_and_download_source() { +Check_And_Download_Source() { # Empty the temp dir if existed rm -rf "$mcsm_down_temp" mkdir -p "$mcsm_down_temp" @@ -179,12 +178,12 @@ Detect_Architecture() { } # Initialization Initialize() { - echo_cyan "+---------------------------------------------------------------------- + Echo_Cyan "+---------------------------------------------------------------------- | MCSManager V10安装升级脚本 +---------------------------------------------------------------------- " # Check sudo - check_sudo + Check_Sudo # Update architecture Detect_Architecture @@ -193,10 +192,10 @@ Initialize() { mkdir -p "$install_base" # Check dependencies - Install_dependencies + Install_Dependencies # Check and download MCSM source - Check_and_download_source + Check_And_Download_Source # Parse input arguments Parse_Arguments "$@" @@ -206,9 +205,9 @@ Initialize() { # Create the user 'mcsm' if it doesn't already exist if ! id "mcsm" &>/dev/null; then /usr/sbin/useradd mcsm - echo_green "用户 'mcsm' 已创建." + Echo_Green "用户 'mcsm' 已创建." else - echo_yellow "用户 'mcsm' 已经存在." + Echo_Yellow "用户 'mcsm' 已经存在." fi fi } @@ -226,7 +225,7 @@ Backup_MCSM() { # Create backup directory (/opt) if it doesn't exist if [ ! -d "$mcsm_backup_dir" ]; then - echo_yellow "正在创建备份目录..." + Echo_Yellow "正在创建备份目录..." mkdir -p "$mcsm_backup_dir" fi @@ -234,14 +233,14 @@ Backup_MCSM() { backup_path="${mcsm_backup_dir}/mcsm_backup_${current_date}.tar.gz" # Create the backup - echo_yellow "正在创建备份..." + Echo_Yellow "正在创建备份..." #tar -czf "$backup_path" -C "$mcsmanager_install_path" . tar -czf "$backup_path" -C "$(dirname "$mcsmanager_install_path")" "$(basename "$mcsmanager_install_path")" # Check if the backup was successful if [ $? -eq 0 ]; then - echo_green "成功创建了备份,位于: $backup_path" + Echo_Green "成功创建了备份,位于: $backup_path" else Red_Error "创建备份时出错" fi @@ -261,7 +260,7 @@ Install_MCSM_Web_Base() { # Dependencies install cd "${web_path}" || Red_Error "[x] Failed to enter ${web_path}" # Install dependencies - echo_cyan "[+] 安装 MCSManager 网页 依赖中..." + Echo_Cyan "[+] 安装 MCSManager 网页 依赖中..." env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] 在 ${web_path} 安装依赖时出错." # Return to general dir cd "$mcsmanager_install_path" @@ -274,7 +273,7 @@ Install_MCSM_Web_Base() { } # MCSM Web Service Installation Install_Web_Systemd() { - echo_cyan "[+] 创建 MCSManager 网页服务中..." + Echo_Cyan "[+] 创建 MCSManager 网页服务中..." # stop and disable existing service systemctl disable --now mcsm-web @@ -318,7 +317,7 @@ Install_Web_Wrapper() { web_data="${web_path}/data" web_data_tmp="${mcsmanager_install_path}/web_data_${current_date}" if [ -d "$web_path" ]; then - echo_cyan "[+] 升级 MCSManager 网页端中..." + Echo_Cyan "[+] 升级 MCSManager 网页端中..." # The backup should be created already, moving the DATA dir to /opt/mcsmanager/web_data should be fast and safe. # Use web_data, do not use data as in rare circumstance user may run both update at the same time. # Use mv command, this won't create issue in case of an incomplete previous installation (e.g. empty mcsm dir) @@ -327,7 +326,7 @@ Install_Web_Wrapper() { rm -rf "$web_path" else - echo_cyan "[+] 安装 MCSManager 网页端中..." + Echo_Cyan "[+] 安装 MCSManager 网页端中..." fi @@ -354,7 +353,7 @@ Install_MCSM_Daemon_Base() { # Dependencies install cd "${daemon_path}" || Red_Error "[x] Failed to enter ${daemon_path}" # Install dependencies - echo_cyan "[+] 安装 MCSManager 节点依赖中..." + Echo_Cyan "[+] 安装 MCSManager 节点依赖中..." env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${daemon_path}" # Return to general dir cd "$mcsmanager_install_path" @@ -368,7 +367,7 @@ Install_MCSM_Daemon_Base() { # MCSM Daemon Service Installation Install_Daemon_Systemd() { - echo_cyan "[+] 创建 MCSManager 节点服务中..." + Echo_Cyan "[+] 创建 MCSManager 节点服务中..." # stop and disable existing service systemctl disable --now mcsm-daemon @@ -411,7 +410,7 @@ Install_Daemon_Wrapper() { daemon_data="${daemon_path}/data" daemon_data_tmp="${mcsmanager_install_path}/daemon_data_${current_date}" if [ -d "$daemon_path" ]; then - echo_cyan "[+] 升级 MCSManager 节点中..." + Echo_Cyan "[+] 升级 MCSManager 节点中..." # The backup should be created already, moving the DATA dir to /opt/mcsmanager/daemon_data should be fast and safe. # Use daemon_data, do not use data as in rare circumstance user may run both update at the same time. # Use mv command, this won't create issue in case of an incomplete previous installation (e.g. empty mcsm dir) @@ -420,7 +419,7 @@ Install_Daemon_Wrapper() { rm -rf "$daemon_path" else - echo_cyan "[+] 安装 MCSManager 节点中..." + Echo_Cyan "[+] 安装 MCSManager 节点中..." fi # Install MCSM Web @@ -497,56 +496,56 @@ Finalize() { case "$COMMAND" in all) - echo_yellow "==================================================================" - echo_green "安装已完成! 欢迎使用 MCSManager V10!!!" - echo_yellow " " - echo_cyan_n "网页 服务: " - echo_yellow "http://<您的 IP>:23333 (Browser)" - echo_cyan_n "节点 地址: " - echo_yellow "ws://<您的 IP>:24444 (Cluster)" - echo_red "您必须开放 23333 与 24444 端口才可以正常从公网访问" - echo_yellow " " - echo_cyan "使用方法:" - echo_cyan "启动: systemctl start mcsm-{daemon,web}.service" - echo_cyan "关闭: systemctl stop mcsm-{daemon,web}.service" - echo_cyan "重启: systemctl restart mcsm-{daemon,web}.service" - echo_yellow " " - echo_green "官方文档: https://docs.mcsmanager.com/" - echo_yellow "==================================================================" + Echo_Yellow "==================================================================" + Echo_Green "安装已完成! 欢迎使用 MCSManager V10!!!" + Echo_Yellow " " + Echo_Cyan_N "网页 服务: " + Echo_Yellow "http://<您的 IP>:23333 (Browser)" + Echo_Cyan_N "节点 地址: " + Echo_Yellow "ws://<您的 IP>:24444 (Cluster)" + Echo_Red "您必须开放 23333 与 24444 端口才可以正常从公网访问" + Echo_Yellow " " + Echo_Cyan "使用方法:" + Echo_Cyan "启动: systemctl start mcsm-{daemon,web}.service" + Echo_Cyan "关闭: systemctl stop mcsm-{daemon,web}.service" + Echo_Cyan "重启: systemctl restart mcsm-{daemon,web}.service" + Echo_Yellow " " + Echo_Green "官方文档: https://docs.mcsmanager.com/" + Echo_Yellow "==================================================================" ;; web) - echo_yellow "==================================================================" - echo_green "安装已完成! 欢迎使用 MCSManager V10!!!" - echo_yellow " " - echo_cyan_n "网页 服务: " - echo_yellow "http://<您的 IP>:23333 (Browser)" - echo_red "您必须开放 23333 端口才可以正常从公网访问" - echo_yellow " " - echo_cyan "使用方法:" - echo_cyan "启动: systemctl start mcsm-{daemon,web}.service" - echo_cyan "关闭: systemctl stop mcsm-{daemon,web}.service" - echo_cyan "重启: systemctl restart mcsm-{daemon,web}.service" - echo_yellow " " - echo_green "官方文档: https://docs.mcsmanager.com/" - echo_yellow "==================================================================" + Echo_Yellow "==================================================================" + Echo_Green "安装已完成! 欢迎使用 MCSManager V10!!!" + Echo_Yellow " " + Echo_Cyan_N "网页 服务: " + Echo_Yellow "http://<您的 IP>:23333 (Browser)" + Echo_Red "您必须开放 23333 端口才可以正常从公网访问" + Echo_Yellow " " + Echo_Cyan "使用方法:" + Echo_Cyan "启动: systemctl start mcsm-{daemon,web}.service" + Echo_Cyan "关闭: systemctl stop mcsm-{daemon,web}.service" + Echo_Cyan "重启: systemctl restart mcsm-{daemon,web}.service" + Echo_Yellow " " + Echo_Green "官方文档: https://docs.mcsmanager.com/" + Echo_Yellow "==================================================================" ;; daemon) - echo_yellow "==================================================================" - echo_green "安装已完成! 欢迎使用 MCSManager V10!!!" - echo_yellow " " - echo_cyan_n "节点 地址: " - echo_yellow "ws://<您的 IP>:24444 (Cluster)" - echo_red "您必须开放 24444 端口才可以正常从公网访问" - echo_yellow " " - echo_cyan "使用方法:" - echo_cyan "启动: systemctl start mcsm-{daemon,web}.service" - echo_cyan "关闭: systemctl stop mcsm-{daemon,web}.service" - echo_cyan "重启: systemctl restart mcsm-{daemon,web}.service" - echo_yellow " " - echo_green "官方文档: https://docs.mcsmanager.com/" - echo_yellow "==================================================================" + Echo_Yellow "==================================================================" + Echo_Green "安装已完成! 欢迎使用 MCSManager V10!!!" + Echo_Yellow " " + Echo_Cyan_N "节点 地址: " + Echo_Yellow "ws://<您的 IP>:24444 (Cluster)" + Echo_Red "您必须开放 24444 端口才可以正常从公网访问" + Echo_Yellow " " + Echo_Cyan "使用方法:" + Echo_Cyan "启动: systemctl start mcsm-{daemon,web}.service" + Echo_Cyan "关闭: systemctl stop mcsm-{daemon,web}.service" + Echo_Cyan "重启: systemctl restart mcsm-{daemon,web}.service" + Echo_Yellow " " + Echo_Green "官方文档: https://docs.mcsmanager.com/" + Echo_Yellow "==================================================================" ;; *) @@ -557,11 +556,11 @@ Finalize() { esac # Check if backup_path is not empty if [[ -n "$backup_path" ]]; then - echo_green "您的MCSManager是由一个已存在的版本升级而来. " - echo_green "我们已经为您创建了一个备份, 位于:" - echo_yellow "$backup_path" - echo_green "如果需要, 您可以使用下列命令手动删除备份: " - echo_red "rm ${backup_path}" + Echo_Green "您的MCSManager是由一个已存在的版本升级而来. " + Echo_Green "我们已经为您创建了一个备份, 位于:" + Echo_Yellow "$backup_path" + Echo_Green "如果需要, 您可以使用下列命令手动删除备份: " + Echo_Red "rm ${backup_path}" fi # Move quickstart.md mv "${mcsm_down_temp}/quick-start.md" "${mcsmanager_install_path}/quick-start.md" @@ -571,7 +570,7 @@ Finalize() { } ########### Main Logic ################ -main() { +Main() { # Do not create mcsmanager path yet as it will break the logic detecting existing installation Initialize "$@" # Check if the mcsmanager_install_path exists @@ -579,13 +578,13 @@ main() { # Backup first, due to potential large file being archived, backup is disabled. # Backup_MCSM # Install Node.js, this is to ensure the version is up to date. - Install_node + Install_Node else # Create mcsmanager path if not already mkdir -p "$mcsmanager_install_path" # Install Node.js, this is to ensure the version is up to date. - Install_node + Install_Node fi # Install Services based on command @@ -594,7 +593,7 @@ main() { # Print helping Information Finalize - echo_green "安装或升级已完成!" + Echo_Green "安装或升级已完成!" } -main "$@" \ No newline at end of file +Main "$@" \ No newline at end of file From 31e8c0cb343ecde83d9cbbe9720931bb8efc76a2 Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Thu, 9 May 2024 22:18:00 +0800 Subject: [PATCH 075/338] update cn text - minor fixes --- install_update_cn.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install_update_cn.sh b/install_update_cn.sh index 9d52abf..8a95698 100644 --- a/install_update_cn.sh +++ b/install_update_cn.sh @@ -179,7 +179,7 @@ Detect_Architecture() { # Initialization Initialize() { Echo_Cyan "+---------------------------------------------------------------------- -| MCSManager V10安装升级脚本 +| MCSManager V10 安装升级脚本 +---------------------------------------------------------------------- " # Check sudo @@ -260,7 +260,7 @@ Install_MCSM_Web_Base() { # Dependencies install cd "${web_path}" || Red_Error "[x] Failed to enter ${web_path}" # Install dependencies - Echo_Cyan "[+] 安装 MCSManager 网页 依赖中..." + Echo_Cyan "[+] 安装 MCSManager 网页依赖中..." env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] 在 ${web_path} 安装依赖时出错." # Return to general dir cd "$mcsmanager_install_path" From e728511bf271954138b9139f76e627b6f9bfbe9e Mon Sep 17 00:00:00 2001 From: Unitwk Date: Mon, 13 May 2024 11:33:13 +0800 Subject: [PATCH 076/338] Feat: change download addr --- setup.sh | 4 ++-- setup_cn.sh | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/setup.sh b/setup.sh index 87714b5..b5f3d14 100644 --- a/setup.sh +++ b/setup.sh @@ -1,8 +1,8 @@ #!/bin/bash mcsmanager_install_path="/opt/mcsmanager" -mcsmanager_download_addr="http://oss.duzuii.com/d/MCSManager/MCSManager/MCSManager-v10-linux.tar.gz" -package_name="MCSManager-v10-linux.tar.gz" +mcsmanager_download_addr="https://github.com/MCSManager/MCSManager/releases/download/v10.2.1/mcsmanager_linux_release.tar.gz" +package_name="mcsmanager_linux_release.tar.gz" node="v20.12.2" arch=$(uname -m) diff --git a/setup_cn.sh b/setup_cn.sh index 8af40ec..a8d6909 100755 --- a/setup_cn.sh +++ b/setup_cn.sh @@ -1,8 +1,9 @@ #!/bin/bash +# 中国大陆需要安装脚本额外配置镜像地址以及低版本的 NodeJS 环境 mcsmanager_install_path="/opt/mcsmanager" mcsmanager_download_addr="http://oss.duzuii.com/d/MCSManager/MCSManager/MCSManager-v10-linux.tar.gz" -package_name="MCSManager-v10-linux.tar.gz" +package_name="mcsmanager_linux_release.tar.gz" node="v16.20.2" arch=$(uname -m) From 4d5afab43a732c7a49f4d345b57b254e1058ab6a Mon Sep 17 00:00:00 2001 From: Unitwk Date: Mon, 13 May 2024 11:41:58 +0800 Subject: [PATCH 077/338] Fix: package_name --- setup_cn.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup_cn.sh b/setup_cn.sh index a8d6909..2eb4b2c 100755 --- a/setup_cn.sh +++ b/setup_cn.sh @@ -3,7 +3,7 @@ # 中国大陆需要安装脚本额外配置镜像地址以及低版本的 NodeJS 环境 mcsmanager_install_path="/opt/mcsmanager" mcsmanager_download_addr="http://oss.duzuii.com/d/MCSManager/MCSManager/MCSManager-v10-linux.tar.gz" -package_name="mcsmanager_linux_release.tar.gz" +package_name="MCSManager-v10-linux.tar.gz" node="v16.20.2" arch=$(uname -m) From eef9072bb6296afa9010b5602779d4281b1cd9c7 Mon Sep 17 00:00:00 2001 From: Unitwk Date: Mon, 13 May 2024 11:52:34 +0800 Subject: [PATCH 078/338] Feat: add forge pack --- templates.json | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/templates.json b/templates.json index 5529dae..7e98abd 100644 --- a/templates.json +++ b/templates.json @@ -13,7 +13,7 @@ "packages": [ { "language": "en_us", - "description": "[Paper] Recommendation for friends with multiple players, Fast setup.", + "description": "[Paper] Low hardware configuration machine use, Fast setup.", "title": "Minecraft 1.20.4 Java", "runtime": "Java 17+", "hardware": "RAM 6G+", @@ -49,6 +49,25 @@ "oe": "utf-8" } }, + { + "language": "en_us", + "description": "Forge-1.20.1-47.2.32-installer.jar", + "title": "Forge 1.20.1 (Support Mods)", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.1-47.2.32/forge-1.20.1-47.2.32-installer.jar", + "author": "minecraftforge.net", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.20.1-47.2.32-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "language": "en_us", "description": "Forge-1.19.2-43.3.13-installer.jar", @@ -125,6 +144,25 @@ "oe": "utf-8" } }, + { + "language": "zh_cn", + "description": "[Forge] forge-1.20.1-47.2.32-installer.jar,来自官方网站源,需要高配机器支撑,支持插件和模组。", + "title": "Forge 1.20.1 Java 版 (支持模组)", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.1-47.2.32/forge-1.20.1-47.2.32-installer.jar", + "author": "minecraftforge.net", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.20.1-47.2.32-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "language": "zh_cn", "description": "[Forge] forge-1.20.6-50.0.8-installer.jar,来自官方网站源,需要高配机器支撑。", From 2a89f337c13979ce14ab8e29514334c74e999491 Mon Sep 17 00:00:00 2001 From: Unitwk Date: Tue, 4 Jun 2024 17:32:40 +0800 Subject: [PATCH 079/338] Fix: start cmd for windows --- templates.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/templates.json b/templates.json index 7e98abd..46fe552 100644 --- a/templates.json +++ b/templates.json @@ -42,7 +42,7 @@ "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", - "startCommand": "sh ./run.sh", + "startCommand": "java -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar server.jar nogui", "stopCommand": "stop", "updateCommand": "java -jar forge-1.20.6-50.0.8-installer.jar --installServer", "ie": "utf-8", @@ -61,7 +61,7 @@ "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", - "startCommand": "sh ./run.sh", + "startCommand": "java -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar server.jar nogui", "stopCommand": "stop", "updateCommand": "java -jar forge-1.20.1-47.2.32-installer.jar --installServer", "ie": "utf-8", @@ -80,7 +80,7 @@ "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", - "startCommand": "sh ./run.sh", + "startCommand": "java -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar server.jar nogui", "stopCommand": "stop", "updateCommand": "java -jar forge-1.19.2-43.3.13-installer.jar --installServer", "ie": "utf-8", @@ -156,7 +156,7 @@ "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", - "startCommand": "sh ./run.sh", + "startCommand": "java -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar server.jar nogui", "stopCommand": "stop", "updateCommand": "java -jar forge-1.20.1-47.2.32-installer.jar --installServer", "ie": "utf-8", @@ -175,7 +175,7 @@ "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", - "startCommand": "sh ./run.sh", + "startCommand": "java -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar server.jar nogui", "stopCommand": "stop", "updateCommand": "java -jar forge-1.20.6-50.0.8-installer.jar --installServer", "ie": "utf-8", @@ -194,7 +194,7 @@ "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", - "startCommand": "sh ./run.sh", + "startCommand": "java -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar server.jar nogui", "stopCommand": "stop", "updateCommand": "java -jar forge-1.19.2-43.3.13-installer.jar --installServer", "ie": "utf-8", From c5a741e4b1a91baf44279e6a6168426a77f158ce Mon Sep 17 00:00:00 2001 From: Unitwk Date: Tue, 4 Jun 2024 19:28:14 +0800 Subject: [PATCH 080/338] Fix: start cmd --- templates.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/templates.json b/templates.json index 46fe552..7e98abd 100644 --- a/templates.json +++ b/templates.json @@ -42,7 +42,7 @@ "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", - "startCommand": "java -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar server.jar nogui", + "startCommand": "sh ./run.sh", "stopCommand": "stop", "updateCommand": "java -jar forge-1.20.6-50.0.8-installer.jar --installServer", "ie": "utf-8", @@ -61,7 +61,7 @@ "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", - "startCommand": "java -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar server.jar nogui", + "startCommand": "sh ./run.sh", "stopCommand": "stop", "updateCommand": "java -jar forge-1.20.1-47.2.32-installer.jar --installServer", "ie": "utf-8", @@ -80,7 +80,7 @@ "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", - "startCommand": "java -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar server.jar nogui", + "startCommand": "sh ./run.sh", "stopCommand": "stop", "updateCommand": "java -jar forge-1.19.2-43.3.13-installer.jar --installServer", "ie": "utf-8", @@ -156,7 +156,7 @@ "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", - "startCommand": "java -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar server.jar nogui", + "startCommand": "sh ./run.sh", "stopCommand": "stop", "updateCommand": "java -jar forge-1.20.1-47.2.32-installer.jar --installServer", "ie": "utf-8", @@ -175,7 +175,7 @@ "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", - "startCommand": "java -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar server.jar nogui", + "startCommand": "sh ./run.sh", "stopCommand": "stop", "updateCommand": "java -jar forge-1.20.6-50.0.8-installer.jar --installServer", "ie": "utf-8", @@ -194,7 +194,7 @@ "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", - "startCommand": "java -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar server.jar nogui", + "startCommand": "sh ./run.sh", "stopCommand": "stop", "updateCommand": "java -jar forge-1.19.2-43.3.13-installer.jar --installServer", "ie": "utf-8", From 26db620de0324e04e5d743eb74af9c139fb93edb Mon Sep 17 00:00:00 2001 From: Unitwk Date: Tue, 4 Jun 2024 19:35:14 +0800 Subject: [PATCH 081/338] feat: windows tip --- templates.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/templates.json b/templates.json index 7e98abd..2763b7f 100644 --- a/templates.json +++ b/templates.json @@ -32,7 +32,7 @@ }, { "language": "en_us", - "description": "Forge-1.20.6-50.0.8-installer.jar", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"start.bat\" after installation.", "title": "Forge 1.20.6 (Support Mods)", "runtime": "Java 21+", "hardware": "RAM 8G+", @@ -51,7 +51,7 @@ }, { "language": "en_us", - "description": "Forge-1.20.1-47.2.32-installer.jar", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"start.bat\" after installation.", "title": "Forge 1.20.1 (Support Mods)", "runtime": "Java 21+", "hardware": "RAM 8G+", @@ -70,7 +70,7 @@ }, { "language": "en_us", - "description": "Forge-1.19.2-43.3.13-installer.jar", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"start.bat\" after installation.", "title": "Forge 1.19.2 (Support Mods)", "runtime": "Java 17+", "hardware": "RAM 8G+", @@ -146,7 +146,7 @@ }, { "language": "zh_cn", - "description": "[Forge] forge-1.20.1-47.2.32-installer.jar,来自官方网站源,需要高配机器支撑,支持插件和模组。", + "description": "注意:默认的启动命令是 \"sh ./run.sh\",如果需要在 Windows 上运行,请在安装后将命令修改为 \"start.bat\"", "title": "Forge 1.20.1 Java 版 (支持模组)", "runtime": "Java 21+", "hardware": "RAM 8G+", @@ -165,7 +165,7 @@ }, { "language": "zh_cn", - "description": "[Forge] forge-1.20.6-50.0.8-installer.jar,来自官方网站源,需要高配机器支撑。", + "description": "注意:默认的启动命令是 \"sh ./run.sh\",如果需要在 Windows 上运行,请在安装后将命令修改为 \"start.bat\"", "title": "Forge 1.20.6 Java 版 (支持模组)", "runtime": "Java 21+", "hardware": "RAM 8G+", @@ -184,7 +184,7 @@ }, { "language": "zh_cn", - "description": "[Forge] Forge-1.19.2-43.3.13,支持安装 MOD,需要高配机器支撑。", + "description": "注意:默认的启动命令是 \"sh ./run.sh\",如果需要在 Windows 上运行,请在安装后将命令修改为 \"start.bat\"", "title": "Forge 1.19.2 Java 版 (支持模组)", "runtime": "Java 17+", "hardware": "RAM 8G+", From 309c1e5195607a975e0929d0cea9890d4a1da99c Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Tue, 4 Jun 2024 21:28:36 +0800 Subject: [PATCH 082/338] explicitly set ownership to root with -u root --- install_update.sh | 6 ++++++ install_update_cn.sh | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/install_update.sh b/install_update.sh index 5ffff6f..f9782a9 100644 --- a/install_update.sh +++ b/install_update.sh @@ -270,6 +270,9 @@ Install_MCSM_Web_Base() { if [[ "$USER" == *"mcsm"* ]]; then # Change file permission to mcsm user chown -R mcsm:mcsm "$web_path" + else + # Change file permission to root user + chown -R root:root "$web_path" fi chmod -R 755 "$web_path" } @@ -363,6 +366,9 @@ Install_MCSM_Daemon_Base() { if [[ "$USER" == *"mcsm"* ]]; then # Change file permission to mcsm user chown -R mcsm:mcsm "$daemon_path" + else + # Change file permission to root user + chown -R root:root "$daemon_path" fi chmod -R 755 "$daemon_path" } diff --git a/install_update_cn.sh b/install_update_cn.sh index 8a95698..81cdc46 100644 --- a/install_update_cn.sh +++ b/install_update_cn.sh @@ -268,6 +268,9 @@ Install_MCSM_Web_Base() { if [[ "$USER" == *"mcsm"* ]]; then # Change file permission to mcsm user chown -R mcsm:mcsm "$web_path" + else + # Change file permission to root user + chown -R root:root "$web_path" fi chmod -R 755 "$web_path" } @@ -361,6 +364,9 @@ Install_MCSM_Daemon_Base() { if [[ "$USER" == *"mcsm"* ]]; then # Change file permission to mcsm user chown -R mcsm:mcsm "$daemon_path" + else + # Change file permission to root user + chown -R root:root "$daemon_path" fi chmod -R 755 "$daemon_path" } From 826227d001e6c573b0e1a711af0d2e5fa7b7af88 Mon Sep 17 00:00:00 2001 From: unknown <78304455+KevinLu2000@users.noreply.github.com> Date: Tue, 4 Jun 2024 21:33:44 +0800 Subject: [PATCH 083/338] we no longer move quick-start.md --- install_update.sh | 2 +- install_update_cn.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/install_update.sh b/install_update.sh index f9782a9..c7986f7 100644 --- a/install_update.sh +++ b/install_update.sh @@ -571,7 +571,7 @@ Finalize() { Echo_Red "rm ${backup_path}" fi # Move quickstart.md - mv "${mcsm_down_temp}/quick-start.md" "${mcsmanager_install_path}/quick-start.md" + # mv "${mcsm_down_temp}/quick-start.md" "${mcsmanager_install_path}/quick-start.md" # Remove the temp folder rm -rf "${mcsm_down_temp}" diff --git a/install_update_cn.sh b/install_update_cn.sh index 81cdc46..3da4b81 100644 --- a/install_update_cn.sh +++ b/install_update_cn.sh @@ -569,7 +569,7 @@ Finalize() { Echo_Red "rm ${backup_path}" fi # Move quickstart.md - mv "${mcsm_down_temp}/quick-start.md" "${mcsmanager_install_path}/quick-start.md" + # mv "${mcsm_down_temp}/quick-start.md" "${mcsmanager_install_path}/quick-start.md" # Remove the temp folder rm -rf "${mcsm_down_temp}" From 8d9c710d3f030ebb7ffffd339a1ba9a1333620a3 Mon Sep 17 00:00:00 2001 From: Unitwk Date: Tue, 6 Aug 2024 10:51:08 +0800 Subject: [PATCH 084/338] Fix: registry.npmmirror.com NodeJS --- setup_cn.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setup_cn.sh b/setup_cn.sh index 2eb4b2c..8f70160 100755 --- a/setup_cn.sh +++ b/setup_cn.sh @@ -55,7 +55,11 @@ Install_Node() { rm -rf "node-$node-linux-$arch.tar.gz" - wget "https://nodejs.org/dist/$node/node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to download node release" + # From https://nodejs.org/ + # wget "https://nodejs.org/dist/$node/node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to download node release" + + # From https://registry.npmmirror.com/ + wget "https://registry.npmmirror.com/-/binary/node/$node/node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to download node release" tar -zxf "node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to untar node" From 46760103c15a31b403997add2c525e8ca5654ea1 Mon Sep 17 00:00:00 2001 From: Unitwk Date: Mon, 12 Aug 2024 17:14:30 +0800 Subject: [PATCH 085/338] Update setup_cn.sh --- setup_cn.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup_cn.sh b/setup_cn.sh index 8f70160..184639c 100755 --- a/setup_cn.sh +++ b/setup_cn.sh @@ -2,7 +2,7 @@ # 中国大陆需要安装脚本额外配置镜像地址以及低版本的 NodeJS 环境 mcsmanager_install_path="/opt/mcsmanager" -mcsmanager_download_addr="http://oss.duzuii.com/d/MCSManager/MCSManager/MCSManager-v10-linux.tar.gz" +mcsmanager_download_addr="https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/mcsmanager_linux_release.tar.gz" package_name="MCSManager-v10-linux.tar.gz" node="v16.20.2" arch=$(uname -m) From 09c74ead242e9998e79c609c5fcc6211825adc5f Mon Sep 17 00:00:00 2001 From: Unitwk Date: Mon, 12 Aug 2024 19:18:15 +0800 Subject: [PATCH 086/338] Fix: packname --- setup_cn.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup_cn.sh b/setup_cn.sh index 184639c..047cf1d 100755 --- a/setup_cn.sh +++ b/setup_cn.sh @@ -3,7 +3,7 @@ # 中国大陆需要安装脚本额外配置镜像地址以及低版本的 NodeJS 环境 mcsmanager_install_path="/opt/mcsmanager" mcsmanager_download_addr="https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/mcsmanager_linux_release.tar.gz" -package_name="MCSManager-v10-linux.tar.gz" +package_name="mcsmanager_linux_release.tar.gz" node="v16.20.2" arch=$(uname -m) From b2a67fa4949b9e3bdcc9fd061156ad96ad492826 Mon Sep 17 00:00:00 2001 From: Unitwk Date: Mon, 12 Aug 2024 19:21:36 +0800 Subject: [PATCH 087/338] Fix: download addr --- setup_cn.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup_cn.sh b/setup_cn.sh index 047cf1d..8605e12 100755 --- a/setup_cn.sh +++ b/setup_cn.sh @@ -2,7 +2,7 @@ # 中国大陆需要安装脚本额外配置镜像地址以及低版本的 NodeJS 环境 mcsmanager_install_path="/opt/mcsmanager" -mcsmanager_download_addr="https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/mcsmanager_linux_release.tar.gz" +mcsmanager_download_addr="https://cloud.alongw.cn/f/ZMqsl/mcsmanager_linux_release.tar.gz" package_name="mcsmanager_linux_release.tar.gz" node="v16.20.2" arch=$(uname -m) From 343da18c4cf943a7537d787563a08a7ac42582da Mon Sep 17 00:00:00 2001 From: Unitwk Date: Wed, 14 Aug 2024 16:16:06 +0800 Subject: [PATCH 088/338] Fix: : rm http://oss.duzuii.com/ --- templates.json | 152 ------------------------------------------------- 1 file changed, 152 deletions(-) diff --git a/templates.json b/templates.json index 2763b7f..5d480b1 100644 --- a/templates.json +++ b/templates.json @@ -11,25 +11,6 @@ } ], "packages": [ - { - "language": "en_us", - "description": "[Paper] Low hardware configuration machine use, Fast setup.", - "title": "Minecraft 1.20.4 Java", - "runtime": "Java 17+", - "hardware": "RAM 6G+", - "size": "140MB", - "remark": "Paper Software", - "targetLink": "http://oss.duzuii.com/d/MCSManager/Minecraft-Server-Software/Global-Paper-1.20.4.zip", - "author": "mcsmanager.com", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "java -jar server.jar -nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"start.bat\" after installation.", @@ -87,44 +68,6 @@ "oe": "utf-8" } }, - { - "language": "en_us", - "description": "[Paper] Recommendation for friends with multiple players", - "title": "Minecraft 1.19.2 Java", - "runtime": "Java 17+", - "hardware": "RAM 8G+", - "size": "140MB", - "remark": "Paper Software", - "targetLink": "http://oss.duzuii.com/d/MCSManager/Minecraft-Server-Software/Global-Paper-1.19.2.zip", - "author": "mcsmanager.com", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "java -jar server.jar -nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "description": "[Paper] Recommendation for friends with multiple players", - "title": "Minecraft 1.18.2 Java", - "runtime": "Java 17+", - "hardware": "RAM 8G+", - "size": "140MB", - "remark": "Paper Software", - "targetLink": "http://oss.duzuii.com/d/MCSManager/Minecraft-Server-Software/Global-Paper-1.18.2.zip", - "author": "mcsmanager.com", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "java -jar server.jar -nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, { "language": "zh_cn", "description": "[Paper] 中小型互通服推荐,1.20.4 版本,快速开服,包含ESS、锁箱子、操作回滚、领地商店等基础插件。", @@ -200,101 +143,6 @@ "ie": "utf-8", "oe": "utf-8" } - }, - { - "language": "zh_cn", - "description": "[原版生存] 朋友联机推荐,1.19.2 版本,快速开服,享受原汁原味的极致生存与探索。", - "title": "Minecraft 1.19.2 Java 原版", - "runtime": "Java 17+", - "hardware": "RAM 8G+", - "size": "140MB", - "remark": "支持插件,最低 8GB 内存要求", - "targetLink": "http://oss.duzuii.com/d/MCSManager/Minecraft-Server-Software/paper-1.19.2.zip", - "author": "mcsmanager.com", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "java -jar server.jar -nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "zh_cn", - "description": "[原版生存] 朋友联机推荐,让你和你的小伙伴一起享受原汁原味的极致生存。", - "title": "Minecraft 1.19.1 Java 原版", - "runtime": "Java 17+", - "hardware": "RAM 8G+", - "size": "140MB", - "remark": "支持插件,最低 4GB 内存要求", - "targetLink": "http://oss.duzuii.com/d/MCSManager/Minecraft-Server-Software/paper-1.19.1.zip", - "author": "mcsmanager.com", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "java -jar server.jar -nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "zh_cn", - "description": "[原版生存] 适合朋友联机,“荒野更新”(The Wild)旨在为玩家带来现有生物群系的改进和优化。", - "title": "Minecraft 1.19 Java 原版", - "runtime": "Java 17+", - "hardware": "RAM 8G+", - "size": "140MB", - "remark": "支持插件,最低 4GB 内存要求", - "targetLink": "http://oss.duzuii.com/d/MCSManager/Minecraft-Server-Software/paper-1.19.zip", - "author": "mcsmanager.com", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "java -jar server.jar -nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "zh_cn", - "description": "[原版生存] 适合朋友联机推荐,继承上版本的功能并进行了一系列的优化,主流联机版本,插件与MOD较为丰富。", - "title": "Minecraft 1.18.2 Java 原版", - "runtime": "Java 17+", - "hardware": "RAM 8G+", - "size": "140MB", - "remark": "支持插件,最低 4GB 内存要求", - "targetLink": "http://oss.duzuii.com/d/MCSManager/Minecraft-Server-Software/paper-1.18.2.zip", - "author": "mcsmanager.com", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "java -jar server.jar -nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "zh_cn", - "description": "[原版生存] 适合朋友联机,快速开服,服务器搭建,回味老版本的地穴探索。", - "title": "Minecraft 17.1 Java 原版", - "runtime": "Java 17+", - "hardware": "RAM 8G+", - "size": "160MB", - "remark": "支持插件,最低 4GB 内存要求", - "targetLink": "http://oss.duzuii.com/d/MCSManager/Minecraft-Server-Software/paper-1.17.1.zip", - "author": "mcsmanager.com", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "java -jar server.jar -nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } } ] } From 6deea374a24f3212aafd8dccaf7b6e48da87145b Mon Sep 17 00:00:00 2001 From: Unitwk Date: Thu, 15 Aug 2024 10:29:56 +0800 Subject: [PATCH 089/338] Feat: add pack --- templates.json | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/templates.json b/templates.json index 5d480b1..7916d1f 100644 --- a/templates.json +++ b/templates.json @@ -11,6 +11,44 @@ } ], "packages": [ + { + "language": "en_us", + "description": "[Paper] Minecraft 1.20.2 Paper", + "title": "Minecraft 1.20.2", + "runtime": "Java 22", + "hardware": "RAM 4G+", + "size": "150MB", + "remark": "Includes some basic plugins", + "targetLink": "https://cloud.alongw.cn/f/5XlSW/Paper-1.21.1.zip", + "author": "alongw.cn", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar server.jar -nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Paper] Minecraft 1.20.1 Paper", + "title": "Minecraft 1.20.1", + "runtime": "Java 22", + "hardware": "RAM 4G+", + "size": "200MB", + "remark": "Includes some basic plugins", + "targetLink": "https://cloud.alongw.cn/f/jwjsl/Paper-1.20.1-EN.zip", + "author": "alongw.cn", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar server.jar -nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"start.bat\" after installation.", @@ -68,6 +106,26 @@ "oe": "utf-8" } }, + + { + "language": "zh_cn", + "description": "[Paper] Minecraft 1.21.1 快速开服", + "title": "Minecraft 1.20.1", + "runtime": "Java 22", + "hardware": "RAM 4G+", + "size": "250MB", + "remark": "包含基础插件,萌新快速开服!低配机器专属!", + "targetLink": "https://cloud.alongw.cn/f/DzvHK/Paper-1.21.1-ZH.zip", + "author": "alongw.cn", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar server.jar -nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "language": "zh_cn", "description": "[Paper] 中小型互通服推荐,1.20.4 版本,快速开服,包含ESS、锁箱子、操作回滚、领地商店等基础插件。", From b3222e26a96f806497375c930d1c67aa1b642cc5 Mon Sep 17 00:00:00 2001 From: Unitwk Date: Sun, 29 Sep 2024 11:10:04 +0800 Subject: [PATCH 090/338] feat: update download addr --- setup.sh | 12 ++++++------ setup_cn.sh | 18 +++++++++--------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/setup.sh b/setup.sh index 025fd03..81fc5b5 100644 --- a/setup.sh +++ b/setup.sh @@ -1,7 +1,7 @@ #!/bin/bash mcsmanager_install_path="/opt/mcsmanager" -mcsmanager_download_addr="https://github.com/MCSManager/MCSManager/releases/download/v10.2.1/mcsmanager_linux_release.tar.gz" +mcsmanager_download_addr="https://awwa.cc/mcsm/linux" package_name="mcsmanager_linux_release.tar.gz" node="v20.12.2" arch=$(uname -m) @@ -91,7 +91,7 @@ Install_MCSManager() { cd "${mcsmanager_install_path}" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}" # download MCSManager release - wget "${mcsmanager_download_addr}" || Red_Error "[x] Failed to download MCSManager" + wget "${mcsmanager_download_addr}" -O "${package_name}" || Red_Error "[x] Failed to download MCSManager" tar -zxf ${package_name} -o || Red_Error "[x] Failed to untar ${package_name}" rm -rf "${mcsmanager_install_path}/${package_name}" @@ -167,10 +167,10 @@ WantedBy=multi-user.target echo_cyan_n "Daemon Address: " echo_yellow "ws://:24444 (Cluster)" echo_red "You must expose ports " - echo_yellow "23333" - echo_red " and " - echo_yellow "24444" - echo_red " to use the service properly on the Internet." + echo_yellow "23333" + echo_red " and " + echo_yellow "24444" + echo_red " to use the service properly on the Internet." echo_yellow " " echo_cyan "Usage:" echo_cyan "systemctl start mcsm-{daemon,web}.service" diff --git a/setup_cn.sh b/setup_cn.sh index 8605e12..125fbd4 100755 --- a/setup_cn.sh +++ b/setup_cn.sh @@ -2,7 +2,7 @@ # 中国大陆需要安装脚本额外配置镜像地址以及低版本的 NodeJS 环境 mcsmanager_install_path="/opt/mcsmanager" -mcsmanager_download_addr="https://cloud.alongw.cn/f/ZMqsl/mcsmanager_linux_release.tar.gz" +mcsmanager_download_addr="https://awwa.cc/mcsm/linux" package_name="mcsmanager_linux_release.tar.gz" node="v16.20.2" arch=$(uname -m) @@ -35,7 +35,7 @@ echo_yellow() { # script info echo_cyan "+---------------------------------------------------------------------- -| MCSManager 安装脚本 +| MCSManager 安装脚本 (MCSManager Installer) +---------------------------------------------------------------------- " @@ -97,7 +97,7 @@ Install_MCSManager() { cd "${mcsmanager_install_path}" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}" # download MCSManager release - wget "${mcsmanager_download_addr}" || Red_Error "[x] Failed to download MCSManager" + wget "${mcsmanager_download_addr}" -O "${package_name}" || Red_Error "[x] Failed to download MCSManager" tar -zxf ${package_name} -o || Red_Error "[x] Failed to untar ${package_name}" rm -rf "${mcsmanager_install_path}/${package_name}" @@ -166,20 +166,20 @@ WantedBy=multi-user.target printf "\n\n\n\n" echo_yellow "==================================================================" - echo_green "Installation is complete! Welcome to the MCSManager!!!" + echo_green "安装完成,欢迎使用 MCSManager !" echo_yellow " " - echo_cyan_n "HTTP Web Service: " + echo_cyan_n "主控网页访问地址: " echo_yellow "http://:23333 (Browser)" - echo_cyan_n "Daemon Address: " + echo_cyan_n "被控守护进程地址: " echo_yellow "ws://:24444 (Cluster)" - echo_red "You must expose ports 23333 and 24444 to use the service properly on the Internet." + echo_red "默认情况下,你必须开放 23333 和 24444 端口才能确保面板工作正常!" echo_yellow " " - echo_cyan "Usage:" + echo_cyan "面板开关指令:" echo_cyan "systemctl start mcsm-{daemon,web}.service" echo_cyan "systemctl stop mcsm-{daemon,web}.service" echo_cyan "systemctl restart mcsm-{daemon,web}.service" echo_yellow " " - echo_green "Official Document: https://docs.mcsmanager.com/" + echo_green "官方文档: https://docs.mcsmanager.com/" echo_yellow "==================================================================" } From 519412c11e48b2fe6ca540fe339edab98f7ea4f7 Mon Sep 17 00:00:00 2001 From: naruko-hstk <34113239+naruko-hstk@users.noreply.github.com> Date: Wed, 30 Oct 2024 12:17:20 +0800 Subject: [PATCH 091/338] Add Fabric Loader 1.14~1.21(All is latest version) --- templates.json | 152 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 152 insertions(+) diff --git a/templates.json b/templates.json index 7916d1f..ffa09b7 100644 --- a/templates.json +++ b/templates.json @@ -106,6 +106,158 @@ "oe": "utf-8" } }, + { + "language": "en_us", + "description": "[Fabric] Minecraft 1.14.4 Fabric", + "title": "Minecraft 1.14.4 with Fabric Loader", + "runtime": "Java 8+", + "hardware": "RAM 4G+", + "size": "5MB", + "remark": "Minecraft Fabric", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.1/fabric-installer-1.0.1.jar", + "author": "fabricmc.net", + "setupInfo": { + "type": "minecraft/java/fabric", + "startCommand": "java -jar fabric-server-launch.jar -nogui", + "stopCommand": "stop", + "updateCommand": "java -jar fabric-installer-1.0.1.jar -mcversion 1.14.4 -downloadMinecraft -noprofile", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Fabric] Minecraft 1.15.2 Fabric", + "title": "Minecraft 1.15.2 with Fabric Loader", + "runtime": "Java 8+", + "hardware": "RAM 4G+", + "size": "5MB", + "remark": "Minecraft Fabric", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.1/fabric-installer-1.0.1.jar", + "author": "fabricmc.net", + "setupInfo": { + "type": "minecraft/java/fabric", + "startCommand": "java -jar fabric-server-launch.jar -nogui", + "stopCommand": "stop", + "updateCommand": "java -jar fabric-installer-1.0.1.jar -mcversion 1.15.2 -downloadMinecraft -noprofile", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Fabric] Minecraft 1.16.5 Fabric", + "title": "Minecraft 1.16.5 with Fabric Loader", + "runtime": "Java 8+", + "hardware": "RAM 4G+", + "size": "5MB", + "remark": "Minecraft Fabric", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.1/fabric-installer-1.0.1.jar", + "author": "fabricmc.net", + "setupInfo": { + "type": "minecraft/java/fabric", + "startCommand": "java -jar fabric-server-launch.jar -nogui", + "stopCommand": "stop", + "updateCommand": "java -jar fabric-installer-1.0.1.jar -mcversion 1.16.5 -downloadMinecraft -noprofile", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Fabric] Minecraft 1.17.1 Fabric", + "title": "Minecraft 1.17.1 with Fabric Loader", + "runtime": "Java 16+", + "hardware": "RAM 4G+", + "size": "5MB", + "remark": "Minecraft Fabric", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.1/fabric-installer-1.0.1.jar", + "author": "fabricmc.net", + "setupInfo": { + "type": "minecraft/java/fabric", + "startCommand": "java -jar fabric-server-launch.jar -nogui", + "stopCommand": "stop", + "updateCommand": "java -jar fabric-installer-1.0.1.jar -mcversion 1.17.1 -downloadMinecraft -noprofile", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Fabric] Minecraft 1.18.2 Fabric", + "title": "Minecraft 1.18.2 with Fabric Loader", + "runtime": "Java 17+", + "hardware": "RAM 4G+", + "size": "5MB", + "remark": "Minecraft Fabric", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.1/fabric-installer-1.0.1.jar", + "author": "fabricmc.net", + "setupInfo": { + "type": "minecraft/java/fabric", + "startCommand": "java -jar fabric-server-launch.jar -nogui", + "stopCommand": "stop", + "updateCommand": "java -jar fabric-installer-1.0.1.jar -mcversion 1.18.2 -downloadMinecraft -noprofile", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Fabric] Minecraft 1.19.4 Fabric", + "title": "Minecraft 1.19.4 with Fabric Loader", + "runtime": "Java 17+", + "hardware": "RAM 4G+", + "size": "5MB", + "remark": "Minecraft Fabric", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.1/fabric-installer-1.0.1.jar", + "author": "fabricmc.net", + "setupInfo": { + "type": "minecraft/java/fabric", + "startCommand": "java -jar fabric-server-launch.jar -nogui", + "stopCommand": "stop", + "updateCommand": "java -jar fabric-installer-1.0.1.jar -mcversion 1.19.4 -downloadMinecraft -noprofile", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Fabric] Minecraft 1.20.6 Fabric", + "title": "Minecraft 1.20.6 with Fabric Loader", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "5MB", + "remark": "Minecraft Fabric", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.1/fabric-installer-1.0.1.jar", + "author": "fabricmc.net", + "setupInfo": { + "type": "minecraft/java/fabric", + "startCommand": "java -jar fabric-server-launch.jar -nogui", + "stopCommand": "stop", + "updateCommand": "java -jar fabric-installer-1.0.1.jar -mcversion 1.20.6 -downloadMinecraft -noprofile", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Fabric] Minecraft 1.21.3 Fabric", + "title": "Minecraft 1.21.3 with Fabric Loader", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "5MB", + "remark": "Minecraft Fabric", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.1/fabric-installer-1.0.1.jar", + "author": "fabricmc.net", + "setupInfo": { + "type": "minecraft/java/fabric", + "startCommand": "java -jar fabric-server-launch.jar -nogui", + "stopCommand": "stop", + "updateCommand": "java -jar fabric-installer-1.0.1.jar -mcversion 1.21.3 -downloadMinecraft -noprofile", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "language": "zh_cn", From 14720f0b4c35b956f24ae7b0b5f1be2edf8c2daa Mon Sep 17 00:00:00 2001 From: naruko-hstk <34113239+naruko-hstk@users.noreply.github.com> Date: Wed, 30 Oct 2024 23:37:13 +0800 Subject: [PATCH 092/338] Fix command bug --- templates.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/templates.json b/templates.json index ffa09b7..1498510 100644 --- a/templates.json +++ b/templates.json @@ -120,7 +120,7 @@ "type": "minecraft/java/fabric", "startCommand": "java -jar fabric-server-launch.jar -nogui", "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.1.jar -mcversion 1.14.4 -downloadMinecraft -noprofile", + "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.14.4 -downloadMinecraft -noprofile", "ie": "utf-8", "oe": "utf-8" } @@ -139,7 +139,7 @@ "type": "minecraft/java/fabric", "startCommand": "java -jar fabric-server-launch.jar -nogui", "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.1.jar -mcversion 1.15.2 -downloadMinecraft -noprofile", + "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.15.2 -downloadMinecraft -noprofile", "ie": "utf-8", "oe": "utf-8" } @@ -158,7 +158,7 @@ "type": "minecraft/java/fabric", "startCommand": "java -jar fabric-server-launch.jar -nogui", "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.1.jar -mcversion 1.16.5 -downloadMinecraft -noprofile", + "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.16.5 -downloadMinecraft -noprofile", "ie": "utf-8", "oe": "utf-8" } @@ -177,7 +177,7 @@ "type": "minecraft/java/fabric", "startCommand": "java -jar fabric-server-launch.jar -nogui", "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.1.jar -mcversion 1.17.1 -downloadMinecraft -noprofile", + "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.17.1 -downloadMinecraft -noprofile", "ie": "utf-8", "oe": "utf-8" } @@ -196,7 +196,7 @@ "type": "minecraft/java/fabric", "startCommand": "java -jar fabric-server-launch.jar -nogui", "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.1.jar -mcversion 1.18.2 -downloadMinecraft -noprofile", + "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.18.2 -downloadMinecraft -noprofile", "ie": "utf-8", "oe": "utf-8" } @@ -215,7 +215,7 @@ "type": "minecraft/java/fabric", "startCommand": "java -jar fabric-server-launch.jar -nogui", "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.1.jar -mcversion 1.19.4 -downloadMinecraft -noprofile", + "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.19.4 -downloadMinecraft -noprofile", "ie": "utf-8", "oe": "utf-8" } @@ -234,7 +234,7 @@ "type": "minecraft/java/fabric", "startCommand": "java -jar fabric-server-launch.jar -nogui", "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.1.jar -mcversion 1.20.6 -downloadMinecraft -noprofile", + "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.20.6 -downloadMinecraft -noprofile", "ie": "utf-8", "oe": "utf-8" } @@ -253,7 +253,7 @@ "type": "minecraft/java/fabric", "startCommand": "java -jar fabric-server-launch.jar -nogui", "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.1.jar -mcversion 1.21.3 -downloadMinecraft -noprofile", + "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.21.3 -downloadMinecraft -noprofile", "ie": "utf-8", "oe": "utf-8" } From a5d82fa0d3680eabd2e0b0c1dbed9df1e90207b5 Mon Sep 17 00:00:00 2001 From: YuMao Date: Fri, 8 Nov 2024 22:48:13 +0800 Subject: [PATCH 093/338] Update setup.sh --- setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index 81fc5b5..ce65bae 100644 --- a/setup.sh +++ b/setup.sh @@ -1,7 +1,7 @@ #!/bin/bash mcsmanager_install_path="/opt/mcsmanager" -mcsmanager_download_addr="https://awwa.cc/mcsm/linux" +mcsmanager_download_addr="https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/mcsmanager_linux_release.tar.gz" package_name="mcsmanager_linux_release.tar.gz" node="v20.12.2" arch=$(uname -m) From ca50950ebd803f3fbef0707166545697cb9ddaf5 Mon Sep 17 00:00:00 2001 From: YuMao Date: Fri, 8 Nov 2024 22:48:25 +0800 Subject: [PATCH 094/338] Update setup_cn.sh --- setup_cn.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup_cn.sh b/setup_cn.sh index 125fbd4..ad6c155 100755 --- a/setup_cn.sh +++ b/setup_cn.sh @@ -2,7 +2,7 @@ # 中国大陆需要安装脚本额外配置镜像地址以及低版本的 NodeJS 环境 mcsmanager_install_path="/opt/mcsmanager" -mcsmanager_download_addr="https://awwa.cc/mcsm/linux" +mcsmanager_download_addr="https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/mcsmanager_linux_release.tar.gz" package_name="mcsmanager_linux_release.tar.gz" node="v16.20.2" arch=$(uname -m) From 79a13e463728c9e8ac5c48fb678d2eabf290b072 Mon Sep 17 00:00:00 2001 From: YuMao Date: Fri, 13 Dec 2024 16:24:30 +0800 Subject: [PATCH 095/338] Update templates.json --- templates.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates.json b/templates.json index 1498510..2603802 100644 --- a/templates.json +++ b/templates.json @@ -13,7 +13,7 @@ "packages": [ { "language": "en_us", - "description": "[Paper] Minecraft 1.20.2 Paper", + "description": "[Paper] Minecraft 1.21.1 Paper", "title": "Minecraft 1.20.2", "runtime": "Java 22", "hardware": "RAM 4G+", From b26f1aeb9b35a0912a5b8a674e9f6ea0df457664 Mon Sep 17 00:00:00 2001 From: YuMao Date: Fri, 13 Dec 2024 16:27:00 +0800 Subject: [PATCH 096/338] Update templates.json --- templates.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates.json b/templates.json index 2603802..e2745bb 100644 --- a/templates.json +++ b/templates.json @@ -14,7 +14,7 @@ { "language": "en_us", "description": "[Paper] Minecraft 1.21.1 Paper", - "title": "Minecraft 1.20.2", + "title": "Minecraft 1.21.1", "runtime": "Java 22", "hardware": "RAM 4G+", "size": "150MB", From ea92539cc8c7ff97566290a24507889f94c7595b Mon Sep 17 00:00:00 2001 From: Antony Blem Date: Wed, 25 Dec 2024 12:42:01 +0100 Subject: [PATCH 097/338] Update Server templates in templates.json (only en_us) --- templates.json | 815 +++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 749 insertions(+), 66 deletions(-) diff --git a/templates.json b/templates.json index 1498510..8d9241e 100644 --- a/templates.json +++ b/templates.json @@ -11,40 +11,515 @@ } ], "packages": [ + { + "language": "en_us", + "description": "[Purpur] Minecraft 1.21.3 Purpur", + "title": "Minecraft 1.21.3", + "runtime": "Java 22", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Purpur included", + "targetLink": "https://api.purpurmc.org/v2/purpur/1.21.3/2358/download", + "author": "purpurmc.org", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar purpur-1.21.3-2358.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Purpur] Minecraft 1.21.1 Purpur", + "title": "Minecraft 1.21.1", + "runtime": "Java 22", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Purpur included", + "targetLink": "https://api.purpurmc.org/v2/purpur/1.21.1/2329/download", + "author": "purpurmc.org", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar purpur-1.21.1-2329.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Purpur] Minecraft 1.20.6 Purpur", + "title": "Minecraft 1.20.6", + "runtime": "Java 22", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Purpur included", + "targetLink": "https://api.purpurmc.org/v2/purpur/1.20.6/2233/download", + "author": "purpurmc.org", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar purpur-1.20.6-2233.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Purpur] Minecraft 1.20.4 Purpur", + "title": "Minecraft 1.20.4", + "runtime": "Java 22", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Purpur included", + "targetLink": "https://api.purpurmc.org/v2/purpur/1.20.4/2176/download", + "author": "purpurmc.org", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar purpur-1.20.4-2176.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Purpur] Minecraft 1.20.1 Purpur", + "title": "Minecraft 1.20.1", + "runtime": "Java 22", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Purpur included", + "targetLink": "https://api.purpurmc.org/v2/purpur/1.20.1/2062/download", + "author": "purpurmc.org", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar purpur-1.20.1-2062.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Purpur] Minecraft 1.19.2 Purpur", + "title": "Minecraft 1.19.2", + "runtime": "Java 22", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Purpur included", + "targetLink": "https://api.purpurmc.org/v2/purpur/1.19.2/1858/download", + "author": "purpurmc.org", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar purpur-1.19.2-1858.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Purpur] Minecraft 1.18.2 Purpur", + "title": "Minecraft 1.18.2", + "runtime": "Java 22", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Purpur included", + "targetLink": "https://api.purpurmc.org/v2/purpur/1.18.2/1632/download", + "author": "purpurmc.org", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar purpur-1.18.2-1632.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Purpur] Minecraft 1.17.1 Purpur", + "title": "Minecraft 1.17.1", + "runtime": "Java 17", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Purpur included", + "targetLink": "https://api.purpurmc.org/v2/purpur/1.17.1/1428/download", + "author": "purpurmc.org", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar purpur-1.17.1-1428.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Purpur] Minecraft 1.16.5 Purpur", + "title": "Minecraft 1.16.5", + "runtime": "Java 17", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Purpur included", + "targetLink": "https://api.purpurmc.org/v2/purpur/1.16.5/1171/download", + "author": "purpurmc.org", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar purpur-1.16.5-1171.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Paper] Minecraft 1.21.3 Paper", + "title": "Minecraft 1.21.3", + "runtime": "Java 22", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Paper included", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.3/builds/82/downloads/paper-1.21.3-82.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar paper-1.21.3-82.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Paper] Minecraft 1.21.1 Paper", + "title": "Minecraft 1.21.1", + "runtime": "Java 22", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Paper included", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.1/builds/132/downloads/paper-1.21.1-132.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar paper-1.21.1-132.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Paper] Minecraft 1.20.6 Paper", + "title": "Minecraft 1.20.6", + "runtime": "Java 21", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Paper included", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.20.6/builds/151/downloads/paper-1.20.6-151.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar paper-1.20.6-151.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Paper] Minecraft 1.20.4 Paper", + "title": "Minecraft 1.20.4", + "runtime": "Java 21", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Paper included", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.20.4/builds/499/downloads/paper-1.20.4-499.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar paper-1.20.4-499.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "language": "en_us", "description": "[Paper] Minecraft 1.20.2 Paper", "title": "Minecraft 1.20.2", - "runtime": "Java 22", + "runtime": "Java 21", "hardware": "RAM 4G+", "size": "150MB", "remark": "Includes some basic plugins", - "targetLink": "https://cloud.alongw.cn/f/5XlSW/Paper-1.21.1.zip", - "author": "alongw.cn", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.20.2/builds/318/downloads/paper-1.20.2-318.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar paper-1.20.2-318.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Paper] Minecraft 1.20.1 Paper", + "title": "Minecraft 1.20.1", + "runtime": "Java 21", + "hardware": "RAM 4G+", + "size": "200MB", + "remark": "Includes some basic plugins", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.20.1/builds/196/downloads/paper-1.20.1-196.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar paper-1.20.1-196.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Paper] Minecraft 1.19.4 Paper", + "title": "Minecraft 1.19.4", + "runtime": "Java 21", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Paper included", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.19.4/builds/550/downloads/paper-1.19.4-550.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar paper-1.19.4-550.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Paper] Minecraft 1.19.2 Paper", + "title": "Minecraft 1.19.2", + "runtime": "Java 21", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Paper included", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.19.2/builds/307/downloads/paper-1.19.2-307.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar paper-1.19.2-307.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Paper] Minecraft 1.18.2 Paper", + "title": "Minecraft 1.18.2", + "runtime": "Java 21", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Paper included", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.18.2/builds/388/downloads/paper-1.18.2-388.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar paper-1.18.2-388.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Paper] Minecraft 1.17.1 Paper", + "title": "Minecraft 1.17.1", + "runtime": "Java 21", + "hardware": "RAM 4G+", + "size": "60MB", + "remark": "Only Paper included", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.17.1/builds/411/downloads/paper-1.17.1-411.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar paper-1.17.1-411.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Paper] Minecraft 1.16.5 Paper", + "title": "Minecraft 1.16.5", + "runtime": "Java 21", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Paper included", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.16.5/builds/794/downloads/paper-1.16.5-794.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar paper-1.16.5-794.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Paper] Minecraft 1.12.2 Paper", + "title": "Minecraft 1.12.2", + "runtime": "Java 21", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Paper included", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.12.2/builds/1620/downloads/paper-1.12.2-1620.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar paper-1.12.2-1620.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Paper] Minecraft 1.8.8 Paper", + "title": "Minecraft 1.8.8", + "runtime": "Java 21", + "hardware": "RAM 4G+", + "size": "20MB", + "remark": "Only Paper included", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.8.8/builds/445/downloads/paper-1.8.8-445.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar paper-1.8.8-445.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"start.bat\" after installation.", + "title": "Forge 1.21.4 (Supports Mods)", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.4-54.0.12/forge-1.21.4-54.0.12-installer.jar", + "author": "minecraftforge.net", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.21.4-54.0.12-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"start.bat\" after installation.", + "title": "Forge 1.21.3 (Supports Mods)", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.3-53.0.33/forge-1.21.3-53.0.33-installer.jar", + "author": "minecraftforge.net", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.21.3-53.0.33-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"start.bat\" after installation.", + "title": "Forge 1.21.1 (Supports Mods)", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.1-52.0.37/forge-1.21.1-52.0.37-installer.jar", + "author": "minecraftforge.net", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.21.1-52.0.37-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"start.bat\" after installation.", + "title": "Forge 1.20.6 (Supports Mods)", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.6-50.1.31/forge-1.20.6-50.1.31-installer.jar", + "author": "minecraftforge.net", "setupInfo": { - "type": "minecraft/java", - "startCommand": "java -jar server.jar -nogui", + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "", + "updateCommand": "java -jar forge-1.20.6-50.1.31-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } }, { "language": "en_us", - "description": "[Paper] Minecraft 1.20.1 Paper", - "title": "Minecraft 1.20.1", - "runtime": "Java 22", - "hardware": "RAM 4G+", - "size": "200MB", - "remark": "Includes some basic plugins", - "targetLink": "https://cloud.alongw.cn/f/jwjsl/Paper-1.20.1-EN.zip", - "author": "alongw.cn", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"start.bat\" after installation.", + "title": "Forge 1.20.4 (Supports Mods)", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.4-49.1.21/forge-1.20.4-49.1.21-installer.jar", + "author": "minecraftforge.net", "setupInfo": { - "type": "minecraft/java", - "startCommand": "java -jar server.jar -nogui", + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "", + "updateCommand": "java -jar forge-1.20.4-49.1.21-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -52,18 +527,18 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"start.bat\" after installation.", - "title": "Forge 1.20.6 (Support Mods)", + "title": "Forge 1.20.1 (Supports Mods)", "runtime": "Java 21+", "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.6-50.0.8/forge-1.20.6-50.0.8-installer.jar", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.1-47.3.22/forge-1.20.1-47.3.22-installer.jar", "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar forge-1.20.6-50.0.8-installer.jar --installServer", + "updateCommand": "java -jar forge-1.20.1-47.3.22-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -71,18 +546,18 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"start.bat\" after installation.", - "title": "Forge 1.20.1 (Support Mods)", - "runtime": "Java 21+", + "title": "Forge 1.19.4 (Supports Mods)", + "runtime": "Java 17+", "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.1-47.2.32/forge-1.20.1-47.2.32-installer.jar", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.19.4-45.3.15/forge-1.19.4-45.3.15-installer.jar", "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar forge-1.20.1-47.2.32-installer.jar --installServer", + "updateCommand": "java -jar forge-1.19.4-45.3.15-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -90,27 +565,141 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"start.bat\" after installation.", - "title": "Forge 1.19.2 (Support Mods)", + "title": "Forge 1.19.2 (Supports Mods)", "runtime": "Java 17+", "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.19.2-43.3.13/forge-1.19.2-43.3.13-installer.jar", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.19.2-43.4.12/forge-1.19.2-43.4.12-installer.jar", "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar forge-1.19.2-43.3.13-installer.jar --installServer", + "updateCommand": "java -jar forge-1.19.2-43.4.12-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } }, { "language": "en_us", - "description": "[Fabric] Minecraft 1.14.4 Fabric", - "title": "Minecraft 1.14.4 with Fabric Loader", - "runtime": "Java 8+", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"start.bat\" after installation.", + "title": "Forge 1.18.2 (Supports Mods)", + "runtime": "Java 17+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.18.2-40.2.31/forge-1.18.2-40.2.31-installer.jar", + "author": "minecraftforge.net", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.18.2-40.2.31-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"start.bat\" after installation.", + "title": "Forge 1.17.1 (Supports Mods)", + "runtime": "Java 17+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.17.1-37.1.1/forge-1.17.1-37.1.1-installer.jar", + "author": "minecraftforge.net", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.17.1-37.1.1-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"start.bat\" after installation.", + "title": "Forge 1.16.5 (Supports Mods)", + "runtime": "Java 17+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.16.5-36.2.42/forge-1.16.5-36.2.42-installer.jar", + "author": "minecraftforge.net", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.16.5-36.2.42-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"start.bat\" after installation.", + "title": "Forge 1.12.2 (Supports Mods)", + "runtime": "Java 17+", + "hardware": "RAM 8G+", + "size": "5MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.12.2-14.23.5.2860/forge-1.12.2-14.23.5.2860-installer.jar", + "author": "minecraftforge.net", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.12.2-14.23.5.2860-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"start.bat\" after installation.", + "title": "Forge 1.8.9 (Supports Mods)", + "runtime": "Java 17+", + "hardware": "RAM 8G+", + "size": "5MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.8.9-11.15.1.2318-1.8.9/forge-1.8.9-11.15.1.2318-1.8.9-installer.jar", + "author": "minecraftforge.net", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.8.9-11.15.1.2318-1.8.9-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"start.bat\" after installation.", + "title": "Forge 1.7.10 (Supports Mods)", + "runtime": "Java 17+", + "hardware": "RAM 8G+", + "size": "5MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.7.10-10.13.4.1614-1.7.10/forge-1.7.10-10.13.4.1614-1.7.10-installer.jar", + "author": "minecraftforge.net", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.7.10-10.13.4.1614-1.7.10-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Fabric] Minecraft 1.21.4 Fabric", + "title": "Minecraft 1.21.4 with Fabric Loader", + "runtime": "Java 21+", "hardware": "RAM 4G+", "size": "5MB", "remark": "Minecraft Fabric", @@ -118,18 +707,18 @@ "author": "fabricmc.net", "setupInfo": { "type": "minecraft/java/fabric", - "startCommand": "java -jar fabric-server-launch.jar -nogui", + "startCommand": "java -jar fabric-server-launch.jar nogui", "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.14.4 -downloadMinecraft -noprofile", + "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.21.4 -downloadMinecraft -noprofile", "ie": "utf-8", "oe": "utf-8" } }, { "language": "en_us", - "description": "[Fabric] Minecraft 1.15.2 Fabric", - "title": "Minecraft 1.15.2 with Fabric Loader", - "runtime": "Java 8+", + "description": "[Fabric] Minecraft 1.21.3 Fabric", + "title": "Minecraft 1.21.3 with Fabric Loader", + "runtime": "Java 21+", "hardware": "RAM 4G+", "size": "5MB", "remark": "Minecraft Fabric", @@ -137,18 +726,18 @@ "author": "fabricmc.net", "setupInfo": { "type": "minecraft/java/fabric", - "startCommand": "java -jar fabric-server-launch.jar -nogui", + "startCommand": "java -jar fabric-server-launch.jar nogui", "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.15.2 -downloadMinecraft -noprofile", + "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.21.3 -downloadMinecraft -noprofile", "ie": "utf-8", "oe": "utf-8" } }, { "language": "en_us", - "description": "[Fabric] Minecraft 1.16.5 Fabric", - "title": "Minecraft 1.16.5 with Fabric Loader", - "runtime": "Java 8+", + "description": "[Fabric] Minecraft 1.21.1 Fabric", + "title": "Minecraft 1.21.1 with Fabric Loader", + "runtime": "Java 21+", "hardware": "RAM 4G+", "size": "5MB", "remark": "Minecraft Fabric", @@ -156,18 +745,18 @@ "author": "fabricmc.net", "setupInfo": { "type": "minecraft/java/fabric", - "startCommand": "java -jar fabric-server-launch.jar -nogui", + "startCommand": "java -jar fabric-server-launch.jar nogui", "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.16.5 -downloadMinecraft -noprofile", + "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.21.1 -downloadMinecraft -noprofile", "ie": "utf-8", "oe": "utf-8" } }, { "language": "en_us", - "description": "[Fabric] Minecraft 1.17.1 Fabric", - "title": "Minecraft 1.17.1 with Fabric Loader", - "runtime": "Java 16+", + "description": "[Fabric] Minecraft 1.20.6 Fabric", + "title": "Minecraft 1.20.6 with Fabric Loader", + "runtime": "Java 21+", "hardware": "RAM 4G+", "size": "5MB", "remark": "Minecraft Fabric", @@ -175,18 +764,18 @@ "author": "fabricmc.net", "setupInfo": { "type": "minecraft/java/fabric", - "startCommand": "java -jar fabric-server-launch.jar -nogui", + "startCommand": "java -jar fabric-server-launch.jar nogui", "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.17.1 -downloadMinecraft -noprofile", + "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.20.6 -downloadMinecraft -noprofile", "ie": "utf-8", "oe": "utf-8" } }, { "language": "en_us", - "description": "[Fabric] Minecraft 1.18.2 Fabric", - "title": "Minecraft 1.18.2 with Fabric Loader", - "runtime": "Java 17+", + "description": "[Fabric] Minecraft 1.20.4 Fabric", + "title": "Minecraft 1.20.4 with Fabric Loader", + "runtime": "Java 21+", "hardware": "RAM 4G+", "size": "5MB", "remark": "Minecraft Fabric", @@ -194,9 +783,28 @@ "author": "fabricmc.net", "setupInfo": { "type": "minecraft/java/fabric", - "startCommand": "java -jar fabric-server-launch.jar -nogui", + "startCommand": "java -jar fabric-server-launch.jar nogui", "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.18.2 -downloadMinecraft -noprofile", + "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.20.4 -downloadMinecraft -noprofile", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Fabric] Minecraft 1.20.1 Fabric", + "title": "Minecraft 1.20.1 with Fabric Loader", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "5MB", + "remark": "Minecraft Fabric", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.1/fabric-installer-1.0.1.jar", + "author": "fabricmc.net", + "setupInfo": { + "type": "minecraft/java/fabric", + "startCommand": "java -jar fabric-server-launch.jar nogui", + "stopCommand": "stop", + "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.20.1 -downloadMinecraft -noprofile", "ie": "utf-8", "oe": "utf-8" } @@ -213,7 +821,7 @@ "author": "fabricmc.net", "setupInfo": { "type": "minecraft/java/fabric", - "startCommand": "java -jar fabric-server-launch.jar -nogui", + "startCommand": "java -jar fabric-server-launch.jar nogui", "stopCommand": "stop", "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.19.4 -downloadMinecraft -noprofile", "ie": "utf-8", @@ -222,9 +830,9 @@ }, { "language": "en_us", - "description": "[Fabric] Minecraft 1.20.6 Fabric", - "title": "Minecraft 1.20.6 with Fabric Loader", - "runtime": "Java 21+", + "description": "[Fabric] Minecraft 1.19.2 Fabric", + "title": "Minecraft 1.19.2 with Fabric Loader", + "runtime": "Java 17+", "hardware": "RAM 4G+", "size": "5MB", "remark": "Minecraft Fabric", @@ -232,18 +840,18 @@ "author": "fabricmc.net", "setupInfo": { "type": "minecraft/java/fabric", - "startCommand": "java -jar fabric-server-launch.jar -nogui", + "startCommand": "java -jar fabric-server-launch.jar nogui", "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.20.6 -downloadMinecraft -noprofile", + "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.19.2 -downloadMinecraft -noprofile", "ie": "utf-8", "oe": "utf-8" } }, { "language": "en_us", - "description": "[Fabric] Minecraft 1.21.3 Fabric", - "title": "Minecraft 1.21.3 with Fabric Loader", - "runtime": "Java 21+", + "description": "[Fabric] Minecraft 1.18.2 Fabric", + "title": "Minecraft 1.18.2 with Fabric Loader", + "runtime": "Java 17+", "hardware": "RAM 4G+", "size": "5MB", "remark": "Minecraft Fabric", @@ -251,14 +859,89 @@ "author": "fabricmc.net", "setupInfo": { "type": "minecraft/java/fabric", - "startCommand": "java -jar fabric-server-launch.jar -nogui", + "startCommand": "java -jar fabric-server-launch.jar nogui", "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.21.3 -downloadMinecraft -noprofile", + "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.18.2 -downloadMinecraft -noprofile", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Fabric] Minecraft 1.17.1 Fabric", + "title": "Minecraft 1.17.1 with Fabric Loader", + "runtime": "Java 16+", + "hardware": "RAM 4G+", + "size": "5MB", + "remark": "Minecraft Fabric", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.1/fabric-installer-1.0.1.jar", + "author": "fabricmc.net", + "setupInfo": { + "type": "minecraft/java/fabric", + "startCommand": "java -jar fabric-server-launch.jar nogui", + "stopCommand": "stop", + "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.17.1 -downloadMinecraft -noprofile", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Fabric] Minecraft 1.16.5 Fabric", + "title": "Minecraft 1.16.5 with Fabric Loader", + "runtime": "Java 8+", + "hardware": "RAM 4G+", + "size": "5MB", + "remark": "Minecraft Fabric", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.1/fabric-installer-1.0.1.jar", + "author": "fabricmc.net", + "setupInfo": { + "type": "minecraft/java/fabric", + "startCommand": "java -jar fabric-server-launch.jar nogui", + "stopCommand": "stop", + "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.16.5 -downloadMinecraft -noprofile", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Fabric] Minecraft 1.15.2 Fabric", + "title": "Minecraft 1.15.2 with Fabric Loader", + "runtime": "Java 8+", + "hardware": "RAM 4G+", + "size": "5MB", + "remark": "Minecraft Fabric", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.1/fabric-installer-1.0.1.jar", + "author": "fabricmc.net", + "setupInfo": { + "type": "minecraft/java/fabric", + "startCommand": "java -jar fabric-server-launch.jar nogui", + "stopCommand": "stop", + "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.15.2 -downloadMinecraft -noprofile", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Fabric] Minecraft 1.14.4 Fabric", + "title": "Minecraft 1.14.4 with Fabric Loader", + "runtime": "Java 8+", + "hardware": "RAM 4G+", + "size": "5MB", + "remark": "Minecraft Fabric", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.1/fabric-installer-1.0.1.jar", + "author": "fabricmc.net", + "setupInfo": { + "type": "minecraft/java/fabric", + "startCommand": "java -jar fabric-server-launch.jar nogui", + "stopCommand": "stop", + "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.14.4 -downloadMinecraft -noprofile", "ie": "utf-8", "oe": "utf-8" } }, - { "language": "zh_cn", "description": "[Paper] Minecraft 1.21.1 快速开服", @@ -271,7 +954,7 @@ "author": "alongw.cn", "setupInfo": { "type": "minecraft/java", - "startCommand": "java -jar server.jar -nogui", + "startCommand": "java -jar server.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -290,7 +973,7 @@ "author": "alongw.cn", "setupInfo": { "type": "minecraft/java", - "startCommand": "java -jar server.jar -nogui", + "startCommand": "java -jar server.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", From e06eb0703652c241075143c0a59c142dbd8094f6 Mon Sep 17 00:00:00 2001 From: Antony Blem Date: Wed, 25 Dec 2024 12:54:12 +0100 Subject: [PATCH 098/338] fix: Give Purpur and Paper Instances thier tags automatically after creating it --- templates.json | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/templates.json b/templates.json index 8d9241e..5749d48 100644 --- a/templates.json +++ b/templates.json @@ -22,7 +22,7 @@ "targetLink": "https://api.purpurmc.org/v2/purpur/1.21.3/2358/download", "author": "purpurmc.org", "setupInfo": { - "type": "minecraft/java", + "type": "minecraft/java/purpur", "startCommand": "java -jar purpur-1.21.3-2358.jar nogui", "stopCommand": "stop", "updateCommand": "", @@ -41,7 +41,7 @@ "targetLink": "https://api.purpurmc.org/v2/purpur/1.21.1/2329/download", "author": "purpurmc.org", "setupInfo": { - "type": "minecraft/java", + "type": "minecraft/java/purpur", "startCommand": "java -jar purpur-1.21.1-2329.jar nogui", "stopCommand": "stop", "updateCommand": "", @@ -60,7 +60,7 @@ "targetLink": "https://api.purpurmc.org/v2/purpur/1.20.6/2233/download", "author": "purpurmc.org", "setupInfo": { - "type": "minecraft/java", + "type": "minecraft/java/purpur", "startCommand": "java -jar purpur-1.20.6-2233.jar nogui", "stopCommand": "stop", "updateCommand": "", @@ -79,7 +79,7 @@ "targetLink": "https://api.purpurmc.org/v2/purpur/1.20.4/2176/download", "author": "purpurmc.org", "setupInfo": { - "type": "minecraft/java", + "type": "minecraft/java/purpur", "startCommand": "java -jar purpur-1.20.4-2176.jar nogui", "stopCommand": "stop", "updateCommand": "", @@ -98,7 +98,7 @@ "targetLink": "https://api.purpurmc.org/v2/purpur/1.20.1/2062/download", "author": "purpurmc.org", "setupInfo": { - "type": "minecraft/java", + "type": "minecraft/java/purpur", "startCommand": "java -jar purpur-1.20.1-2062.jar nogui", "stopCommand": "stop", "updateCommand": "", @@ -117,7 +117,7 @@ "targetLink": "https://api.purpurmc.org/v2/purpur/1.19.2/1858/download", "author": "purpurmc.org", "setupInfo": { - "type": "minecraft/java", + "type": "minecraft/java/purpur", "startCommand": "java -jar purpur-1.19.2-1858.jar nogui", "stopCommand": "stop", "updateCommand": "", @@ -136,7 +136,7 @@ "targetLink": "https://api.purpurmc.org/v2/purpur/1.18.2/1632/download", "author": "purpurmc.org", "setupInfo": { - "type": "minecraft/java", + "type": "minecraft/java/purpur", "startCommand": "java -jar purpur-1.18.2-1632.jar nogui", "stopCommand": "stop", "updateCommand": "", @@ -155,7 +155,7 @@ "targetLink": "https://api.purpurmc.org/v2/purpur/1.17.1/1428/download", "author": "purpurmc.org", "setupInfo": { - "type": "minecraft/java", + "type": "minecraft/java/purpur", "startCommand": "java -jar purpur-1.17.1-1428.jar nogui", "stopCommand": "stop", "updateCommand": "", @@ -174,7 +174,7 @@ "targetLink": "https://api.purpurmc.org/v2/purpur/1.16.5/1171/download", "author": "purpurmc.org", "setupInfo": { - "type": "minecraft/java", + "type": "minecraft/java/purpur", "startCommand": "java -jar purpur-1.16.5-1171.jar nogui", "stopCommand": "stop", "updateCommand": "", @@ -193,7 +193,7 @@ "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.3/builds/82/downloads/paper-1.21.3-82.jar", "author": "papermc.io", "setupInfo": { - "type": "minecraft/java", + "type": "minecraft/java/paper", "startCommand": "java -jar paper-1.21.3-82.jar nogui", "stopCommand": "stop", "updateCommand": "", @@ -212,7 +212,7 @@ "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.1/builds/132/downloads/paper-1.21.1-132.jar", "author": "papermc.io", "setupInfo": { - "type": "minecraft/java", + "type": "minecraft/java/paper", "startCommand": "java -jar paper-1.21.1-132.jar nogui", "stopCommand": "stop", "updateCommand": "", @@ -231,7 +231,7 @@ "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.20.6/builds/151/downloads/paper-1.20.6-151.jar", "author": "papermc.io", "setupInfo": { - "type": "minecraft/java", + "type": "minecraft/java/paper", "startCommand": "java -jar paper-1.20.6-151.jar nogui", "stopCommand": "stop", "updateCommand": "", @@ -250,7 +250,7 @@ "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.20.4/builds/499/downloads/paper-1.20.4-499.jar", "author": "papermc.io", "setupInfo": { - "type": "minecraft/java", + "type": "minecraft/java/paper", "startCommand": "java -jar paper-1.20.4-499.jar nogui", "stopCommand": "stop", "updateCommand": "", @@ -269,7 +269,7 @@ "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.20.2/builds/318/downloads/paper-1.20.2-318.jar", "author": "papermc.io", "setupInfo": { - "type": "minecraft/java", + "type": "minecraft/java/paper", "startCommand": "java -jar paper-1.20.2-318.jar nogui", "stopCommand": "stop", "updateCommand": "", @@ -288,7 +288,7 @@ "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.20.1/builds/196/downloads/paper-1.20.1-196.jar", "author": "papermc.io", "setupInfo": { - "type": "minecraft/java", + "type": "minecraft/java/paper", "startCommand": "java -jar paper-1.20.1-196.jar nogui", "stopCommand": "stop", "updateCommand": "", @@ -307,7 +307,7 @@ "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.19.4/builds/550/downloads/paper-1.19.4-550.jar", "author": "papermc.io", "setupInfo": { - "type": "minecraft/java", + "type": "minecraft/java/paper", "startCommand": "java -jar paper-1.19.4-550.jar nogui", "stopCommand": "stop", "updateCommand": "", @@ -326,7 +326,7 @@ "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.19.2/builds/307/downloads/paper-1.19.2-307.jar", "author": "papermc.io", "setupInfo": { - "type": "minecraft/java", + "type": "minecraft/java/paper", "startCommand": "java -jar paper-1.19.2-307.jar nogui", "stopCommand": "stop", "updateCommand": "", @@ -364,7 +364,7 @@ "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.17.1/builds/411/downloads/paper-1.17.1-411.jar", "author": "papermc.io", "setupInfo": { - "type": "minecraft/java", + "type": "minecraft/java/paper", "startCommand": "java -jar paper-1.17.1-411.jar nogui", "stopCommand": "stop", "updateCommand": "", @@ -383,7 +383,7 @@ "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.16.5/builds/794/downloads/paper-1.16.5-794.jar", "author": "papermc.io", "setupInfo": { - "type": "minecraft/java", + "type": "minecraft/java/paper", "startCommand": "java -jar paper-1.16.5-794.jar nogui", "stopCommand": "stop", "updateCommand": "", @@ -402,7 +402,7 @@ "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.12.2/builds/1620/downloads/paper-1.12.2-1620.jar", "author": "papermc.io", "setupInfo": { - "type": "minecraft/java", + "type": "minecraft/java/paper", "startCommand": "java -jar paper-1.12.2-1620.jar nogui", "stopCommand": "stop", "updateCommand": "", @@ -421,7 +421,7 @@ "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.8.8/builds/445/downloads/paper-1.8.8-445.jar", "author": "papermc.io", "setupInfo": { - "type": "minecraft/java", + "type": "minecraft/java/paper", "startCommand": "java -jar paper-1.8.8-445.jar nogui", "stopCommand": "stop", "updateCommand": "", From 3068a1f699c68bf98b3ccc9f22ddf7e329eeca4f Mon Sep 17 00:00:00 2001 From: Antony Blem Date: Wed, 25 Dec 2024 13:14:34 +0100 Subject: [PATCH 099/338] fix: Remove Purpur tag because the latest version doesn't support it yet --- templates.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/templates.json b/templates.json index cdc028f..8f31593 100644 --- a/templates.json +++ b/templates.json @@ -22,7 +22,7 @@ "targetLink": "https://api.purpurmc.org/v2/purpur/1.21.3/2358/download", "author": "purpurmc.org", "setupInfo": { - "type": "minecraft/java/purpur", + "type": "minecraft/java", "startCommand": "java -jar purpur-1.21.3-2358.jar nogui", "stopCommand": "stop", "updateCommand": "", @@ -41,7 +41,7 @@ "targetLink": "https://api.purpurmc.org/v2/purpur/1.21.1/2329/download", "author": "purpurmc.org", "setupInfo": { - "type": "minecraft/java/purpur", + "type": "minecraft/java", "startCommand": "java -jar purpur-1.21.1-2329.jar nogui", "stopCommand": "stop", "updateCommand": "", @@ -60,7 +60,7 @@ "targetLink": "https://api.purpurmc.org/v2/purpur/1.20.6/2233/download", "author": "purpurmc.org", "setupInfo": { - "type": "minecraft/java/purpur", + "type": "minecraft/java", "startCommand": "java -jar purpur-1.20.6-2233.jar nogui", "stopCommand": "stop", "updateCommand": "", @@ -79,7 +79,7 @@ "targetLink": "https://api.purpurmc.org/v2/purpur/1.20.4/2176/download", "author": "purpurmc.org", "setupInfo": { - "type": "minecraft/java/purpur", + "type": "minecraft/java", "startCommand": "java -jar purpur-1.20.4-2176.jar nogui", "stopCommand": "stop", "updateCommand": "", @@ -98,7 +98,7 @@ "targetLink": "https://api.purpurmc.org/v2/purpur/1.20.1/2062/download", "author": "purpurmc.org", "setupInfo": { - "type": "minecraft/java/purpur", + "type": "minecraft/java", "startCommand": "java -jar purpur-1.20.1-2062.jar nogui", "stopCommand": "stop", "updateCommand": "", @@ -117,7 +117,7 @@ "targetLink": "https://api.purpurmc.org/v2/purpur/1.19.2/1858/download", "author": "purpurmc.org", "setupInfo": { - "type": "minecraft/java/purpur", + "type": "minecraft/java", "startCommand": "java -jar purpur-1.19.2-1858.jar nogui", "stopCommand": "stop", "updateCommand": "", @@ -136,7 +136,7 @@ "targetLink": "https://api.purpurmc.org/v2/purpur/1.18.2/1632/download", "author": "purpurmc.org", "setupInfo": { - "type": "minecraft/java/purpur", + "type": "minecraft/java", "startCommand": "java -jar purpur-1.18.2-1632.jar nogui", "stopCommand": "stop", "updateCommand": "", @@ -155,7 +155,7 @@ "targetLink": "https://api.purpurmc.org/v2/purpur/1.17.1/1428/download", "author": "purpurmc.org", "setupInfo": { - "type": "minecraft/java/purpur", + "type": "minecraft/java", "startCommand": "java -jar purpur-1.17.1-1428.jar nogui", "stopCommand": "stop", "updateCommand": "", @@ -174,7 +174,7 @@ "targetLink": "https://api.purpurmc.org/v2/purpur/1.16.5/1171/download", "author": "purpurmc.org", "setupInfo": { - "type": "minecraft/java/purpur", + "type": "minecraft/java", "startCommand": "java -jar purpur-1.16.5-1171.jar nogui", "stopCommand": "stop", "updateCommand": "", From 80a5d31f2e4736fb83ce4c72dbccfaa235251872 Mon Sep 17 00:00:00 2001 From: YuMao Date: Thu, 26 Dec 2024 16:03:54 +0800 Subject: [PATCH 100/338] Update setup_cn.sh --- setup_cn.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup_cn.sh b/setup_cn.sh index ad6c155..4532f2d 100755 --- a/setup_cn.sh +++ b/setup_cn.sh @@ -2,7 +2,7 @@ # 中国大陆需要安装脚本额外配置镜像地址以及低版本的 NodeJS 环境 mcsmanager_install_path="/opt/mcsmanager" -mcsmanager_download_addr="https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/mcsmanager_linux_release.tar.gz" +mcsmanager_download_addr="http://47.99.81.8/mcsmanager_linux_release.tar.gz" package_name="mcsmanager_linux_release.tar.gz" node="v16.20.2" arch=$(uname -m) From 08b51cead0866b729bf0f412894af0c5a2275eae Mon Sep 17 00:00:00 2001 From: YuMao Date: Thu, 26 Dec 2024 16:04:13 +0800 Subject: [PATCH 101/338] Update setup.sh --- setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index ce65bae..df2211b 100644 --- a/setup.sh +++ b/setup.sh @@ -1,7 +1,7 @@ #!/bin/bash mcsmanager_install_path="/opt/mcsmanager" -mcsmanager_download_addr="https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/mcsmanager_linux_release.tar.gz" +mcsmanager_download_addr="http://47.99.81.8/mcsmanager_linux_release.tar.gz" package_name="mcsmanager_linux_release.tar.gz" node="v20.12.2" arch=$(uname -m) From 8f95b7662dd0c9537b6b43ee71d0df9fc41ccb7c Mon Sep 17 00:00:00 2001 From: Antony Blem Date: Mon, 30 Dec 2024 11:56:30 +0100 Subject: [PATCH 102/338] fix: Paper 1.20.2 had code of 1.21.1 in templates.json --- templates.json | 5 ----- 1 file changed, 5 deletions(-) diff --git a/templates.json b/templates.json index 8f31593..f7036f9 100644 --- a/templates.json +++ b/templates.json @@ -263,11 +263,6 @@ "description": "[Paper] Minecraft 1.20.2 Paper", "title": "Minecraft 1.20.2", "runtime": "Java 21", - - "description": "[Paper] Minecraft 1.21.1 Paper", - "title": "Minecraft 1.21.1", - "runtime": "Java 22", - "hardware": "RAM 4G+", "size": "150MB", "remark": "Includes some basic plugins", From aa6c64f81b8dad3e7ec315043399f0e44ee9c320 Mon Sep 17 00:00:00 2001 From: Antony Blem Date: Mon, 30 Dec 2024 12:07:11 +0100 Subject: [PATCH 103/338] feat: Add Vanilla Minecraft Versions (only en_US) --- templates.json | 209 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 209 insertions(+) diff --git a/templates.json b/templates.json index f7036f9..7488ecc 100644 --- a/templates.json +++ b/templates.json @@ -942,6 +942,215 @@ "oe": "utf-8" } }, + { + "language": "en_us", + "description": "[Vanilla] Minecraft 1.21.4", + "title": "Minecraft 1.21.4", + "runtime": "Java 21+", + "hardware": "RAM 2G+", + "size": "55MB", + "remark": "Minecraft Java", + "targetLink": "https://piston-data.mojang.com/v1/objects/4707d00eb834b446575d89a61a11b5d548d8c001/server.jar", + "author": "Mojang", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar server.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Vanilla] Minecraft 1.21.1", + "title": "Minecraft 1.21.1", + "runtime": "Java 21+", + "hardware": "RAM 2G+", + "size": "50MB", + "remark": "Minecraft Java", + "targetLink": "https://piston-data.mojang.com/v1/objects/59353fb40c36d304f2035d51e7d6e6baa98dc05c/server.jar", + "author": "Mojang", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar server.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Vanilla] Minecraft 1.20.6", + "title": "Minecraft 1.20.6", + "runtime": "Java 21+", + "hardware": "RAM 2G+", + "size": "50MB", + "remark": "Minecraft Java", + "targetLink": "https://piston-data.mojang.com/v1/objects/145ff0858209bcfc164859ba735d4199aafa1eea/server.jar", + "author": "Mojang", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar server.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Vanilla] Minecraft 1.20.4", + "title": "Minecraft 1.20.4", + "runtime": "Java 21+", + "hardware": "RAM 2G+", + "size": "50MB", + "remark": "Minecraft Java", + "targetLink": "https://piston-data.mojang.com/v1/objects/8dd1a28015f51b1803213892b50b7b4fc76e594d/server.jar", + "author": "Mojang", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar server.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Vanilla] Minecraft 1.20.1", + "title": "Minecraft 1.20.1", + "runtime": "Java 21+", + "hardware": "RAM 2G+", + "size": "50MB", + "remark": "Minecraft Java", + "targetLink": "https://piston-data.mojang.com/v1/objects/84194a2f286ef7c14ed7ce0090dba59902951553/server.jar", + "author": "Mojang", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar server.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Vanilla] Minecraft 1.19.4", + "title": "Minecraft 1.19.4", + "runtime": "Java 19+", + "hardware": "RAM 2G+", + "size": "50MB", + "remark": "Minecraft Java", + "targetLink": "https://piston-data.mojang.com/v1/objects/8f3112a1049751cc472ec13e397eade5336ca7ae/server.jar", + "author": "Mojang", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar server.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Vanilla] Minecraft 1.18.2", + "title": "Minecraft 1.18.2", + "runtime": "Java 19+", + "hardware": "RAM 2G+", + "size": "45MB", + "remark": "Minecraft Java", + "targetLink": "https://piston-data.mojang.com/v1/objects/c8f83c5655308435b3dcf03c06d9fe8740a77469/server.jar", + "author": "Mojang", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar server.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Vanilla] Minecraft 1.17.1", + "title": "Minecraft 1.17.1", + "runtime": "Java 19+", + "hardware": "RAM 2G+", + "size": "45MB", + "remark": "Minecraft Java", + "targetLink": "https://piston-data.mojang.com/v1/objects/a16d67e5807f57fc4e550299cf20226194497dc2/server.jar", + "author": "Mojang", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar server.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Vanilla] Minecraft 1.16.5", + "title": "Minecraft 1.16.5", + "runtime": "Java 19+", + "hardware": "RAM 2G+", + "size": "45MB", + "remark": "Minecraft Java", + "targetLink": "https://piston-data.mojang.com/v1/objects/1b557e7b033b583cd9f66746b7a9ab1ec1673ced/server.jar", + "author": "Mojang", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar server.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Vanilla] Minecraft 1.12.2", + "title": "Minecraft 1.12.2", + "runtime": "Java 11+", + "hardware": "RAM 2G+", + "size": "30MB", + "remark": "Minecraft Java", + "targetLink": "https://piston-data.mojang.com/v1/objects/886945bfb2b978778c3a0288fd7fab09d315b25f/server.jar", + "author": "Mojang", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar server.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Vanilla] Minecraft 1.8.9", + "title": "Minecraft 1.8.9", + "runtime": "Java 8+", + "hardware": "RAM 2G+", + "size": "10MB", + "remark": "Minecraft Java", + "targetLink": "https://launcher.mojang.com/v1/objects/b58b2ceb36e01bcd8dbf49c8fb66c55a9f0676cd/server.jar", + "author": "Mojang", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar server.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "language": "zh_cn", "description": "[Paper] Minecraft 1.21.1 快速开服", From 5b19d5e4b34a1875145dce4d2feb6051c3b28c5d Mon Sep 17 00:00:00 2001 From: Antony Blem Date: Mon, 30 Dec 2024 12:16:44 +0100 Subject: [PATCH 104/338] fix: Correct required Java versions for each MC version --- templates.json | 78 +++++++++++++++++++++++++------------------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/templates.json b/templates.json index 7488ecc..f02c372 100644 --- a/templates.json +++ b/templates.json @@ -15,7 +15,7 @@ "language": "en_us", "description": "[Purpur] Minecraft 1.21.3 Purpur", "title": "Minecraft 1.21.3", - "runtime": "Java 22", + "runtime": "Java 21+", "hardware": "RAM 4G+", "size": "50MB", "remark": "Only Purpur included", @@ -34,7 +34,7 @@ "language": "en_us", "description": "[Purpur] Minecraft 1.21.1 Purpur", "title": "Minecraft 1.21.1", - "runtime": "Java 22", + "runtime": "Java 21+", "hardware": "RAM 4G+", "size": "50MB", "remark": "Only Purpur included", @@ -53,7 +53,7 @@ "language": "en_us", "description": "[Purpur] Minecraft 1.20.6 Purpur", "title": "Minecraft 1.20.6", - "runtime": "Java 22", + "runtime": "Java 21+", "hardware": "RAM 4G+", "size": "50MB", "remark": "Only Purpur included", @@ -72,7 +72,7 @@ "language": "en_us", "description": "[Purpur] Minecraft 1.20.4 Purpur", "title": "Minecraft 1.20.4", - "runtime": "Java 22", + "runtime": "Java 21+", "hardware": "RAM 4G+", "size": "50MB", "remark": "Only Purpur included", @@ -91,7 +91,7 @@ "language": "en_us", "description": "[Purpur] Minecraft 1.20.1 Purpur", "title": "Minecraft 1.20.1", - "runtime": "Java 22", + "runtime": "Java 17+", "hardware": "RAM 4G+", "size": "50MB", "remark": "Only Purpur included", @@ -110,7 +110,7 @@ "language": "en_us", "description": "[Purpur] Minecraft 1.19.2 Purpur", "title": "Minecraft 1.19.2", - "runtime": "Java 22", + "runtime": "Java 17+", "hardware": "RAM 4G+", "size": "50MB", "remark": "Only Purpur included", @@ -129,7 +129,7 @@ "language": "en_us", "description": "[Purpur] Minecraft 1.18.2 Purpur", "title": "Minecraft 1.18.2", - "runtime": "Java 22", + "runtime": "Java 17+", "hardware": "RAM 4G+", "size": "50MB", "remark": "Only Purpur included", @@ -148,7 +148,7 @@ "language": "en_us", "description": "[Purpur] Minecraft 1.17.1 Purpur", "title": "Minecraft 1.17.1", - "runtime": "Java 17", + "runtime": "Java 16+", "hardware": "RAM 4G+", "size": "50MB", "remark": "Only Purpur included", @@ -167,7 +167,7 @@ "language": "en_us", "description": "[Purpur] Minecraft 1.16.5 Purpur", "title": "Minecraft 1.16.5", - "runtime": "Java 17", + "runtime": "Java 8+", "hardware": "RAM 4G+", "size": "50MB", "remark": "Only Purpur included", @@ -186,7 +186,7 @@ "language": "en_us", "description": "[Paper] Minecraft 1.21.3 Paper", "title": "Minecraft 1.21.3", - "runtime": "Java 22", + "runtime": "Java 21+", "hardware": "RAM 4G+", "size": "50MB", "remark": "Only Paper included", @@ -205,7 +205,7 @@ "language": "en_us", "description": "[Paper] Minecraft 1.21.1 Paper", "title": "Minecraft 1.21.1", - "runtime": "Java 22", + "runtime": "Java 21+", "hardware": "RAM 4G+", "size": "50MB", "remark": "Only Paper included", @@ -224,7 +224,7 @@ "language": "en_us", "description": "[Paper] Minecraft 1.20.6 Paper", "title": "Minecraft 1.20.6", - "runtime": "Java 21", + "runtime": "Java 21+", "hardware": "RAM 4G+", "size": "50MB", "remark": "Only Paper included", @@ -243,7 +243,7 @@ "language": "en_us", "description": "[Paper] Minecraft 1.20.4 Paper", "title": "Minecraft 1.20.4", - "runtime": "Java 21", + "runtime": "Java 21+", "hardware": "RAM 4G+", "size": "50MB", "remark": "Only Paper included", @@ -262,7 +262,7 @@ "language": "en_us", "description": "[Paper] Minecraft 1.20.2 Paper", "title": "Minecraft 1.20.2", - "runtime": "Java 21", + "runtime": "Java 17+", "hardware": "RAM 4G+", "size": "150MB", "remark": "Includes some basic plugins", @@ -281,7 +281,7 @@ "language": "en_us", "description": "[Paper] Minecraft 1.20.1 Paper", "title": "Minecraft 1.20.1", - "runtime": "Java 21", + "runtime": "Java 17+", "hardware": "RAM 4G+", "size": "200MB", "remark": "Includes some basic plugins", @@ -300,7 +300,7 @@ "language": "en_us", "description": "[Paper] Minecraft 1.19.4 Paper", "title": "Minecraft 1.19.4", - "runtime": "Java 21", + "runtime": "Java 17+", "hardware": "RAM 4G+", "size": "50MB", "remark": "Only Paper included", @@ -319,7 +319,7 @@ "language": "en_us", "description": "[Paper] Minecraft 1.19.2 Paper", "title": "Minecraft 1.19.2", - "runtime": "Java 21", + "runtime": "Java 17+", "hardware": "RAM 4G+", "size": "50MB", "remark": "Only Paper included", @@ -338,7 +338,7 @@ "language": "en_us", "description": "[Paper] Minecraft 1.18.2 Paper", "title": "Minecraft 1.18.2", - "runtime": "Java 21", + "runtime": "Java 17+", "hardware": "RAM 4G+", "size": "50MB", "remark": "Only Paper included", @@ -357,7 +357,7 @@ "language": "en_us", "description": "[Paper] Minecraft 1.17.1 Paper", "title": "Minecraft 1.17.1", - "runtime": "Java 21", + "runtime": "Java 16+", "hardware": "RAM 4G+", "size": "60MB", "remark": "Only Paper included", @@ -376,7 +376,7 @@ "language": "en_us", "description": "[Paper] Minecraft 1.16.5 Paper", "title": "Minecraft 1.16.5", - "runtime": "Java 21", + "runtime": "Java 8+", "hardware": "RAM 4G+", "size": "50MB", "remark": "Only Paper included", @@ -395,7 +395,7 @@ "language": "en_us", "description": "[Paper] Minecraft 1.12.2 Paper", "title": "Minecraft 1.12.2", - "runtime": "Java 21", + "runtime": "Java 8+", "hardware": "RAM 4G+", "size": "50MB", "remark": "Only Paper included", @@ -414,7 +414,7 @@ "language": "en_us", "description": "[Paper] Minecraft 1.8.8 Paper", "title": "Minecraft 1.8.8", - "runtime": "Java 21", + "runtime": "Java 7+", "hardware": "RAM 4G+", "size": "20MB", "remark": "Only Paper included", @@ -528,7 +528,7 @@ "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"start.bat\" after installation.", "title": "Forge 1.20.1 (Supports Mods)", - "runtime": "Java 21+", + "runtime": "Java 17+", "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", @@ -604,7 +604,7 @@ "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"start.bat\" after installation.", "title": "Forge 1.17.1 (Supports Mods)", - "runtime": "Java 17+", + "runtime": "Java 16+", "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", @@ -623,7 +623,7 @@ "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"start.bat\" after installation.", "title": "Forge 1.16.5 (Supports Mods)", - "runtime": "Java 17+", + "runtime": "Java 8+", "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", @@ -642,7 +642,7 @@ "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"start.bat\" after installation.", "title": "Forge 1.12.2 (Supports Mods)", - "runtime": "Java 17+", + "runtime": "Java 8+", "hardware": "RAM 8G+", "size": "5MB", "remark": "Minecraft Forge", @@ -661,7 +661,7 @@ "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"start.bat\" after installation.", "title": "Forge 1.8.9 (Supports Mods)", - "runtime": "Java 17+", + "runtime": "Java 7+", "hardware": "RAM 8G+", "size": "5MB", "remark": "Minecraft Forge", @@ -680,7 +680,7 @@ "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"start.bat\" after installation.", "title": "Forge 1.7.10 (Supports Mods)", - "runtime": "Java 17+", + "runtime": "Java 7+", "hardware": "RAM 8G+", "size": "5MB", "remark": "Minecraft Forge", @@ -794,7 +794,7 @@ "language": "en_us", "description": "[Fabric] Minecraft 1.20.1 Fabric", "title": "Minecraft 1.20.1 with Fabric Loader", - "runtime": "Java 21+", + "runtime": "Java 17+", "hardware": "RAM 4G+", "size": "5MB", "remark": "Minecraft Fabric", @@ -1022,7 +1022,7 @@ "language": "en_us", "description": "[Vanilla] Minecraft 1.20.1", "title": "Minecraft 1.20.1", - "runtime": "Java 21+", + "runtime": "Java 17+", "hardware": "RAM 2G+", "size": "50MB", "remark": "Minecraft Java", @@ -1041,7 +1041,7 @@ "language": "en_us", "description": "[Vanilla] Minecraft 1.19.4", "title": "Minecraft 1.19.4", - "runtime": "Java 19+", + "runtime": "Java 17+", "hardware": "RAM 2G+", "size": "50MB", "remark": "Minecraft Java", @@ -1060,7 +1060,7 @@ "language": "en_us", "description": "[Vanilla] Minecraft 1.18.2", "title": "Minecraft 1.18.2", - "runtime": "Java 19+", + "runtime": "Java 17+", "hardware": "RAM 2G+", "size": "45MB", "remark": "Minecraft Java", @@ -1079,7 +1079,7 @@ "language": "en_us", "description": "[Vanilla] Minecraft 1.17.1", "title": "Minecraft 1.17.1", - "runtime": "Java 19+", + "runtime": "Java 16+", "hardware": "RAM 2G+", "size": "45MB", "remark": "Minecraft Java", @@ -1098,7 +1098,7 @@ "language": "en_us", "description": "[Vanilla] Minecraft 1.16.5", "title": "Minecraft 1.16.5", - "runtime": "Java 19+", + "runtime": "Java 8+", "hardware": "RAM 2G+", "size": "45MB", "remark": "Minecraft Java", @@ -1117,7 +1117,7 @@ "language": "en_us", "description": "[Vanilla] Minecraft 1.12.2", "title": "Minecraft 1.12.2", - "runtime": "Java 11+", + "runtime": "Java 8+", "hardware": "RAM 2G+", "size": "30MB", "remark": "Minecraft Java", @@ -1136,7 +1136,7 @@ "language": "en_us", "description": "[Vanilla] Minecraft 1.8.9", "title": "Minecraft 1.8.9", - "runtime": "Java 8+", + "runtime": "Java 7+", "hardware": "RAM 2G+", "size": "10MB", "remark": "Minecraft Java", @@ -1155,7 +1155,7 @@ "language": "zh_cn", "description": "[Paper] Minecraft 1.21.1 快速开服", "title": "Minecraft 1.20.1", - "runtime": "Java 22", + "runtime": "Java 17+", "hardware": "RAM 4G+", "size": "250MB", "remark": "包含基础插件,萌新快速开服!低配机器专属!", @@ -1174,7 +1174,7 @@ "language": "zh_cn", "description": "[Paper] 中小型互通服推荐,1.20.4 版本,快速开服,包含ESS、锁箱子、操作回滚、领地商店等基础插件。", "title": "Minecraft 1.20.4 (低配机器推荐)", - "runtime": "Java 17+", + "runtime": "Java 21+", "hardware": "RAM 6G+", "size": "140MB", "remark": "支持插件,最低 8GB 内存要求", @@ -1193,7 +1193,7 @@ "language": "zh_cn", "description": "注意:默认的启动命令是 \"sh ./run.sh\",如果需要在 Windows 上运行,请在安装后将命令修改为 \"start.bat\"", "title": "Forge 1.20.1 Java 版 (支持模组)", - "runtime": "Java 21+", + "runtime": "Java 17+", "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", From b12d5ab9b8ec3d5c737affceddcbc7b48dc493ad Mon Sep 17 00:00:00 2001 From: Antony Blem Date: Mon, 13 Jan 2025 19:50:13 +0100 Subject: [PATCH 105/338] feat: Add PaperMC Build 1.21.4-107 as a Server template --- templates.json | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/templates.json b/templates.json index f02c372..f3f3d82 100644 --- a/templates.json +++ b/templates.json @@ -182,6 +182,25 @@ "oe": "utf-8" } }, + { + "language": "en_us", + "description": "[Paper] Minecraft 1.21.4 Paper", + "title": "Minecraft 1.21.4", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Paper included", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/107/downloads/paper-1.21.4-107.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java/paper", + "startCommand": "java -jar paper-1.21.4-107.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "language": "en_us", "description": "[Paper] Minecraft 1.21.3 Paper", From 8376dbfb1084190499de545a00f220308064caf9 Mon Sep 17 00:00:00 2001 From: Antony Date: Tue, 14 Jan 2025 07:58:52 +0100 Subject: [PATCH 106/338] feat: Update Paper Build to 1.21.4-109 --- templates.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates.json b/templates.json index f3f3d82..983b65d 100644 --- a/templates.json +++ b/templates.json @@ -190,11 +190,11 @@ "hardware": "RAM 4G+", "size": "50MB", "remark": "Only Paper included", - "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/107/downloads/paper-1.21.4-107.jar", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/109/downloads/paper-1.21.4-109.jar", "author": "papermc.io", "setupInfo": { "type": "minecraft/java/paper", - "startCommand": "java -jar paper-1.21.4-107.jar nogui", + "startCommand": "java -jar paper-1.21.4-109.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", From 57f5d21a45310e64860f044abce59769d7a7a553 Mon Sep 17 00:00:00 2001 From: Unitwk Date: Tue, 14 Jan 2025 16:44:02 +0800 Subject: [PATCH 107/338] fix: del purpur packs --- templates.json | 173 +------------------------------------------------ 1 file changed, 1 insertion(+), 172 deletions(-) diff --git a/templates.json b/templates.json index f3f3d82..4893e66 100644 --- a/templates.json +++ b/templates.json @@ -11,177 +11,6 @@ } ], "packages": [ - { - "language": "en_us", - "description": "[Purpur] Minecraft 1.21.3 Purpur", - "title": "Minecraft 1.21.3", - "runtime": "Java 21+", - "hardware": "RAM 4G+", - "size": "50MB", - "remark": "Only Purpur included", - "targetLink": "https://api.purpurmc.org/v2/purpur/1.21.3/2358/download", - "author": "purpurmc.org", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "java -jar purpur-1.21.3-2358.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "description": "[Purpur] Minecraft 1.21.1 Purpur", - "title": "Minecraft 1.21.1", - "runtime": "Java 21+", - "hardware": "RAM 4G+", - "size": "50MB", - "remark": "Only Purpur included", - "targetLink": "https://api.purpurmc.org/v2/purpur/1.21.1/2329/download", - "author": "purpurmc.org", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "java -jar purpur-1.21.1-2329.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "description": "[Purpur] Minecraft 1.20.6 Purpur", - "title": "Minecraft 1.20.6", - "runtime": "Java 21+", - "hardware": "RAM 4G+", - "size": "50MB", - "remark": "Only Purpur included", - "targetLink": "https://api.purpurmc.org/v2/purpur/1.20.6/2233/download", - "author": "purpurmc.org", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "java -jar purpur-1.20.6-2233.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "description": "[Purpur] Minecraft 1.20.4 Purpur", - "title": "Minecraft 1.20.4", - "runtime": "Java 21+", - "hardware": "RAM 4G+", - "size": "50MB", - "remark": "Only Purpur included", - "targetLink": "https://api.purpurmc.org/v2/purpur/1.20.4/2176/download", - "author": "purpurmc.org", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "java -jar purpur-1.20.4-2176.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "description": "[Purpur] Minecraft 1.20.1 Purpur", - "title": "Minecraft 1.20.1", - "runtime": "Java 17+", - "hardware": "RAM 4G+", - "size": "50MB", - "remark": "Only Purpur included", - "targetLink": "https://api.purpurmc.org/v2/purpur/1.20.1/2062/download", - "author": "purpurmc.org", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "java -jar purpur-1.20.1-2062.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "description": "[Purpur] Minecraft 1.19.2 Purpur", - "title": "Minecraft 1.19.2", - "runtime": "Java 17+", - "hardware": "RAM 4G+", - "size": "50MB", - "remark": "Only Purpur included", - "targetLink": "https://api.purpurmc.org/v2/purpur/1.19.2/1858/download", - "author": "purpurmc.org", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "java -jar purpur-1.19.2-1858.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "description": "[Purpur] Minecraft 1.18.2 Purpur", - "title": "Minecraft 1.18.2", - "runtime": "Java 17+", - "hardware": "RAM 4G+", - "size": "50MB", - "remark": "Only Purpur included", - "targetLink": "https://api.purpurmc.org/v2/purpur/1.18.2/1632/download", - "author": "purpurmc.org", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "java -jar purpur-1.18.2-1632.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "description": "[Purpur] Minecraft 1.17.1 Purpur", - "title": "Minecraft 1.17.1", - "runtime": "Java 16+", - "hardware": "RAM 4G+", - "size": "50MB", - "remark": "Only Purpur included", - "targetLink": "https://api.purpurmc.org/v2/purpur/1.17.1/1428/download", - "author": "purpurmc.org", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "java -jar purpur-1.17.1-1428.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "description": "[Purpur] Minecraft 1.16.5 Purpur", - "title": "Minecraft 1.16.5", - "runtime": "Java 8+", - "hardware": "RAM 4G+", - "size": "50MB", - "remark": "Only Purpur included", - "targetLink": "https://api.purpurmc.org/v2/purpur/1.16.5/1171/download", - "author": "purpurmc.org", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "java -jar purpur-1.16.5-1171.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, { "language": "en_us", "description": "[Paper] Minecraft 1.21.4 Paper", @@ -427,7 +256,7 @@ "updateCommand": "", "ie": "utf-8", "oe": "utf-8" - } + } }, { "language": "en_us", From 89e073e50c8a17216b963afea23f39a5ce9606b2 Mon Sep 17 00:00:00 2001 From: Antony Date: Tue, 14 Jan 2025 11:41:50 +0000 Subject: [PATCH 108/338] fix: Hopefully fix Purpur Server Versions --- templates.json | 171 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 171 insertions(+) diff --git a/templates.json b/templates.json index 9fd08b6..6fa5b4c 100644 --- a/templates.json +++ b/templates.json @@ -11,6 +11,177 @@ } ], "packages": [ + { + "language": "en_us", + "description": "[Purpur] Minecraft 1.21.3 Purpur", + "title": "Minecraft 1.21.3", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Purpur included", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/raw/refs/heads/master/purpur/purpur-1.21.3-2358.jar", + "author": "purpurmc.org", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar purpur-1.21.3-2358.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Purpur] Minecraft 1.21.1 Purpur", + "title": "Minecraft 1.21.1", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Purpur included", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/raw/refs/heads/master/purpur/purpur-1.21.1-2329.jar", + "author": "purpurmc.org", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar purpur-1.21.1-2329.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Purpur] Minecraft 1.20.6 Purpur", + "title": "Minecraft 1.20.6", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Purpur included", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/raw/refs/heads/master/purpur/purpur-1.20.6-2233.jar", + "author": "purpurmc.org", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar purpur-1.20.6-2233.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Purpur] Minecraft 1.20.4 Purpur", + "title": "Minecraft 1.20.4", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Purpur included", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/raw/refs/heads/master/purpur/purpur-1.20.4-2176.jar", + "author": "purpurmc.org", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar purpur-1.20.4-2176.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Purpur] Minecraft 1.20.1 Purpur", + "title": "Minecraft 1.20.1", + "runtime": "Java 17+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Purpur included", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/raw/refs/heads/master/purpur/purpur-1.20.1-2062.jar", + "author": "purpurmc.org", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar purpur-1.20.1-2062.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Purpur] Minecraft 1.19.2 Purpur", + "title": "Minecraft 1.19.2", + "runtime": "Java 17+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Purpur included", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/raw/refs/heads/master/purpur/purpur-1.19.2-1858.jar", + "author": "purpurmc.org", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar purpur-1.19.2-1858.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Purpur] Minecraft 1.18.2 Purpur", + "title": "Minecraft 1.18.2", + "runtime": "Java 17+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Purpur included", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/raw/refs/heads/master/purpur/purpur-1.18.2-1632.jar", + "author": "purpurmc.org", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar purpur-1.18.2-1632.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Purpur] Minecraft 1.17.1 Purpur", + "title": "Minecraft 1.17.1", + "runtime": "Java 16+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Purpur included", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/raw/refs/heads/master/purpur/purpur-1.17.1-1428.jar", + "author": "purpurmc.org", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar purpur-1.17.1-1428.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Purpur] Minecraft 1.16.5 Purpur", + "title": "Minecraft 1.16.5", + "runtime": "Java 8+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Purpur included", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/raw/refs/heads/master/purpur/purpur-1.16.5-1171.jar", + "author": "purpurmc.org", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar purpur-1.16.5-1171.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "language": "en_us", "description": "[Paper] Minecraft 1.21.4 Paper", From 8de943a90e3f6775509680c52614b09bd22a59ff Mon Sep 17 00:00:00 2001 From: Antony Blem Date: Tue, 14 Jan 2025 15:32:18 +0100 Subject: [PATCH 109/338] fix: Update download links for Purpur to download from Releases --- templates.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/templates.json b/templates.json index 6fa5b4c..b4b55cb 100644 --- a/templates.json +++ b/templates.json @@ -19,7 +19,7 @@ "hardware": "RAM 4G+", "size": "50MB", "remark": "Only Purpur included", - "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/raw/refs/heads/master/purpur/purpur-1.21.3-2358.jar", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.3-2358.jar", "author": "purpurmc.org", "setupInfo": { "type": "minecraft/java", @@ -38,7 +38,7 @@ "hardware": "RAM 4G+", "size": "50MB", "remark": "Only Purpur included", - "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/raw/refs/heads/master/purpur/purpur-1.21.1-2329.jar", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.1-2329.jar", "author": "purpurmc.org", "setupInfo": { "type": "minecraft/java", @@ -57,7 +57,7 @@ "hardware": "RAM 4G+", "size": "50MB", "remark": "Only Purpur included", - "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/raw/refs/heads/master/purpur/purpur-1.20.6-2233.jar", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.20.6-2233.jar", "author": "purpurmc.org", "setupInfo": { "type": "minecraft/java", @@ -76,7 +76,7 @@ "hardware": "RAM 4G+", "size": "50MB", "remark": "Only Purpur included", - "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/raw/refs/heads/master/purpur/purpur-1.20.4-2176.jar", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.20.4-2176.jar", "author": "purpurmc.org", "setupInfo": { "type": "minecraft/java", @@ -95,7 +95,7 @@ "hardware": "RAM 4G+", "size": "50MB", "remark": "Only Purpur included", - "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/raw/refs/heads/master/purpur/purpur-1.20.1-2062.jar", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.20.1-2062.jar", "author": "purpurmc.org", "setupInfo": { "type": "minecraft/java", @@ -114,7 +114,7 @@ "hardware": "RAM 4G+", "size": "50MB", "remark": "Only Purpur included", - "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/raw/refs/heads/master/purpur/purpur-1.19.2-1858.jar", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.19.2-1858.jar", "author": "purpurmc.org", "setupInfo": { "type": "minecraft/java", @@ -133,7 +133,7 @@ "hardware": "RAM 4G+", "size": "50MB", "remark": "Only Purpur included", - "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/raw/refs/heads/master/purpur/purpur-1.18.2-1632.jar", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.18.2-1632.jar", "author": "purpurmc.org", "setupInfo": { "type": "minecraft/java", @@ -152,7 +152,7 @@ "hardware": "RAM 4G+", "size": "50MB", "remark": "Only Purpur included", - "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/raw/refs/heads/master/purpur/purpur-1.17.1-1428.jar", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.17.1-1428.jar", "author": "purpurmc.org", "setupInfo": { "type": "minecraft/java", @@ -171,7 +171,7 @@ "hardware": "RAM 4G+", "size": "50MB", "remark": "Only Purpur included", - "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/raw/refs/heads/master/purpur/purpur-1.16.5-1171.jar", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.16.5-1171.jar", "author": "purpurmc.org", "setupInfo": { "type": "minecraft/java", From d33a268aabdfebc378c5d98ecf8b61700ffa1b22 Mon Sep 17 00:00:00 2001 From: Antony Date: Thu, 16 Jan 2025 09:28:15 +0000 Subject: [PATCH 110/338] feat: Update Paper 1.21.4 Build to 114 --- templates.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates.json b/templates.json index b4b55cb..5a8534b 100644 --- a/templates.json +++ b/templates.json @@ -190,11 +190,11 @@ "hardware": "RAM 4G+", "size": "50MB", "remark": "Only Paper included", - "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/109/downloads/paper-1.21.4-109.jar", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/114/downloads/paper-1.21.4-114.jar", "author": "papermc.io", "setupInfo": { "type": "minecraft/java/paper", - "startCommand": "java -jar paper-1.21.4-109.jar nogui", + "startCommand": "java -jar paper-1.21.4-114.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", From 7c63ad939d8024dbffa0816b61a84be667e65962 Mon Sep 17 00:00:00 2001 From: LuckCrafter <63189107+LuckCrafter@users.noreply.github.com> Date: Wed, 22 Jan 2025 20:25:15 +0100 Subject: [PATCH 111/338] fix: pacman, download only if needed --- setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index df2211b..02c7223 100644 --- a/setup.sh +++ b/setup.sh @@ -214,7 +214,7 @@ if [[ -x "$(command -v yum)" ]]; then elif [[ -x "$(command -v apt-get)" ]]; then apt-get install -y git tar wget elif [[ -x "$(command -v pacman)" ]]; then - pacman -S --noconfirm git tar wget + pacman -S --noconfirm --needed git tar wget elif [[ -x "$(command -v zypper)" ]]; then zypper --non-interactive install git tar wget else From 58f55d95ec4d2c9454e5ef2de9bb988206136965 Mon Sep 17 00:00:00 2001 From: Antony Date: Thu, 23 Jan 2025 07:38:08 +0100 Subject: [PATCH 112/338] Update Paper 1.21.4 Build to 121 --- templates.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates.json b/templates.json index 5a8534b..6be769c 100644 --- a/templates.json +++ b/templates.json @@ -190,11 +190,11 @@ "hardware": "RAM 4G+", "size": "50MB", "remark": "Only Paper included", - "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/114/downloads/paper-1.21.4-114.jar", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/121/downloads/paper-1.21.4-121.jar", "author": "papermc.io", "setupInfo": { "type": "minecraft/java/paper", - "startCommand": "java -jar paper-1.21.4-114.jar nogui", + "startCommand": "java -jar paper-1.21.4-121.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", From 63edb89031b7b7e82b2498a38fc3227d718a6668 Mon Sep 17 00:00:00 2001 From: Antony Date: Sun, 26 Jan 2025 10:33:18 +0000 Subject: [PATCH 113/338] Update PaperMC 1.21.4 build to 126 --- templates.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates.json b/templates.json index 6be769c..61c26be 100644 --- a/templates.json +++ b/templates.json @@ -190,11 +190,11 @@ "hardware": "RAM 4G+", "size": "50MB", "remark": "Only Paper included", - "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/121/downloads/paper-1.21.4-121.jar", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/126/downloads/paper-1.21.4-126.jar", "author": "papermc.io", "setupInfo": { "type": "minecraft/java/paper", - "startCommand": "java -jar paper-1.21.4-121.jar nogui", + "startCommand": "java -jar paper-1.21.4-126.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", From 3cea46de3685a97ae30907f6a0c073a04b31e1a4 Mon Sep 17 00:00:00 2001 From: Antony Date: Tue, 28 Jan 2025 10:38:58 +0000 Subject: [PATCH 114/338] Update 1.21.4 PaperMC Build to 130 --- templates.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates.json b/templates.json index 61c26be..309eb18 100644 --- a/templates.json +++ b/templates.json @@ -190,11 +190,11 @@ "hardware": "RAM 4G+", "size": "50MB", "remark": "Only Paper included", - "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/126/downloads/paper-1.21.4-126.jar", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/130/downloads/paper-1.21.4-130.jar", "author": "papermc.io", "setupInfo": { "type": "minecraft/java/paper", - "startCommand": "java -jar paper-1.21.4-126.jar nogui", + "startCommand": "java -jar paper-1.21.4-130.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", From 7c02590058bd94648c8c388fbafc2c394f74474e Mon Sep 17 00:00:00 2001 From: Antony Date: Sat, 1 Feb 2025 10:15:28 +0000 Subject: [PATCH 115/338] Update PaperMC 1.21.4 Build to 136 --- templates.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates.json b/templates.json index 309eb18..f377747 100644 --- a/templates.json +++ b/templates.json @@ -190,11 +190,11 @@ "hardware": "RAM 4G+", "size": "50MB", "remark": "Only Paper included", - "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/130/downloads/paper-1.21.4-130.jar", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/136/downloads/paper-1.21.4-136.jar", "author": "papermc.io", "setupInfo": { "type": "minecraft/java/paper", - "startCommand": "java -jar paper-1.21.4-130.jar nogui", + "startCommand": "java -jar paper-1.21.4-136.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", From d55f47f17f31de248a2453cd9b7eb6057ed9e4ab Mon Sep 17 00:00:00 2001 From: Antony Date: Wed, 5 Feb 2025 11:15:32 +0000 Subject: [PATCH 116/338] Update PaperMC 1.21.4 Builds to 138 --- templates.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates.json b/templates.json index f377747..f177d8b 100644 --- a/templates.json +++ b/templates.json @@ -190,11 +190,11 @@ "hardware": "RAM 4G+", "size": "50MB", "remark": "Only Paper included", - "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/136/downloads/paper-1.21.4-136.jar", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/138/downloads/paper-1.21.4-138.jar", "author": "papermc.io", "setupInfo": { "type": "minecraft/java/paper", - "startCommand": "java -jar paper-1.21.4-136.jar nogui", + "startCommand": "java -jar paper-1.21.4-138.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", From 2d14480ab419df1f92c19972dcc2741ff4c30056 Mon Sep 17 00:00:00 2001 From: BuildTools Date: Fri, 7 Feb 2025 10:11:44 +0100 Subject: [PATCH 117/338] Add first Stable Build of PurpurMC 1.21.4 --- templates.json | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/templates.json b/templates.json index f177d8b..983887b 100644 --- a/templates.json +++ b/templates.json @@ -11,6 +11,25 @@ } ], "packages": [ + { + "language": "en_us", + "description": "[Purpur] Minecraft 1.21.4 Purpur", + "title": "Minecraft 1.21.4", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Purpur included", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.4-2389.jar", + "author": "purpurmc.org", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -jar purpur-1.21.4-2389.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "language": "en_us", "description": "[Purpur] Minecraft 1.21.3 Purpur", From 6013d22cc4f5656e75bc98d7a2965ca28f67e37f Mon Sep 17 00:00:00 2001 From: Antony Date: Sun, 16 Feb 2025 15:32:51 +0100 Subject: [PATCH 118/338] Update PaperMC 1.21.4 Build Previous Version will stay in the releases until the PR is accepted --- templates.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates.json b/templates.json index 983887b..10d67b3 100644 --- a/templates.json +++ b/templates.json @@ -19,11 +19,11 @@ "hardware": "RAM 4G+", "size": "50MB", "remark": "Only Purpur included", - "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.4-2389.jar", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.4-2394.jar", "author": "purpurmc.org", "setupInfo": { "type": "minecraft/java", - "startCommand": "java -jar purpur-1.21.4-2389.jar nogui", + "startCommand": "java -jar purpur-1.21.4-2394.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", From 300a78ba0dc69108db0f3c88d754a4298db8cf2c Mon Sep 17 00:00:00 2001 From: Antony Date: Thu, 20 Feb 2025 09:04:12 +0100 Subject: [PATCH 119/338] Update PurpurMC 1.21.4 Build --- templates.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates.json b/templates.json index 10d67b3..83b1431 100644 --- a/templates.json +++ b/templates.json @@ -19,11 +19,11 @@ "hardware": "RAM 4G+", "size": "50MB", "remark": "Only Purpur included", - "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.4-2394.jar", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.4-2398.jar", "author": "purpurmc.org", "setupInfo": { "type": "minecraft/java", - "startCommand": "java -jar purpur-1.21.4-2394.jar nogui", + "startCommand": "java -jar purpur-1.21.4-2398.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", From 07c7e45bf66f2d97a4fae4de9b1f2eabbeb4ea06 Mon Sep 17 00:00:00 2001 From: Antony Date: Thu, 20 Feb 2025 09:06:22 +0100 Subject: [PATCH 120/338] Update PaperMC 1.21.4 Builds --- templates.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates.json b/templates.json index 83b1431..e1c2575 100644 --- a/templates.json +++ b/templates.json @@ -209,11 +209,11 @@ "hardware": "RAM 4G+", "size": "50MB", "remark": "Only Paper included", - "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/138/downloads/paper-1.21.4-138.jar", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/173/downloads/paper-1.21.4-173.jar", "author": "papermc.io", "setupInfo": { "type": "minecraft/java/paper", - "startCommand": "java -jar paper-1.21.4-138.jar nogui", + "startCommand": "java -jar paper-1.21.4-173.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", From 7504839f25d3264a7fce66aea030bfc6bcba094b Mon Sep 17 00:00:00 2001 From: Antony Date: Thu, 20 Feb 2025 08:57:53 +0000 Subject: [PATCH 121/338] Update Forge Builds & Fix a Typo in the Forge Tips --- templates.json | 76 +++++++++++++++++++++++++------------------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/templates.json b/templates.json index e1c2575..f567240 100644 --- a/templates.json +++ b/templates.json @@ -469,178 +469,178 @@ }, { "language": "en_us", - "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"start.bat\" after installation.", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "Forge 1.21.4 (Supports Mods)", "runtime": "Java 21+", "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.4-54.0.12/forge-1.21.4-54.0.12-installer.jar", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.4-54.1.1/forge-1.21.4-54.1.1-installer.jar", "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar forge-1.21.4-54.0.12-installer.jar --installServer", + "updateCommand": "java -jar forge-1.21.4-54.1.1-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } }, { "language": "en_us", - "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"start.bat\" after installation.", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "Forge 1.21.3 (Supports Mods)", "runtime": "Java 21+", "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.3-53.0.33/forge-1.21.3-53.0.33-installer.jar", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.3-53.0.53/forge-1.21.3-53.0.53-installer.jar", "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar forge-1.21.3-53.0.33-installer.jar --installServer", + "updateCommand": "java -jar forge-1.21.3-53.0.53-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } }, { "language": "en_us", - "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"start.bat\" after installation.", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "Forge 1.21.1 (Supports Mods)", "runtime": "Java 21+", "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.1-52.0.37/forge-1.21.1-52.0.37-installer.jar", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.1-52.0.53/forge-1.21.1-52.0.53-installer.jar", "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar forge-1.21.1-52.0.37-installer.jar --installServer", + "updateCommand": "java -jar forge-1.21.1-52.0.53-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } }, { "language": "en_us", - "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"start.bat\" after installation.", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "Forge 1.20.6 (Supports Mods)", "runtime": "Java 21+", "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.6-50.1.31/forge-1.20.6-50.1.31-installer.jar", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.6-50.1.48/forge-1.20.6-50.1.48-installer.jar", "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar forge-1.20.6-50.1.31-installer.jar --installServer", + "updateCommand": "java -jar forge-1.20.6-50.1.48-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } }, { "language": "en_us", - "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"start.bat\" after installation.", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "Forge 1.20.4 (Supports Mods)", "runtime": "Java 21+", "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.4-49.1.21/forge-1.20.4-49.1.21-installer.jar", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.4-49.1.36/forge-1.20.4-49.1.36-installer.jar", "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar forge-1.20.4-49.1.21-installer.jar --installServer", + "updateCommand": "java -jar forge-1.20.4-49.1.36-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } }, { "language": "en_us", - "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"start.bat\" after installation.", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "Forge 1.20.1 (Supports Mods)", "runtime": "Java 17+", "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.1-47.3.22/forge-1.20.1-47.3.22-installer.jar", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.1-47.3.33/forge-1.20.1-47.3.33-installer.jar", "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar forge-1.20.1-47.3.22-installer.jar --installServer", + "updateCommand": "java -jar forge-1.20.1-47.3.33-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } }, { "language": "en_us", - "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"start.bat\" after installation.", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "Forge 1.19.4 (Supports Mods)", "runtime": "Java 17+", "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.19.4-45.3.15/forge-1.19.4-45.3.15-installer.jar", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.19.4-45.3.24/forge-1.19.4-45.3.24-installer.jar", "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar forge-1.19.4-45.3.15-installer.jar --installServer", + "updateCommand": "java -jar forge-1.19.4-45.3.24-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } }, { "language": "en_us", - "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"start.bat\" after installation.", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "Forge 1.19.2 (Supports Mods)", "runtime": "Java 17+", "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.19.2-43.4.12/forge-1.19.2-43.4.12-installer.jar", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.19.2-43.4.20/forge-1.19.2-43.4.20-installer.jar", "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar forge-1.19.2-43.4.12-installer.jar --installServer", + "updateCommand": "java -jar forge-1.19.2-43.4.20-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } }, { "language": "en_us", - "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"start.bat\" after installation.", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "Forge 1.18.2 (Supports Mods)", "runtime": "Java 17+", "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.18.2-40.2.31/forge-1.18.2-40.2.31-installer.jar", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.18.2-40.3.6/forge-1.18.2-40.3.6-installer.jar", "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar forge-1.18.2-40.2.31-installer.jar --installServer", + "updateCommand": "java -jar forge-1.18.2-40.3.6-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } }, { "language": "en_us", - "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"start.bat\" after installation.", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "Forge 1.17.1 (Supports Mods)", "runtime": "Java 16+", "hardware": "RAM 8G+", @@ -659,7 +659,7 @@ }, { "language": "en_us", - "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"start.bat\" after installation.", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "Forge 1.16.5 (Supports Mods)", "runtime": "Java 8+", "hardware": "RAM 8G+", @@ -678,7 +678,7 @@ }, { "language": "en_us", - "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"start.bat\" after installation.", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "Forge 1.12.2 (Supports Mods)", "runtime": "Java 8+", "hardware": "RAM 8G+", @@ -697,7 +697,7 @@ }, { "language": "en_us", - "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"start.bat\" after installation.", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "Forge 1.8.9 (Supports Mods)", "runtime": "Java 7+", "hardware": "RAM 8G+", @@ -716,7 +716,7 @@ }, { "language": "en_us", - "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"start.bat\" after installation.", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "Forge 1.7.10 (Supports Mods)", "runtime": "Java 7+", "hardware": "RAM 8G+", @@ -1235,13 +1235,13 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.1-47.2.32/forge-1.20.1-47.2.32-installer.jar", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.1-47.3.33/forge-1.20.1-47.3.33-installer.jar", "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar forge-1.20.1-47.2.32-installer.jar --installServer", + "updateCommand": "java -jar forge-1.20.1-47.3.33-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -1254,13 +1254,13 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.6-50.0.8/forge-1.20.6-50.0.8-installer.jar", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.6-50.1.48/forge-1.20.6-50.1.48-installer.jar", "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar forge-1.20.6-50.0.8-installer.jar --installServer", + "updateCommand": "java -jar forge-1.20.6-50.1.48-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -1273,13 +1273,13 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.19.2-43.3.13/forge-1.19.2-43.3.13-installer.jar", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.19.2-43.4.20/forge-1.19.2-43.4.20-installer.jar", "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar forge-1.19.2-43.3.13-installer.jar --installServer", + "updateCommand": "java -jar forge-1.19.2-43.4.20-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } From f5bfb2cf5a7f7298d6b85d1343d445ae102f463e Mon Sep 17 00:00:00 2001 From: Unitwk Date: Tue, 25 Feb 2025 14:26:48 +0800 Subject: [PATCH 122/338] feat: update install sh --- LICENSE | 2 +- README.md | 2 +- install_update.sh | 607 ------------------------------------------- install_update_cn.sh | 605 ------------------------------------------ package-lock.json | 6 - package.json | 8 - setup.sh | 227 ++++++++-------- setup_cn.sh | 10 +- 8 files changed, 117 insertions(+), 1350 deletions(-) delete mode 100644 install_update.sh delete mode 100644 install_update_cn.sh delete mode 100644 package-lock.json delete mode 100644 package.json diff --git a/LICENSE b/LICENSE index bfd24f9..83ffde2 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2021 Suwings +Copyright (c) 2025 MCSManager Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 8e861f7..e71e2f7 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,6 @@ The files here are all platform-wide install, delete, update scripts, etc. for MCSManager. -The default installation script on the official website is the `setup.sh` file of gitee repository, it contains multiple languages. +The default installation script on the official website is the `setup.sh` file of Github repository, it contains multiple languages. You can also use the following one-click command to perform a quick installation diff --git a/install_update.sh b/install_update.sh deleted file mode 100644 index c7986f7..0000000 --- a/install_update.sh +++ /dev/null @@ -1,607 +0,0 @@ -#!/bin/bash - -#Global varialbles -# System architecture -arch=$(uname -m) -# Install base dir -install_base="/opt" -# MCSM install dir -mcsmanager_install_path="${install_base}/mcsmanager" -# MCSM backup dir during upgrade -mcsm_backup_dir="${install_base}" -# Download URL -mcsmanager_download_addr="https://github.com/MCSManager/MCSManager/releases/latest/download/mcsmanager_linux_release.tar.gz " -# Node.js version to install -node="v20.12.2" -# MCSM Web dir name -mcsm_web="web" -# MCSM daemon dir name -mcsm_daemon="daemon" -# The date variable to be shared across functions -current_date=$(date +%Y_%m_%d) -# MCSM local temp dir for downloaded source -mcsm_down_temp="/opt/mcsmanager_${current_date}" -# Service file for MCSCM Web -service_file_web="/etc/systemd/system/mcsm-web.service" -# Service file for MCSM daemon -service_file_daemon="/etc/systemd/system/mcsm-daemon.service" -# Default systemd user is 'mcsm' -USER="mcsm" -COMMAND="all" -# Created backup absolute path -backup_path="" -# Downloaded package name -package_name="${mcsmanager_download_addr##*/}" -# Node.js install dir -node_install_path="" - -# Helper Functions -Usage() { - echo "Usage: $0 [-u user] [-c command]" - echo " -u Specify the user (mcsm or root), default is 'mcsm'" - echo " -c Specify the command (web, daemon, or all), default is 'all'" - exit 1 -} -Red_Error() { - echo '=================================================' - printf '\033[1;31;40m%b\033[0m\n' "$@" - echo '=================================================' - exit 1 -} -Echo_Cyan() { - printf '\033[1;36m%b\033[0m\n' "$@" -} -Echo_Red() { - printf '\033[1;31m%b\033[0m\n' "$@" -} - -Echo_Green() { - printf '\033[1;32m%b\033[0m\n' "$@" -} - -Echo_Cyan_N() { - printf '\033[1;36m%b\033[0m' "$@" -} - -Echo_Yellow() { - printf '\033[1;33m%b\033[0m\n' "$@" -} - -# Check root permission -Check_Sudo() { - if [ "$EUID" -ne 0 ]; then - echo "This script must be run as root. Please use \"sudo or root user\" instead." - exit 1 - fi -} - -Install_Dependencies() { - # Install related software - Echo_Cyan "[+] Installing dependent software (git, tar, wget)... " - if [[ -x "$(command -v yum)" ]]; then - yum install -y git tar wget - elif [[ -x "$(command -v apt-get)" ]]; then - apt-get install -y git tar wget - elif [[ -x "$(command -v pacman)" ]]; then - pacman -S --noconfirm git tar wget - elif [[ -x "$(command -v zypper)" ]]; then - zypper --non-interactive install git tar wget - else - Echo_Red "[!] Cannot find your package manager! You may need to install git, tar and wget manually!" - fi - - # Determine whether the relevant software is installed successfully - if [[ -x "$(command -v git)" && -x "$(command -v tar)" && -x "$(command -v wget)" ]]; then - Echo_Green "Success" - else - Red_Error "[x] Failed to find git, tar and wget, please install them manually!" - fi - -} - -Install_Node() { - if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then - Echo_Green "Desired Node.js is already installed at the target dir, bypassing installation..." - else - Echo_Cyan_N "[+] Install Node.js environment...\n" - - rm -irf "$node_install_path" - - cd /opt || Red_Error "[x] Failed to enter /opt" - - rm -rf "node-$node-linux-$arch.tar.gz" - - wget "https://nodejs.org/dist/$node/node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to download node release" - - tar -zxf "node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to untar node" - - rm -rf "node-$node-linux-$arch.tar.gz" - - if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then - Echo_Green "Success" - else - Red_Error "[x] Node installation failed!" - fi - fi - - - echo - Echo_Yellow "=============== Node.js Version ===============" - Echo_Yellow " node: $("$node_install_path"/bin/node -v)" - Echo_Yellow " npm: v$(env "$node_install_path"/bin/node "$node_install_path"/bin/npm -v)" - Echo_Yellow "=============== Node.js Version ===============" - echo - sleep 1 -} -# Check and download MCSM source -Check_And_Download_Source() { - # Empty the temp dir if existed - rm -rf "$mcsm_down_temp" - mkdir -p "$mcsm_down_temp" - - # Download the archive directly into the temporary directory - wget -O "${mcsm_down_temp}/${package_name}" "$mcsmanager_download_addr" || Red_Error "[x] Failed to download MCSManager releases..." - if [ $? -ne 0 ]; then - Red_Error "MCSManager Download failed." - fi - - # Extract the archive without changing directories - tar -xzf "${mcsm_down_temp}/${package_name}" -C "$mcsm_down_temp" - if [ $? -ne 0 ]; then - Red_Error "Extraction failed." - fi - - # Clean up the downloaded tar.gz file - rm "${mcsm_down_temp}/${package_name}" -} -# Detect architecture -Detect_Architecture() { - if [[ $arch == x86_64 ]]; then - arch="x64" - #echo "[-] x64 architecture detected" - elif [[ $arch == aarch64 ]]; then - arch="arm64" - #echo "[-] 64-bit ARM architecture detected" - elif [[ $arch == arm ]]; then - arch="armv7l" - #echo "[-] 32-bit ARM architecture detected" - elif [[ $arch == ppc64le ]]; then - arch="ppc64le" - #echo "[-] IBM POWER architecture detected" - elif [[ $arch == s390x ]]; then - arch="s390x" - #echo "[-] IBM LinuxONE architecture detected" - else - Red_Error "[x] Sorry, this architecture is not supported yet!\n[x]Please try to install manually: https://github.com/MCSManager/MCSManager#linux" - fi - - node_install_path="${install_base}/node-$node-linux-$arch" -} -# Initialization -Initialize() { - Echo_Cyan "+---------------------------------------------------------------------- -| MCSManager V10 Installation & Upgrading Script -+---------------------------------------------------------------------- - " - - # Check sudo - Check_Sudo - - # Update architecture - Detect_Architecture - - # Check if install base (/opt) exist - mkdir -p "$install_base" - - # Check dependencies - Install_Dependencies - - # Check and download MCSM source - Check_And_Download_Source - - # Parse input arguments - Parse_Arguments "$@" - - # Create mcsm user if needed - if [[ "$USER" == *"mcsm"* ]]; then - # Create the user 'mcsm' if it doesn't already exist - if ! id "mcsm" &>/dev/null; then - /usr/sbin/useradd mcsm - Echo_Green "User 'mcsm' created." - else - Echo_Yellow "User 'mcsm' already exists." - fi - fi -} - -Backup_MCSM() { - # Ensure both directories are provided - if [ -z "$mcsmanager_install_path" ] || [ -z "$mcsm_backup_dir" ]; then - Red_Error "Error: Backup or source path not set." - fi - - # Check if the source directory exists - if [ ! -d "$mcsmanager_install_path" ]; then - Red_Error "Error: Source directory does not exist." - fi - - # Create backup directory (/opt) if it doesn't exist - if [ ! -d "$mcsm_backup_dir" ]; then - Echo_Yellow "Creating backup directory." - mkdir -p "$mcsm_backup_dir" - fi - - # Define the backup path - backup_path="${mcsm_backup_dir}/mcsm_backup_${current_date}.tar.gz" - - # Create the backup - Echo_Yellow "Creating backup..." - #tar -czf "$backup_path" -C "$mcsmanager_install_path" . - tar -czf "$backup_path" -C "$(dirname "$mcsmanager_install_path")" "$(basename "$mcsmanager_install_path")" - - - # Check if the backup was successful - if [ $? -eq 0 ]; then - Echo_Green "Successfully created backup at $backup_path" - else - Red_Error "Error creating backup." - fi -} -# MCSM Web Base Installation -# Assuming a fresh install (i.e. no file(s) from previous installation) and downloaded source -Install_MCSM_Web_Base() { - # Move downloaded path - mv "${mcsm_down_temp}/${mcsm_web}" "$web_path" || - # Move helper file(s) - mv "${mcsm_down_temp}/start-web.sh" "${mcsmanager_install_path}/start-web.sh" - # Move back the data directory only if existed - if [ -d "$web_data_tmp" ]; then - rm -rf "$web_data" - mv "${web_data_tmp}" "${web_data}" - fi - # Dependencies install - cd "${web_path}" || Red_Error "[x] Failed to enter ${web_path}" - # Install dependencies - Echo_Cyan "[+] Install MCSManager-Web dependencies..." - env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${web_path}" - # Return to general dir - cd "$mcsmanager_install_path" - # Configure ownership if needed - if [[ "$USER" == *"mcsm"* ]]; then - # Change file permission to mcsm user - chown -R mcsm:mcsm "$web_path" - else - # Change file permission to root user - chown -R root:root "$web_path" - fi - chmod -R 755 "$web_path" -} -# MCSM Web Service Installation -Install_Web_Systemd() { - Echo_Cyan "[+] Creating MCSManager Web service..." - # stop and disable existing service - systemctl disable --now mcsm-web - - # delete existing service - rm -rf "$service_file_web" - systemctl daemon-reload - - # Create the default service file - echo "[Unit] -Description=MCSManager-Web - -[Service] -WorkingDirectory=${web_path} -ExecStart=${node_install_path}/bin/node app.js -ExecReload=/bin/kill -s QUIT \$MAINPID -ExecStop=/bin/kill -s QUIT \$MAINPID -Environment=\"PATH=${PATH}\" - -[Install] -WantedBy=multi-user.target -" >"$service_file_web" - - # Add user section if using mcsm user - if [[ "$USER" == *"mcsm"* ]]; then - # Check if the 'User=mcsm' line already exists in the service file - if grep -q "^User=mcsm$" "$service_file_web"; then - echo "The service file is configured already." - else - # Add 'User=mcsm' to the service file - sed -i '/^\[Service\]$/a User=mcsm' "$service_file_web" - fi - fi - # Reload Systemd Service - systemctl daemon-reload - systemctl enable --now mcsm-web -} - -# MCSM Web Update & Installation -Install_Web_Wrapper() { - web_path="${mcsmanager_install_path}/${mcsm_web}" - web_data="${web_path}/data" - web_data_tmp="${mcsmanager_install_path}/web_data_${current_date}" - if [ -d "$web_path" ]; then - Echo_Cyan "[+] Updating MCSManager Web..." - # The backup should be created already, moving the DATA dir to /opt/mcsmanager/web_data should be fast and safe. - # Use web_data, do not use data as in rare circumstance user may run both update at the same time. - # Use mv command, this won't create issue in case of an incomplete previous installation (e.g. empty mcsm dir) - mv "$web_data" "$web_data_tmp" - # Remove the old web dir - rm -rf "$web_path" - - else - Echo_Cyan "[+] Install MCSManager Web..." - fi - - - # Install MCSM Web - Install_MCSM_Web_Base - - # Install MCSM Web Service - Install_Web_Systemd -} - -# MCSM Daemon Base Installation -# Assuming a fresh install (i.e. no file(s) from previous installation) and downloaded source -Install_MCSM_Daemon_Base() { - # Move downloaded path - mv "${mcsm_down_temp}/${mcsm_daemon}" "$daemon_path" || - # Move helper file(s) - mv "${mcsm_down_temp}/start-daemon.sh" "${mcsmanager_install_path}/start-daemon.sh" - - # Move back the data directory only if existed - if [ -d "$daemon_data_tmp" ]; then - rm -rf "$daemon_data" - mv "${daemon_data_tmp}" "${daemon_data}" - fi - # Dependencies install - cd "${daemon_path}" || Red_Error "[x] Failed to enter ${daemon_path}" - # Install dependencies - Echo_Cyan "[+] Install MCSManager-Daemon dependencies..." - env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${daemon_path}" - # Return to general dir - cd "$mcsmanager_install_path" - # Configure ownership if needed - if [[ "$USER" == *"mcsm"* ]]; then - # Change file permission to mcsm user - chown -R mcsm:mcsm "$daemon_path" - else - # Change file permission to root user - chown -R root:root "$daemon_path" - fi - chmod -R 755 "$daemon_path" -} - -# MCSM Daemon Service Installation -Install_Daemon_Systemd() { - Echo_Cyan "[+] Creating MCSManager Daemon service..." - # stop and disable existing service - systemctl disable --now mcsm-daemon - - # delete existing service - rm -rf "$service_file_daemon" - systemctl daemon-reload - - # Create the default service file - echo "[Unit] -Description=MCSManager-Daemon - -[Service] -WorkingDirectory=${daemon_path} -ExecStart=${node_install_path}/bin/node app.js -ExecReload=/bin/kill -s QUIT \$MAINPID -ExecStop=/bin/kill -s QUIT \$MAINPID -Environment=\"PATH=${PATH}\" - -[Install] -WantedBy=multi-user.target -" >"$service_file_daemon" - - # Add user section if using mcsm user - if [[ "$USER" == *"mcsm"* ]]; then - # Check if the 'User=mcsm' line already exists in the service file - if grep -q "^User=mcsm$" "$service_file_daemon"; then - echo "The service file is configured already." - else - # Add 'User=mcsm' to the service file - sed -i '/^\[Service\]$/a User=mcsm' "$service_file_daemon" - fi - fi - # Reload Systemd Service - systemctl daemon-reload - systemctl enable --now mcsm-daemon -} -# MCSM Web Update & Installation -Install_Daemon_Wrapper() { - daemon_path="${mcsmanager_install_path}/${mcsm_daemon}" - daemon_data="${daemon_path}/data" - daemon_data_tmp="${mcsmanager_install_path}/daemon_data_${current_date}" - if [ -d "$daemon_path" ]; then - Echo_Cyan "[+] Updating MCSManager Daemon..." - # The backup should be created already, moving the DATA dir to /opt/mcsmanager/daemon_data should be fast and safe. - # Use daemon_data, do not use data as in rare circumstance user may run both update at the same time. - # Use mv command, this won't create issue in case of an incomplete previous installation (e.g. empty mcsm dir) - mv "$daemon_data" "$daemon_data_tmp" - # Remove the old daemon dir - rm -rf "$daemon_path" - - else - Echo_Cyan "[+] Install MCSManager daemon..." - fi - - # Install MCSM Web - Install_MCSM_Daemon_Base - - # Install MCSM Web Service - Install_Daemon_Systemd -} -# Arguments parsing -Parse_Arguments() { - while getopts "u:c:" opt; do - case ${opt} in - u ) - if [[ "${OPTARG}" == "mcsm" || "${OPTARG}" == "root" ]]; then - USER="${OPTARG}" - else - echo "Invalid user specified." - Usage - fi - ;; - c ) - if [[ "${OPTARG}" == "web" || "${OPTARG}" == "daemon" || "${OPTARG}" == "all" ]]; then - COMMAND="${OPTARG}" - else - echo "Invalid command specified." - Usage - fi - ;; - \? ) - Usage - ;; - : ) - echo "Option -$OPTARG requires an argument." - Usage - ;; - esac - done -} - -# Wrapper for installation -Install_Update() { - case "$COMMAND" in - all) - Install_Web_Wrapper - Install_Daemon_Wrapper - ;; - - web) - Install_Web_Wrapper - ;; - - daemon) - Install_Daemon_Wrapper - ;; - - *) - echo "Unknown command: $COMMAND, this should not happen in general :( Please report this bug." - # Exit with an error if COMMAND is unrecognized - exit 1 - ;; - esac -} -# Finalize installation -Finalize() { - #Clear screen - clear - #printf "\n\n\n\n" - echo "______ _______________________ ___" - echo "___ |/ /_ ____/_ ___/__ |/ /_____ _____________ _______ _____________" - echo "__ /|_/ /_ / _____ \__ /|_/ /_ __ \`/_ __ \ __ \`/_ __ \`/ _ \_ ___/" - echo "_ / / / / /___ ____/ /_ / / / / /_/ /_ / / / /_/ /_ /_/ // __/ /" - echo "/_/ /_/ \____/ /____/ /_/ /_/ \__,_/ /_/ /_/\__,_/ _\__, / \___//_/" - echo " /____/" - - case "$COMMAND" in - all) - Echo_Yellow "==================================================================" - Echo_Green "Installation is complete! Welcome to the MCSManager V10!!!" - Echo_Yellow " " - Echo_Cyan_N "HTTP Web Service: " - Echo_Yellow "http://:23333 (Browser)" - Echo_Cyan_N "Daemon Address: " - Echo_Yellow "ws://:24444 (Cluster)" - Echo_Red "You must expose ports 23333 and 24444 to use the service properly on the Internet." - Echo_Yellow " " - Echo_Cyan "Usage:" - Echo_Cyan "systemctl start mcsm-{daemon,web}.service" - Echo_Cyan "systemctl stop mcsm-{daemon,web}.service" - Echo_Cyan "systemctl restart mcsm-{daemon,web}.service" - Echo_Yellow " " - Echo_Green "Official Document: https://docs.mcsmanager.com/" - Echo_Yellow "==================================================================" - ;; - - web) - Echo_Yellow "==================================================================" - Echo_Green "Installation is complete! Welcome to the MCSManager V10!!!" - Echo_Yellow " " - Echo_Cyan_N "HTTP Web Service: " - Echo_Yellow "http://:23333 (Browser)" - Echo_Red "You must expose port 23333 to use the service properly on the Internet." - Echo_Yellow " " - Echo_Cyan "Usage:" - Echo_Cyan "systemctl start mcsm-web.service" - Echo_Cyan "systemctl stop mcsm-web.service" - Echo_Cyan "systemctl restart mcsm-web.service" - Echo_Yellow " " - Echo_Green "Official Document: https://docs.mcsmanager.com/" - Echo_Yellow "==================================================================" - ;; - - daemon) - Echo_Yellow "==================================================================" - Echo_Green "Installation is complete! Welcome to the MCSManager V10!!!" - Echo_Yellow " " - Echo_Cyan_N "Daemon Address: " - Echo_Yellow "ws://:24444 (Cluster)" - Echo_Red "You must expose port 24444 to use the service properly on the Internet." - Echo_Yellow " " - Echo_Cyan "Usage:" - Echo_Cyan "systemctl start mcsm-daemon.service" - Echo_Cyan "systemctl stop mcsm-daemon.service" - Echo_Cyan "systemctl restart mcsm-daemon.service" - Echo_Yellow " " - Echo_Green "Official Document: https://docs.mcsmanager.com/" - Echo_Yellow "==================================================================" - ;; - - *) - echo "Unknown command: $COMMAND, this should not happen in general :( Please report this bug." - # Exit with an error if COMMAND is unrecognized - exit 1 - ;; - esac - # Check if backup_path is not empty - if [[ -n "$backup_path" ]]; then - Echo_Green "Your MCSM has been updated from a previous installation. " - Echo_Green "A complete backup was created at:" - Echo_Yellow "$backup_path" - Echo_Green "You can manually delete the backup using command: " - Echo_Red "rm ${backup_path}" - fi - # Move quickstart.md - # mv "${mcsm_down_temp}/quick-start.md" "${mcsmanager_install_path}/quick-start.md" - # Remove the temp folder - rm -rf "${mcsm_down_temp}" - - -} -########### Main Logic ################ -Main() { - # Do not create mcsmanager path yet as it will break the logic detecting existing installation - Initialize "$@" - # Check if the mcsmanager_install_path exists - if [ -d "$mcsmanager_install_path" ]; then - # Backup first, due to potential large file being archived, backup is disabled. - # Backup_MCSM - # Install Node.js, this is to ensure the version is up to date. - Install_Node - - else - # Create mcsmanager path if not already - mkdir -p "$mcsmanager_install_path" - # Install Node.js, this is to ensure the version is up to date. - Install_Node - fi - - # Install Services based on command - Install_Update - - # Print helping Information - Finalize - - Echo_Green "Installation/Upgrading Complete!" -} - -Main "$@" \ No newline at end of file diff --git a/install_update_cn.sh b/install_update_cn.sh deleted file mode 100644 index 3da4b81..0000000 --- a/install_update_cn.sh +++ /dev/null @@ -1,605 +0,0 @@ -#!/bin/bash - -#Global varialbles -# System architecture -arch=$(uname -m) -# Install base dir -install_base="/opt" -# MCSM install dir -mcsmanager_install_path="${install_base}/mcsmanager" -# MCSM backup dir during upgrade -mcsm_backup_dir="${install_base}" -# Download URL -mcsmanager_download_addr="http://oss.duzuii.com/d/MCSManager/MCSManager/MCSManager-v10-linux.tar.gz" -# Node.js version to install -node="v16.20.2" -# MCSM Web dir name -mcsm_web="web" -# MCSM daemon dir name -mcsm_daemon="daemon" -# The date variable to be shared across functions -current_date=$(date +%Y_%m_%d) -# MCSM local temp dir for downloaded source -mcsm_down_temp="/opt/mcsmanager_${current_date}" -# Service file for MCSCM Web -service_file_web="/etc/systemd/system/mcsm-web.service" -# Service file for MCSM daemon -service_file_daemon="/etc/systemd/system/mcsm-daemon.service" -# Default systemd user is 'mcsm' -USER="mcsm" -COMMAND="all" -# Created backup absolute path -backup_path="" -# Downloaded package name -package_name="${mcsmanager_download_addr##*/}" -# Node.js install dir -node_install_path="" - -# Helper Functions -usage() { - echo "Usage: $0 [-u user] [-c command]" - echo " -u 指定用户安装 (mcsm 或 root), 默认是 'mcsm'" - echo " -c 安装指定组件 (web, daemon, 或 all), 默认是 'all'" - exit 1 -} -Red_Error() { - echo '=================================================' - printf '\033[1;31;40m%b\033[0m\n' "$@" - echo '=================================================' - exit 1 -} -Echo_Cyan() { - printf '\033[1;36m%b\033[0m\n' "$@" -} -Echo_Red() { - printf '\033[1;31m%b\033[0m\n' "$@" -} - -Echo_Green() { - printf '\033[1;32m%b\033[0m\n' "$@" -} - -Echo_Cyan_N() { - printf '\033[1;36m%b\033[0m' "$@" -} - -Echo_Yellow() { - printf '\033[1;33m%b\033[0m\n' "$@" -} -# Check root permission -Check_Sudo() { - if [ "$EUID" -ne 0 ]; then - echo "This script must be run as root. Please use \"sudo or root user\" instead." - exit 1 - fi -} - -Install_Dependencies() { - # Install related software - Echo_Cyan "[+] 正在安装依赖软件 (git, tar, wget)... " - if [[ -x "$(command -v yum)" ]]; then - yum install -y git tar wget - elif [[ -x "$(command -v apt-get)" ]]; then - apt-get install -y git tar wget - elif [[ -x "$(command -v pacman)" ]]; then - pacman -S --noconfirm git tar wget - elif [[ -x "$(command -v zypper)" ]]; then - zypper --non-interactive install git tar wget - else - Echo_Red "[!] Cannot find your package manager! You may need to install git, tar and wget manually!" - fi - - # Determine whether the relevant software is installed successfully - if [[ -x "$(command -v git)" && -x "$(command -v tar)" && -x "$(command -v wget)" ]]; then - Echo_Green "成功!" - else - Red_Error "[x] Failed to find git, tar and wget, please install them manually!" - fi - -} - -Install_Node() { - if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then - Echo_Green "检测到已安装的Node.js版本, 已为您跳过安装." - else - Echo_Cyan_N "[+] 安装 Node.js 环境中...\n" - - rm -irf "$node_install_path" - - cd /opt || Red_Error "[x] Failed to enter /opt" - - rm -rf "node-$node-linux-$arch.tar.gz" - - wget "https://nodejs.org/dist/$node/node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to download node release" - - tar -zxf "node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to untar node" - - rm -rf "node-$node-linux-$arch.tar.gz" - - if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then - Echo_Green "Success" - else - Red_Error "[x] Node installation failed!" - fi - fi - - - echo - Echo_Yellow "=============== Node.js 版本 ===============" - Echo_Yellow " node: $("$node_install_path"/bin/node -v)" - Echo_Yellow " npm: v$(env "$node_install_path"/bin/node "$node_install_path"/bin/npm -v)" - Echo_Yellow "=============== Node.js 版本 ===============" - echo - sleep 1 -} -# Check and download MCSM source -Check_And_Download_Source() { - # Empty the temp dir if existed - rm -rf "$mcsm_down_temp" - mkdir -p "$mcsm_down_temp" - - # Download the archive directly into the temporary directory - wget -O "${mcsm_down_temp}/${package_name}" "$mcsmanager_download_addr" || Red_Error "[x] Failed to download MCSManager releases..." - if [ $? -ne 0 ]; then - Red_Error "MCSManager Download failed." - fi - - # Extract the archive without changing directories - tar -xzf "${mcsm_down_temp}/${package_name}" -C "$mcsm_down_temp" - if [ $? -ne 0 ]; then - Red_Error "Extraction failed." - fi - - # Clean up the downloaded tar.gz file - rm "${mcsm_down_temp}/${package_name}" -} -# Detect architecture -Detect_Architecture() { - if [[ $arch == x86_64 ]]; then - arch="x64" - #echo "[-] x64 architecture detected" - elif [[ $arch == aarch64 ]]; then - arch="arm64" - #echo "[-] 64-bit ARM architecture detected" - elif [[ $arch == arm ]]; then - arch="armv7l" - #echo "[-] 32-bit ARM architecture detected" - elif [[ $arch == ppc64le ]]; then - arch="ppc64le" - #echo "[-] IBM POWER architecture detected" - elif [[ $arch == s390x ]]; then - arch="s390x" - #echo "[-] IBM LinuxONE architecture detected" - else - Red_Error "[x] Sorry, this architecture is not supported yet!\n[x]Please try to install manually: https://github.com/MCSManager/MCSManager#linux" - fi - - node_install_path="${install_base}/node-$node-linux-$arch" -} -# Initialization -Initialize() { - Echo_Cyan "+---------------------------------------------------------------------- -| MCSManager V10 安装升级脚本 -+---------------------------------------------------------------------- - " - # Check sudo - Check_Sudo - - # Update architecture - Detect_Architecture - - # Check if install base (/opt) exist - mkdir -p "$install_base" - - # Check dependencies - Install_Dependencies - - # Check and download MCSM source - Check_And_Download_Source - - # Parse input arguments - Parse_Arguments "$@" - - # Create mcsm user if needed - if [[ "$USER" == *"mcsm"* ]]; then - # Create the user 'mcsm' if it doesn't already exist - if ! id "mcsm" &>/dev/null; then - /usr/sbin/useradd mcsm - Echo_Green "用户 'mcsm' 已创建." - else - Echo_Yellow "用户 'mcsm' 已经存在." - fi - fi -} - -Backup_MCSM() { - # Ensure both directories are provided - if [ -z "$mcsmanager_install_path" ] || [ -z "$mcsm_backup_dir" ]; then - Red_Error "错误: 备份或源路径为空." - fi - - # Check if the source directory exists - if [ ! -d "$mcsmanager_install_path" ]; then - Red_Error "错误: 源目录不存在." - fi - - # Create backup directory (/opt) if it doesn't exist - if [ ! -d "$mcsm_backup_dir" ]; then - Echo_Yellow "正在创建备份目录..." - mkdir -p "$mcsm_backup_dir" - fi - - # Define the backup path - backup_path="${mcsm_backup_dir}/mcsm_backup_${current_date}.tar.gz" - - # Create the backup - Echo_Yellow "正在创建备份..." - #tar -czf "$backup_path" -C "$mcsmanager_install_path" . - tar -czf "$backup_path" -C "$(dirname "$mcsmanager_install_path")" "$(basename "$mcsmanager_install_path")" - - - # Check if the backup was successful - if [ $? -eq 0 ]; then - Echo_Green "成功创建了备份,位于: $backup_path" - else - Red_Error "创建备份时出错" - fi -} -# MCSM Web Base Installation -# Assuming a fresh install (i.e. no file(s) from previous installation) and downloaded source -Install_MCSM_Web_Base() { - # Move downloaded path - mv "${mcsm_down_temp}/${mcsm_web}" "$web_path" || - # Move helper file(s) - mv "${mcsm_down_temp}/start-web.sh" "${mcsmanager_install_path}/start-web.sh" - # Move back the data directory only if existed - if [ -d "$web_data_tmp" ]; then - rm -rf "$web_data" - mv "${web_data_tmp}" "${web_data}" - fi - # Dependencies install - cd "${web_path}" || Red_Error "[x] Failed to enter ${web_path}" - # Install dependencies - Echo_Cyan "[+] 安装 MCSManager 网页依赖中..." - env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] 在 ${web_path} 安装依赖时出错." - # Return to general dir - cd "$mcsmanager_install_path" - # Configure ownership if needed - if [[ "$USER" == *"mcsm"* ]]; then - # Change file permission to mcsm user - chown -R mcsm:mcsm "$web_path" - else - # Change file permission to root user - chown -R root:root "$web_path" - fi - chmod -R 755 "$web_path" -} -# MCSM Web Service Installation -Install_Web_Systemd() { - Echo_Cyan "[+] 创建 MCSManager 网页服务中..." - # stop and disable existing service - systemctl disable --now mcsm-web - - # delete existing service - rm -rf "$service_file_web" - systemctl daemon-reload - - # Create the default service file - echo "[Unit] -Description=MCSManager-Web - -[Service] -WorkingDirectory=${web_path} -ExecStart=${node_install_path}/bin/node app.js -ExecReload=/bin/kill -s QUIT \$MAINPID -ExecStop=/bin/kill -s QUIT \$MAINPID -Environment=\"PATH=${PATH}\" - -[Install] -WantedBy=multi-user.target -" >"$service_file_web" - - # Add user section if using mcsm user - if [[ "$USER" == *"mcsm"* ]]; then - # Check if the 'User=mcsm' line already exists in the service file - if grep -q "^User=mcsm$" "$service_file_web"; then - echo "The service file is configured already." - else - # Add 'User=mcsm' to the service file - sed -i '/^\[Service\]$/a User=mcsm' "$service_file_web" - fi - fi - # Reload Systemd Service - systemctl daemon-reload - systemctl enable --now mcsm-web -} - -# MCSM Web Update & Installation -Install_Web_Wrapper() { - web_path="${mcsmanager_install_path}/${mcsm_web}" - web_data="${web_path}/data" - web_data_tmp="${mcsmanager_install_path}/web_data_${current_date}" - if [ -d "$web_path" ]; then - Echo_Cyan "[+] 升级 MCSManager 网页端中..." - # The backup should be created already, moving the DATA dir to /opt/mcsmanager/web_data should be fast and safe. - # Use web_data, do not use data as in rare circumstance user may run both update at the same time. - # Use mv command, this won't create issue in case of an incomplete previous installation (e.g. empty mcsm dir) - mv "$web_data" "$web_data_tmp" - # Remove the old web dir - rm -rf "$web_path" - - else - Echo_Cyan "[+] 安装 MCSManager 网页端中..." - fi - - - # Install MCSM Web - Install_MCSM_Web_Base - - # Install MCSM Web Service - Install_Web_Systemd -} - -# MCSM Daemon Base Installation -# Assuming a fresh install (i.e. no file(s) from previous installation) and downloaded source -Install_MCSM_Daemon_Base() { - # Move downloaded path - mv "${mcsm_down_temp}/${mcsm_daemon}" "$daemon_path" || - # Move helper file(s) - mv "${mcsm_down_temp}/start-daemon.sh" "${mcsmanager_install_path}/start-daemon.sh" - - # Move back the data directory only if existed - if [ -d "$daemon_data_tmp" ]; then - rm -rf "$daemon_data" - mv "${daemon_data_tmp}" "${daemon_data}" - fi - # Dependencies install - cd "${daemon_path}" || Red_Error "[x] Failed to enter ${daemon_path}" - # Install dependencies - Echo_Cyan "[+] 安装 MCSManager 节点依赖中..." - env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${daemon_path}" - # Return to general dir - cd "$mcsmanager_install_path" - # Configure ownership if needed - if [[ "$USER" == *"mcsm"* ]]; then - # Change file permission to mcsm user - chown -R mcsm:mcsm "$daemon_path" - else - # Change file permission to root user - chown -R root:root "$daemon_path" - fi - chmod -R 755 "$daemon_path" -} - -# MCSM Daemon Service Installation -Install_Daemon_Systemd() { - Echo_Cyan "[+] 创建 MCSManager 节点服务中..." - # stop and disable existing service - systemctl disable --now mcsm-daemon - - # delete existing service - rm -rf "$service_file_daemon" - systemctl daemon-reload - - # Create the default service file - echo "[Unit] -Description=MCSManager-Daemon - -[Service] -WorkingDirectory=${daemon_path} -ExecStart=${node_install_path}/bin/node app.js -ExecReload=/bin/kill -s QUIT \$MAINPID -ExecStop=/bin/kill -s QUIT \$MAINPID -Environment=\"PATH=${PATH}\" - -[Install] -WantedBy=multi-user.target -" >"$service_file_daemon" - - # Add user section if using mcsm user - if [[ "$USER" == *"mcsm"* ]]; then - # Check if the 'User=mcsm' line already exists in the service file - if grep -q "^User=mcsm$" "$service_file_daemon"; then - echo "The service file is configured already." - else - # Add 'User=mcsm' to the service file - sed -i '/^\[Service\]$/a User=mcsm' "$service_file_daemon" - fi - fi - # Reload Systemd Service - systemctl daemon-reload - systemctl enable --now mcsm-daemon -} -# MCSM Web Update & Installation -Install_Daemon_Wrapper() { - daemon_path="${mcsmanager_install_path}/${mcsm_daemon}" - daemon_data="${daemon_path}/data" - daemon_data_tmp="${mcsmanager_install_path}/daemon_data_${current_date}" - if [ -d "$daemon_path" ]; then - Echo_Cyan "[+] 升级 MCSManager 节点中..." - # The backup should be created already, moving the DATA dir to /opt/mcsmanager/daemon_data should be fast and safe. - # Use daemon_data, do not use data as in rare circumstance user may run both update at the same time. - # Use mv command, this won't create issue in case of an incomplete previous installation (e.g. empty mcsm dir) - mv "$daemon_data" "$daemon_data_tmp" - # Remove the old daemon dir - rm -rf "$daemon_path" - - else - Echo_Cyan "[+] 安装 MCSManager 节点中..." - fi - - # Install MCSM Web - Install_MCSM_Daemon_Base - - # Install MCSM Web Service - Install_Daemon_Systemd -} -# Arguments parsing -Parse_Arguments() { - while getopts "u:c:" opt; do - case ${opt} in - u ) - if [[ "${OPTARG}" == "mcsm" || "${OPTARG}" == "root" ]]; then - USER="${OPTARG}" - else - echo "Invalid user specified." - usage - fi - ;; - c ) - if [[ "${OPTARG}" == "web" || "${OPTARG}" == "daemon" || "${OPTARG}" == "all" ]]; then - COMMAND="${OPTARG}" - else - echo "Invalid command specified." - usage - fi - ;; - \? ) - usage - ;; - : ) - echo "Option -$OPTARG requires an argument." - usage - ;; - esac - done -} - -# Wrapper for installation -Install_Update() { - case "$COMMAND" in - all) - Install_Web_Wrapper - Install_Daemon_Wrapper - ;; - - web) - Install_Web_Wrapper - ;; - - daemon) - Install_Daemon_Wrapper - ;; - - *) - echo "Unknown command: $COMMAND, this should not happen in general :( Please report this bug." - # Exit with an error if COMMAND is unrecognized - exit 1 - ;; - esac -} -# Finalize installation -Finalize() { - #Clear screen - clear - #printf "\n\n\n\n" - echo "______ _______________________ ___" - echo "___ |/ /_ ____/_ ___/__ |/ /_____ _____________ _______ _____________" - echo "__ /|_/ /_ / _____ \__ /|_/ /_ __ \`/_ __ \ __ \`/_ __ \`/ _ \_ ___/" - echo "_ / / / / /___ ____/ /_ / / / / /_/ /_ / / / /_/ /_ /_/ // __/ /" - echo "/_/ /_/ \____/ /____/ /_/ /_/ \__,_/ /_/ /_/\__,_/ _\__, / \___//_/" - echo " /____/" - - case "$COMMAND" in - all) - Echo_Yellow "==================================================================" - Echo_Green "安装已完成! 欢迎使用 MCSManager V10!!!" - Echo_Yellow " " - Echo_Cyan_N "网页 服务: " - Echo_Yellow "http://<您的 IP>:23333 (Browser)" - Echo_Cyan_N "节点 地址: " - Echo_Yellow "ws://<您的 IP>:24444 (Cluster)" - Echo_Red "您必须开放 23333 与 24444 端口才可以正常从公网访问" - Echo_Yellow " " - Echo_Cyan "使用方法:" - Echo_Cyan "启动: systemctl start mcsm-{daemon,web}.service" - Echo_Cyan "关闭: systemctl stop mcsm-{daemon,web}.service" - Echo_Cyan "重启: systemctl restart mcsm-{daemon,web}.service" - Echo_Yellow " " - Echo_Green "官方文档: https://docs.mcsmanager.com/" - Echo_Yellow "==================================================================" - ;; - - web) - Echo_Yellow "==================================================================" - Echo_Green "安装已完成! 欢迎使用 MCSManager V10!!!" - Echo_Yellow " " - Echo_Cyan_N "网页 服务: " - Echo_Yellow "http://<您的 IP>:23333 (Browser)" - Echo_Red "您必须开放 23333 端口才可以正常从公网访问" - Echo_Yellow " " - Echo_Cyan "使用方法:" - Echo_Cyan "启动: systemctl start mcsm-{daemon,web}.service" - Echo_Cyan "关闭: systemctl stop mcsm-{daemon,web}.service" - Echo_Cyan "重启: systemctl restart mcsm-{daemon,web}.service" - Echo_Yellow " " - Echo_Green "官方文档: https://docs.mcsmanager.com/" - Echo_Yellow "==================================================================" - ;; - - daemon) - Echo_Yellow "==================================================================" - Echo_Green "安装已完成! 欢迎使用 MCSManager V10!!!" - Echo_Yellow " " - Echo_Cyan_N "节点 地址: " - Echo_Yellow "ws://<您的 IP>:24444 (Cluster)" - Echo_Red "您必须开放 24444 端口才可以正常从公网访问" - Echo_Yellow " " - Echo_Cyan "使用方法:" - Echo_Cyan "启动: systemctl start mcsm-{daemon,web}.service" - Echo_Cyan "关闭: systemctl stop mcsm-{daemon,web}.service" - Echo_Cyan "重启: systemctl restart mcsm-{daemon,web}.service" - Echo_Yellow " " - Echo_Green "官方文档: https://docs.mcsmanager.com/" - Echo_Yellow "==================================================================" - ;; - - *) - echo "Unknown command: $COMMAND, this should not happen in general :( Please report this bug." - # Exit with an error if COMMAND is unrecognized - exit 1 - ;; - esac - # Check if backup_path is not empty - if [[ -n "$backup_path" ]]; then - Echo_Green "您的MCSManager是由一个已存在的版本升级而来. " - Echo_Green "我们已经为您创建了一个备份, 位于:" - Echo_Yellow "$backup_path" - Echo_Green "如果需要, 您可以使用下列命令手动删除备份: " - Echo_Red "rm ${backup_path}" - fi - # Move quickstart.md - # mv "${mcsm_down_temp}/quick-start.md" "${mcsmanager_install_path}/quick-start.md" - # Remove the temp folder - rm -rf "${mcsm_down_temp}" - - -} -########### Main Logic ################ -Main() { - # Do not create mcsmanager path yet as it will break the logic detecting existing installation - Initialize "$@" - # Check if the mcsmanager_install_path exists - if [ -d "$mcsmanager_install_path" ]; then - # Backup first, due to potential large file being archived, backup is disabled. - # Backup_MCSM - # Install Node.js, this is to ensure the version is up to date. - Install_Node - - else - # Create mcsmanager path if not already - mkdir -p "$mcsmanager_install_path" - # Install Node.js, this is to ensure the version is up to date. - Install_Node - fi - - # Install Services based on command - Install_Update - - # Print helping Information - Finalize - - Echo_Green "安装或升级已完成!" -} - -Main "$@" \ No newline at end of file diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 6946f74..0000000 --- a/package-lock.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "MCSManager-Script", - "lockfileVersion": 3, - "requires": true, - "packages": {} -} diff --git a/package.json b/package.json deleted file mode 100644 index d7e12cf..0000000 --- a/package.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "mcsmanager-script", - "version": "1.0.0", - "scripts": { - "build": "echo 1" - }, - "license": "MIT" -} diff --git a/setup.sh b/setup.sh index 02c7223..e005b7b 100644 --- a/setup.sh +++ b/setup.sh @@ -1,34 +1,33 @@ #!/bin/bash +# Official installation script. mcsmanager_install_path="/opt/mcsmanager" -mcsmanager_download_addr="http://47.99.81.8/mcsmanager_linux_release.tar.gz" +mcsmanager_download_addr="https://github.com/MCSManager/MCSManager/releases/download/v10.5.0/mcsmanager_linux_release.tar.gz" package_name="mcsmanager_linux_release.tar.gz" node="v20.12.2" arch=$(uname -m) if [ "$(id -u)" -ne 0]; then - echo "This script must be run as root. Please use \"sudo bash\" instead." - exit 1 + echo "This script must be run as root. Please use \"sudo bash\" instead." + exit 1 fi printf "\033c" echo_cyan() { - printf '\033[1;36m%b\033[0m\n' "$@" + printf '\033[1;36m%b\033[0m\n' "$@" } echo_red() { - printf '\033[1;31m%b\033[0m\n' "$@" + printf '\033[1;31m%b\033[0m\n' "$@" } echo_green() { - printf '\033[1;32m%b\033[0m\n' "$@" + printf '\033[1;32m%b\033[0m\n' "$@" } - echo_cyan_n() { - printf '\033[1;36m%b\033[0m' "$@" + printf '\033[1;36m%b\033[0m' "$@" } - echo_yellow() { - printf '\033[1;33m%b\033[0m\n' "$@" + printf '\033[1;33m%b\033[0m\n' "$@" } # script info @@ -38,92 +37,92 @@ echo_cyan "+-------------------------------------------------------------------- " Red_Error() { - echo '=================================================' - printf '\033[1;31;40m%b\033[0m\n' "$@" - echo '=================================================' - exit 1 + echo '=================================================' + printf '\033[1;31;40m%b\033[0m\n' "$@" + echo '=================================================' + exit 1 } Install_Node() { - echo_cyan_n "[+] Install Node.JS environment...\n" - - rm -irf "$node_install_path" + echo_cyan_n "[+] Install Node.JS environment...\n" - cd /opt || Red_Error "[x] Failed to enter /opt" + rm -irf "$node_install_path" - rm -rf "node-$node-linux-$arch.tar.gz" + cd /opt || Red_Error "[x] Failed to enter /opt" - wget "https://nodejs.org/dist/$node/node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to download node release" + rm -rf "node-$node-linux-$arch.tar.gz" - tar -zxf "node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to untar node" + wget "https://nodejs.org/dist/$node/node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to download node release" - rm -rf "node-$node-linux-$arch.tar.gz" + tar -zxf "node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to untar node" - if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then - echo_green "Success" - else - Red_Error "[x] Node installation failed!" - fi + rm -rf "node-$node-linux-$arch.tar.gz" - echo - echo_yellow "=============== Node.JS Version ===============" - echo_yellow " node: $("$node_install_path"/bin/node -v)" - echo_yellow " npm: v$(env "$node_install_path"/bin/node "$node_install_path"/bin/npm -v)" - echo_yellow "=============== Node.JS Version ===============" - echo - - sleep 3 + if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then + echo_green "Success" + else + Red_Error "[x] Node installation failed!" + fi + + echo + echo_yellow "=============== Node.JS Version ===============" + echo_yellow " node: $("$node_install_path"/bin/node -v)" + echo_yellow " npm: v$(env "$node_install_path"/bin/node "$node_install_path"/bin/npm -v)" + echo_yellow "=============== Node.JS Version ===============" + echo + + sleep 3 } Install_MCSManager() { - echo_cyan "[+] Install MCSManager..." + echo_cyan "[+] Install MCSManager..." - # stop service - systemctl disable --now mcsm-{web,daemon} + # stop service + systemctl disable --now mcsm-{web,daemon} - # delete service - rm -rf /etc/systemd/system/mcsm-{daemon,web}.service - systemctl daemon-reload + # delete service + rm -rf /etc/systemd/system/mcsm-{daemon,web}.service + systemctl daemon-reload - mkdir -p "${mcsmanager_install_path}" || Red_Error "[x] Failed to create ${mcsmanager_install_path}" + mkdir -p "${mcsmanager_install_path}" || Red_Error "[x] Failed to create ${mcsmanager_install_path}" - # cd /opt/mcsmanager - cd "${mcsmanager_install_path}" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}" + # cd /opt/mcsmanager + cd "${mcsmanager_install_path}" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}" - # download MCSManager release - wget "${mcsmanager_download_addr}" -O "${package_name}" || Red_Error "[x] Failed to download MCSManager" - tar -zxf ${package_name} -o || Red_Error "[x] Failed to untar ${package_name}" - rm -rf "${mcsmanager_install_path}/${package_name}" + # download MCSManager release + wget "${mcsmanager_download_addr}" -O "${package_name}" || Red_Error "[x] Failed to download MCSManager" + tar -zxf ${package_name} -o || Red_Error "[x] Failed to untar ${package_name}" + rm -rf "${mcsmanager_install_path}/${package_name}" - # echo "[→] cd daemon" - cd "${mcsmanager_install_path}/daemon" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/daemon" + # echo "[→] cd daemon" + cd "${mcsmanager_install_path}/daemon" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/daemon" - echo_cyan "[+] Install MCSManager-Daemon dependencies..." - env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${mcsmanager_install_path}/daemon" + echo_cyan "[+] Install MCSManager-Daemon dependencies..." + env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${mcsmanager_install_path}/daemon" - # echo "[←] cd .." - cd "${mcsmanager_install_path}/web" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/web" + # echo "[←] cd .." + cd "${mcsmanager_install_path}/web" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/web" - echo_cyan "[+] Install MCSManager-Web dependencies..." - env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${mcsmanager_install_path}/web" + echo_cyan "[+] Install MCSManager-Web dependencies..." + env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${mcsmanager_install_path}/web" - echo - echo_yellow "=============== MCSManager ===============" - echo_green "Daemon: ${mcsmanager_install_path}/daemon" - echo_green "Web: ${mcsmanager_install_path}/web" - echo_yellow "=============== MCSManager ===============" - echo - echo_green "[+] MCSManager installation success!" + echo + echo_yellow "=============== MCSManager ===============" + echo_green "Daemon: ${mcsmanager_install_path}/daemon" + echo_green "Web: ${mcsmanager_install_path}/web" + echo_yellow "=============== MCSManager ===============" + echo + echo_green "[+] MCSManager installation success!" - chmod -R 755 "$mcsmanager_install_path" + chmod -R 755 "$mcsmanager_install_path" - sleep 3 + sleep 3 } Create_Service() { - echo_cyan "[+] Create MCSManager service..." + echo_cyan "[+] Create MCSManager service..." - echo "[Unit] + echo "[Unit] Description=MCSManager-Daemon [Service] @@ -137,7 +136,7 @@ Environment=\"PATH=${PATH}\" WantedBy=multi-user.target " >/etc/systemd/system/mcsm-daemon.service - echo "[Unit] + echo "[Unit] Description=MCSManager-Web [Service] @@ -151,54 +150,54 @@ Environment=\"PATH=${PATH}\" WantedBy=multi-user.target " >/etc/systemd/system/mcsm-web.service - systemctl daemon-reload - systemctl enable --now mcsm-{daemon,web}.service - echo_green "Registered!" - - sleep 2 - - printf "\n\n\n\n" - - echo_yellow "==================================================================" - echo_green "Installation is complete! Welcome to the MCSManager!!!" - echo_yellow " " - echo_cyan_n "HTTP Web Service: " - echo_yellow "http://:23333 (Browser)" - echo_cyan_n "Daemon Address: " - echo_yellow "ws://:24444 (Cluster)" - echo_red "You must expose ports " - echo_yellow "23333" - echo_red " and " - echo_yellow "24444" - echo_red " to use the service properly on the Internet." - echo_yellow " " - echo_cyan "Usage:" - echo_cyan "systemctl start mcsm-{daemon,web}.service" - echo_cyan "systemctl stop mcsm-{daemon,web}.service" - echo_cyan "systemctl restart mcsm-{daemon,web}.service" - echo_yellow " " - echo_green "Official Document: https://docs.mcsmanager.com/" - echo_yellow "==================================================================" + systemctl daemon-reload + systemctl enable --now mcsm-{daemon,web}.service + echo_green "Registered!" + + sleep 2 + + printf "\n\n\n\n" + + echo_yellow "==================================================================" + echo_green "Installation is complete! Welcome to the MCSManager!!!" + echo_yellow " " + echo_cyan_n "HTTP Web Service: " + echo_yellow "http://:23333 (Browser)" + echo_cyan_n "Daemon Address: " + echo_yellow "ws://:24444 (Cluster)" + echo_red "You must expose ports " + echo_yellow "23333" + echo_red " and " + echo_yellow "24444" + echo_red " to use the service properly on the Internet." + echo_yellow " " + echo_cyan "Usage:" + echo_cyan "systemctl start mcsm-{daemon,web}.service" + echo_cyan "systemctl stop mcsm-{daemon,web}.service" + echo_cyan "systemctl restart mcsm-{daemon,web}.service" + echo_yellow " " + echo_green "Official Document: https://docs.mcsmanager.com/" + echo_yellow "==================================================================" } # Environmental inspection if [[ "$arch" == x86_64 ]]; then - arch=x64 - #echo "[-] x64 architecture detected" + arch=x64 + #echo "[-] x64 architecture detected" elif [[ $arch == aarch64 ]]; then - arch=arm64 - #echo "[-] 64-bit ARM architecture detected" + arch=arm64 + #echo "[-] 64-bit ARM architecture detected" elif [[ $arch == arm ]]; then - arch=armv7l - #echo "[-] 32-bit ARM architecture detected" + arch=armv7l + #echo "[-] 32-bit ARM architecture detected" elif [[ $arch == ppc64le ]]; then - arch=ppc64le - #echo "[-] IBM POWER architecture detected" + arch=ppc64le + #echo "[-] IBM POWER architecture detected" elif [[ $arch == s390x ]]; then - arch=s390x - #echo "[-] IBM LinuxONE architecture detected" + arch=s390x + #echo "[-] IBM LinuxONE architecture detected" else - Red_Error "[x] Sorry, this architecture is not supported yet!\n[x]Please try to install manually: https://github.com/MCSManager/MCSManager#linux" + Red_Error "[x] Sorry, this architecture is not supported yet!\n[x]Please try to install manually: https://github.com/MCSManager/MCSManager#linux" fi # Define the variable Node installation directory @@ -210,22 +209,22 @@ echo_cyan "[-] Architecture: $arch" # Install related software echo_cyan_n "[+] Installing dependent software (git, tar, wget)... " if [[ -x "$(command -v yum)" ]]; then - yum install -y git tar wget + yum install -y git tar wget elif [[ -x "$(command -v apt-get)" ]]; then - apt-get install -y git tar wget + apt-get install -y git tar wget elif [[ -x "$(command -v pacman)" ]]; then - pacman -S --noconfirm --needed git tar wget + pacman -S --noconfirm --needed git tar wget elif [[ -x "$(command -v zypper)" ]]; then - zypper --non-interactive install git tar wget + zypper --non-interactive install git tar wget else - echo_red "[!] Cannot find your package manager! You may need to install git, tar and wget manually!" + echo_red "[!] Cannot find your package manager! You may need to install git, tar and wget manually!" fi # Determine whether the relevant software is installed successfully if [[ -x "$(command -v git)" && -x "$(command -v tar)" && -x "$(command -v wget)" ]]; then - echo_green "Success" + echo_green "Success" else - Red_Error "[x] Failed to find git, tar and wget, please install them manually!" + Red_Error "[x] Failed to find git, tar and wget, please install them manually!" fi # Install the Node environment diff --git a/setup_cn.sh b/setup_cn.sh index 4532f2d..f43004c 100755 --- a/setup_cn.sh +++ b/setup_cn.sh @@ -1,8 +1,8 @@ #!/bin/bash +# This script file is specifically designed for the Chinese region, and servers in the Chinese region are used to accelerate file downloads. -# 中国大陆需要安装脚本额外配置镜像地址以及低版本的 NodeJS 环境 mcsmanager_install_path="/opt/mcsmanager" -mcsmanager_download_addr="http://47.99.81.8/mcsmanager_linux_release.tar.gz" +mcsmanager_download_addr="https://cdn.imlazy.ink:233/files/mcsmanager_linux_release.tar.gz" package_name="mcsmanager_linux_release.tar.gz" node="v16.20.2" arch=$(uname -m) @@ -20,15 +20,12 @@ echo_cyan() { echo_red() { printf '\033[1;31m%b\033[0m\n' "$@" } - echo_green() { printf '\033[1;32m%b\033[0m\n' "$@" } - echo_cyan_n() { printf '\033[1;36m%b\033[0m' "$@" } - echo_yellow() { printf '\033[1;33m%b\033[0m\n' "$@" } @@ -55,10 +52,7 @@ Install_Node() { rm -rf "node-$node-linux-$arch.tar.gz" - # From https://nodejs.org/ # wget "https://nodejs.org/dist/$node/node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to download node release" - - # From https://registry.npmmirror.com/ wget "https://registry.npmmirror.com/-/binary/node/$node/node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to download node release" tar -zxf "node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to untar node" From 040ce2f8726b960889102d9a26e4c370d4ed5a9c Mon Sep 17 00:00:00 2001 From: Unitwk Date: Tue, 25 Feb 2025 14:38:00 +0800 Subject: [PATCH 123/338] fix: pacman -S --noconfirm --needed git tar wget --- setup_cn.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup_cn.sh b/setup_cn.sh index f43004c..7b5a441 100755 --- a/setup_cn.sh +++ b/setup_cn.sh @@ -210,7 +210,7 @@ if [[ -x "$(command -v yum)" ]]; then elif [[ -x "$(command -v apt-get)" ]]; then apt-get install -y git tar wget elif [[ -x "$(command -v pacman)" ]]; then - pacman -S --noconfirm git tar wget + pacman -S --noconfirm --needed git tar wget elif [[ -x "$(command -v zypper)" ]]; then zypper --non-interactive install git tar wget else From 482f875c5940d964f567f2767080a2a5c7110ed7 Mon Sep 17 00:00:00 2001 From: Unitwk Date: Tue, 25 Feb 2025 16:30:59 +0800 Subject: [PATCH 124/338] fix: mv dir --- setup_cn.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/setup_cn.sh b/setup_cn.sh index 7b5a441..af68fab 100755 --- a/setup_cn.sh +++ b/setup_cn.sh @@ -95,6 +95,14 @@ Install_MCSManager() { tar -zxf ${package_name} -o || Red_Error "[x] Failed to untar ${package_name}" rm -rf "${mcsmanager_install_path}/${package_name}" + if [ -d "/opt/mcsmanager/mcsmanager" ]; then + # 文件夹存在,执行移动操作 + mv /opt/mcsmanager/mcsmanager/* /opt/mcsmanager/ + mv /opt/mcsmanager/mcsmanager/.* /opt/mcsmanager/ 2>/dev/null + # 删除空的 mcsmanager 文件夹 + rf -rf /opt/mcsmanager/mcsmanager + fi + # echo "[→] cd daemon" cd "${mcsmanager_install_path}/daemon" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/daemon" From 84bbd272d6c21762de326272a364555422759e3c Mon Sep 17 00:00:00 2001 From: Unitwk Date: Tue, 25 Feb 2025 16:38:02 +0800 Subject: [PATCH 125/338] fix: mv dir --- setup.sh | 7 +++++++ setup_cn.sh | 5 ++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/setup.sh b/setup.sh index e005b7b..5eb900d 100644 --- a/setup.sh +++ b/setup.sh @@ -94,6 +94,13 @@ Install_MCSManager() { tar -zxf ${package_name} -o || Red_Error "[x] Failed to untar ${package_name}" rm -rf "${mcsmanager_install_path}/${package_name}" + # compatible with tar.gz packages of different formats + if [ -d "/opt/mcsmanager/mcsmanager" ]; then + mv /opt/mcsmanager/mcsmanager/* /opt/mcsmanager/ + mv /opt/mcsmanager/mcsmanager/.* /opt/mcsmanager/ 2>/dev/null + rm -rf /opt/mcsmanager/mcsmanager + fi + # echo "[→] cd daemon" cd "${mcsmanager_install_path}/daemon" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/daemon" diff --git a/setup_cn.sh b/setup_cn.sh index af68fab..3d4819c 100755 --- a/setup_cn.sh +++ b/setup_cn.sh @@ -95,12 +95,11 @@ Install_MCSManager() { tar -zxf ${package_name} -o || Red_Error "[x] Failed to untar ${package_name}" rm -rf "${mcsmanager_install_path}/${package_name}" + # compatible with tar.gz packages of different formats if [ -d "/opt/mcsmanager/mcsmanager" ]; then - # 文件夹存在,执行移动操作 mv /opt/mcsmanager/mcsmanager/* /opt/mcsmanager/ mv /opt/mcsmanager/mcsmanager/.* /opt/mcsmanager/ 2>/dev/null - # 删除空的 mcsmanager 文件夹 - rf -rf /opt/mcsmanager/mcsmanager + rm -rf /opt/mcsmanager/mcsmanager fi # echo "[→] cd daemon" From e13ad017aac7a2ed24ec92b060e0382448c3ebf1 Mon Sep 17 00:00:00 2001 From: Antony Blem Date: Tue, 25 Feb 2025 14:47:04 +0100 Subject: [PATCH 126/338] Update Purpur Tags --- templates.json | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/templates.json b/templates.json index f567240..6794aa7 100644 --- a/templates.json +++ b/templates.json @@ -22,7 +22,7 @@ "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.4-2398.jar", "author": "purpurmc.org", "setupInfo": { - "type": "minecraft/java", + "type": "minecraft/java/purpur", "startCommand": "java -jar purpur-1.21.4-2398.jar nogui", "stopCommand": "stop", "updateCommand": "", @@ -41,7 +41,7 @@ "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.3-2358.jar", "author": "purpurmc.org", "setupInfo": { - "type": "minecraft/java", + "type": "minecraft/java/purpur", "startCommand": "java -jar purpur-1.21.3-2358.jar nogui", "stopCommand": "stop", "updateCommand": "", @@ -60,7 +60,7 @@ "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.1-2329.jar", "author": "purpurmc.org", "setupInfo": { - "type": "minecraft/java", + "type": "minecraft/java/purpur", "startCommand": "java -jar purpur-1.21.1-2329.jar nogui", "stopCommand": "stop", "updateCommand": "", @@ -79,7 +79,7 @@ "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.20.6-2233.jar", "author": "purpurmc.org", "setupInfo": { - "type": "minecraft/java", + "type": "minecraft/java/purpur", "startCommand": "java -jar purpur-1.20.6-2233.jar nogui", "stopCommand": "stop", "updateCommand": "", @@ -98,7 +98,7 @@ "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.20.4-2176.jar", "author": "purpurmc.org", "setupInfo": { - "type": "minecraft/java", + "type": "minecraft/java/purpur", "startCommand": "java -jar purpur-1.20.4-2176.jar nogui", "stopCommand": "stop", "updateCommand": "", @@ -117,7 +117,7 @@ "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.20.1-2062.jar", "author": "purpurmc.org", "setupInfo": { - "type": "minecraft/java", + "type": "minecraft/java/purpur", "startCommand": "java -jar purpur-1.20.1-2062.jar nogui", "stopCommand": "stop", "updateCommand": "", @@ -136,7 +136,7 @@ "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.19.2-1858.jar", "author": "purpurmc.org", "setupInfo": { - "type": "minecraft/java", + "type": "minecraft/java/purpur", "startCommand": "java -jar purpur-1.19.2-1858.jar nogui", "stopCommand": "stop", "updateCommand": "", @@ -155,7 +155,7 @@ "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.18.2-1632.jar", "author": "purpurmc.org", "setupInfo": { - "type": "minecraft/java", + "type": "minecraft/java/purpur", "startCommand": "java -jar purpur-1.18.2-1632.jar nogui", "stopCommand": "stop", "updateCommand": "", @@ -174,7 +174,7 @@ "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.17.1-1428.jar", "author": "purpurmc.org", "setupInfo": { - "type": "minecraft/java", + "type": "minecraft/java/purpur", "startCommand": "java -jar purpur-1.17.1-1428.jar nogui", "stopCommand": "stop", "updateCommand": "", @@ -193,7 +193,7 @@ "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.16.5-1171.jar", "author": "purpurmc.org", "setupInfo": { - "type": "minecraft/java", + "type": "minecraft/java/purpur", "startCommand": "java -jar purpur-1.16.5-1171.jar nogui", "stopCommand": "stop", "updateCommand": "", From a1684cbfb9415d3cebafa7f9e1e993eee26f6b73 Mon Sep 17 00:00:00 2001 From: Antony Blem Date: Tue, 25 Feb 2025 14:53:22 +0100 Subject: [PATCH 127/338] Update default Start Command to match the recommended RAM value --- templates.json | 100 ++++++++++++++++++++++++------------------------- 1 file changed, 50 insertions(+), 50 deletions(-) diff --git a/templates.json b/templates.json index 6794aa7..2c6c75d 100644 --- a/templates.json +++ b/templates.json @@ -23,7 +23,7 @@ "author": "purpurmc.org", "setupInfo": { "type": "minecraft/java/purpur", - "startCommand": "java -jar purpur-1.21.4-2398.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.4-2398.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -42,7 +42,7 @@ "author": "purpurmc.org", "setupInfo": { "type": "minecraft/java/purpur", - "startCommand": "java -jar purpur-1.21.3-2358.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.3-2358.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -61,7 +61,7 @@ "author": "purpurmc.org", "setupInfo": { "type": "minecraft/java/purpur", - "startCommand": "java -jar purpur-1.21.1-2329.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.1-2329.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -80,7 +80,7 @@ "author": "purpurmc.org", "setupInfo": { "type": "minecraft/java/purpur", - "startCommand": "java -jar purpur-1.20.6-2233.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.20.6-2233.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -99,7 +99,7 @@ "author": "purpurmc.org", "setupInfo": { "type": "minecraft/java/purpur", - "startCommand": "java -jar purpur-1.20.4-2176.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.20.4-2176.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -118,7 +118,7 @@ "author": "purpurmc.org", "setupInfo": { "type": "minecraft/java/purpur", - "startCommand": "java -jar purpur-1.20.1-2062.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.20.1-2062.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -137,7 +137,7 @@ "author": "purpurmc.org", "setupInfo": { "type": "minecraft/java/purpur", - "startCommand": "java -jar purpur-1.19.2-1858.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.19.2-1858.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -156,7 +156,7 @@ "author": "purpurmc.org", "setupInfo": { "type": "minecraft/java/purpur", - "startCommand": "java -jar purpur-1.18.2-1632.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.18.2-1632.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -175,7 +175,7 @@ "author": "purpurmc.org", "setupInfo": { "type": "minecraft/java/purpur", - "startCommand": "java -jar purpur-1.17.1-1428.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.17.1-1428.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -194,7 +194,7 @@ "author": "purpurmc.org", "setupInfo": { "type": "minecraft/java/purpur", - "startCommand": "java -jar purpur-1.16.5-1171.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.16.5-1171.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -213,7 +213,7 @@ "author": "papermc.io", "setupInfo": { "type": "minecraft/java/paper", - "startCommand": "java -jar paper-1.21.4-173.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.4-173.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -232,7 +232,7 @@ "author": "papermc.io", "setupInfo": { "type": "minecraft/java/paper", - "startCommand": "java -jar paper-1.21.3-82.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.3-82.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -251,7 +251,7 @@ "author": "papermc.io", "setupInfo": { "type": "minecraft/java/paper", - "startCommand": "java -jar paper-1.21.1-132.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.1-132.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -270,7 +270,7 @@ "author": "papermc.io", "setupInfo": { "type": "minecraft/java/paper", - "startCommand": "java -jar paper-1.20.6-151.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.20.6-151.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -289,7 +289,7 @@ "author": "papermc.io", "setupInfo": { "type": "minecraft/java/paper", - "startCommand": "java -jar paper-1.20.4-499.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.20.4-499.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -308,7 +308,7 @@ "author": "papermc.io", "setupInfo": { "type": "minecraft/java/paper", - "startCommand": "java -jar paper-1.20.2-318.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.20.2-318.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -327,7 +327,7 @@ "author": "papermc.io", "setupInfo": { "type": "minecraft/java/paper", - "startCommand": "java -jar paper-1.20.1-196.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.20.1-196.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -346,7 +346,7 @@ "author": "papermc.io", "setupInfo": { "type": "minecraft/java/paper", - "startCommand": "java -jar paper-1.19.4-550.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.19.4-550.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -365,7 +365,7 @@ "author": "papermc.io", "setupInfo": { "type": "minecraft/java/paper", - "startCommand": "java -jar paper-1.19.2-307.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.19.2-307.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -384,7 +384,7 @@ "author": "papermc.io", "setupInfo": { "type": "minecraft/java", - "startCommand": "java -jar paper-1.18.2-388.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.18.2-388.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -403,7 +403,7 @@ "author": "papermc.io", "setupInfo": { "type": "minecraft/java/paper", - "startCommand": "java -jar paper-1.17.1-411.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.17.1-411.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -422,7 +422,7 @@ "author": "papermc.io", "setupInfo": { "type": "minecraft/java/paper", - "startCommand": "java -jar paper-1.16.5-794.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.16.5-794.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -441,7 +441,7 @@ "author": "papermc.io", "setupInfo": { "type": "minecraft/java/paper", - "startCommand": "java -jar paper-1.12.2-1620.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.12.2-1620.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -460,7 +460,7 @@ "author": "papermc.io", "setupInfo": { "type": "minecraft/java/paper", - "startCommand": "java -jar paper-1.8.8-445.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.8.8-445.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -745,7 +745,7 @@ "author": "fabricmc.net", "setupInfo": { "type": "minecraft/java/fabric", - "startCommand": "java -jar fabric-server-launch.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", "stopCommand": "stop", "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.21.4 -downloadMinecraft -noprofile", "ie": "utf-8", @@ -764,7 +764,7 @@ "author": "fabricmc.net", "setupInfo": { "type": "minecraft/java/fabric", - "startCommand": "java -jar fabric-server-launch.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", "stopCommand": "stop", "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.21.3 -downloadMinecraft -noprofile", "ie": "utf-8", @@ -783,7 +783,7 @@ "author": "fabricmc.net", "setupInfo": { "type": "minecraft/java/fabric", - "startCommand": "java -jar fabric-server-launch.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", "stopCommand": "stop", "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.21.1 -downloadMinecraft -noprofile", "ie": "utf-8", @@ -802,7 +802,7 @@ "author": "fabricmc.net", "setupInfo": { "type": "minecraft/java/fabric", - "startCommand": "java -jar fabric-server-launch.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", "stopCommand": "stop", "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.20.6 -downloadMinecraft -noprofile", "ie": "utf-8", @@ -821,7 +821,7 @@ "author": "fabricmc.net", "setupInfo": { "type": "minecraft/java/fabric", - "startCommand": "java -jar fabric-server-launch.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", "stopCommand": "stop", "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.20.4 -downloadMinecraft -noprofile", "ie": "utf-8", @@ -840,7 +840,7 @@ "author": "fabricmc.net", "setupInfo": { "type": "minecraft/java/fabric", - "startCommand": "java -jar fabric-server-launch.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", "stopCommand": "stop", "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.20.1 -downloadMinecraft -noprofile", "ie": "utf-8", @@ -859,7 +859,7 @@ "author": "fabricmc.net", "setupInfo": { "type": "minecraft/java/fabric", - "startCommand": "java -jar fabric-server-launch.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", "stopCommand": "stop", "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.19.4 -downloadMinecraft -noprofile", "ie": "utf-8", @@ -878,7 +878,7 @@ "author": "fabricmc.net", "setupInfo": { "type": "minecraft/java/fabric", - "startCommand": "java -jar fabric-server-launch.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", "stopCommand": "stop", "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.19.2 -downloadMinecraft -noprofile", "ie": "utf-8", @@ -897,7 +897,7 @@ "author": "fabricmc.net", "setupInfo": { "type": "minecraft/java/fabric", - "startCommand": "java -jar fabric-server-launch.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", "stopCommand": "stop", "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.18.2 -downloadMinecraft -noprofile", "ie": "utf-8", @@ -916,7 +916,7 @@ "author": "fabricmc.net", "setupInfo": { "type": "minecraft/java/fabric", - "startCommand": "java -jar fabric-server-launch.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", "stopCommand": "stop", "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.17.1 -downloadMinecraft -noprofile", "ie": "utf-8", @@ -935,7 +935,7 @@ "author": "fabricmc.net", "setupInfo": { "type": "minecraft/java/fabric", - "startCommand": "java -jar fabric-server-launch.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", "stopCommand": "stop", "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.16.5 -downloadMinecraft -noprofile", "ie": "utf-8", @@ -954,7 +954,7 @@ "author": "fabricmc.net", "setupInfo": { "type": "minecraft/java/fabric", - "startCommand": "java -jar fabric-server-launch.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", "stopCommand": "stop", "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.15.2 -downloadMinecraft -noprofile", "ie": "utf-8", @@ -973,7 +973,7 @@ "author": "fabricmc.net", "setupInfo": { "type": "minecraft/java/fabric", - "startCommand": "java -jar fabric-server-launch.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", "stopCommand": "stop", "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.14.4 -downloadMinecraft -noprofile", "ie": "utf-8", @@ -992,7 +992,7 @@ "author": "Mojang", "setupInfo": { "type": "minecraft/java", - "startCommand": "java -jar server.jar nogui", + "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -1011,7 +1011,7 @@ "author": "Mojang", "setupInfo": { "type": "minecraft/java", - "startCommand": "java -jar server.jar nogui", + "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -1030,7 +1030,7 @@ "author": "Mojang", "setupInfo": { "type": "minecraft/java", - "startCommand": "java -jar server.jar nogui", + "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -1049,7 +1049,7 @@ "author": "Mojang", "setupInfo": { "type": "minecraft/java", - "startCommand": "java -jar server.jar nogui", + "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -1068,7 +1068,7 @@ "author": "Mojang", "setupInfo": { "type": "minecraft/java", - "startCommand": "java -jar server.jar nogui", + "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -1087,7 +1087,7 @@ "author": "Mojang", "setupInfo": { "type": "minecraft/java", - "startCommand": "java -jar server.jar nogui", + "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -1106,7 +1106,7 @@ "author": "Mojang", "setupInfo": { "type": "minecraft/java", - "startCommand": "java -jar server.jar nogui", + "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -1125,7 +1125,7 @@ "author": "Mojang", "setupInfo": { "type": "minecraft/java", - "startCommand": "java -jar server.jar nogui", + "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -1144,7 +1144,7 @@ "author": "Mojang", "setupInfo": { "type": "minecraft/java", - "startCommand": "java -jar server.jar nogui", + "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -1163,7 +1163,7 @@ "author": "Mojang", "setupInfo": { "type": "minecraft/java", - "startCommand": "java -jar server.jar nogui", + "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -1182,7 +1182,7 @@ "author": "Mojang", "setupInfo": { "type": "minecraft/java", - "startCommand": "java -jar server.jar nogui", + "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -1201,7 +1201,7 @@ "author": "alongw.cn", "setupInfo": { "type": "minecraft/java", - "startCommand": "java -jar server.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar server.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -1220,7 +1220,7 @@ "author": "alongw.cn", "setupInfo": { "type": "minecraft/java", - "startCommand": "java -jar server.jar nogui", + "startCommand": "java -Xms6144M -Xmx6144M -jar server.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", From 4947d81906fd8f6a5ec77c466754a7b9366a832d Mon Sep 17 00:00:00 2001 From: Antony Blem Date: Tue, 25 Feb 2025 14:56:52 +0100 Subject: [PATCH 128/338] Update PaperMC 1.21.4 and PurpurMC 1.21.4 Builds --- templates.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/templates.json b/templates.json index 2c6c75d..0737380 100644 --- a/templates.json +++ b/templates.json @@ -19,11 +19,11 @@ "hardware": "RAM 4G+", "size": "50MB", "remark": "Only Purpur included", - "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.4-2398.jar", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.4-2399.jar", "author": "purpurmc.org", "setupInfo": { "type": "minecraft/java/purpur", - "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.4-2398.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.4-2399.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -209,11 +209,11 @@ "hardware": "RAM 4G+", "size": "50MB", "remark": "Only Paper included", - "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/173/downloads/paper-1.21.4-173.jar", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/178/downloads/paper-1.21.4-178.jar", "author": "papermc.io", "setupInfo": { "type": "minecraft/java/paper", - "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.4-173.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.4-178.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", From 466d608e75dcff7184d2e981b19287021721d3ea Mon Sep 17 00:00:00 2001 From: Unitwk Date: Wed, 26 Feb 2025 19:59:28 +0800 Subject: [PATCH 129/338] fix: update mv error --- setup.sh | 3 +-- setup_cn.sh | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/setup.sh b/setup.sh index 5eb900d..51228b2 100644 --- a/setup.sh +++ b/setup.sh @@ -96,8 +96,7 @@ Install_MCSManager() { # compatible with tar.gz packages of different formats if [ -d "/opt/mcsmanager/mcsmanager" ]; then - mv /opt/mcsmanager/mcsmanager/* /opt/mcsmanager/ - mv /opt/mcsmanager/mcsmanager/.* /opt/mcsmanager/ 2>/dev/null + cp -rf /opt/mcsmanager/mcsmanager/*.* /opt/mcsmanager/ rm -rf /opt/mcsmanager/mcsmanager fi diff --git a/setup_cn.sh b/setup_cn.sh index 3d4819c..f5223da 100755 --- a/setup_cn.sh +++ b/setup_cn.sh @@ -97,8 +97,7 @@ Install_MCSManager() { # compatible with tar.gz packages of different formats if [ -d "/opt/mcsmanager/mcsmanager" ]; then - mv /opt/mcsmanager/mcsmanager/* /opt/mcsmanager/ - mv /opt/mcsmanager/mcsmanager/.* /opt/mcsmanager/ 2>/dev/null + cp -rf /opt/mcsmanager/mcsmanager/*.* /opt/mcsmanager/ rm -rf /opt/mcsmanager/mcsmanager fi From 46b75fa8ccec552870dff0c92c2837af7832b7bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=BF=E9=BE=99?= <64565408+alongw@users.noreply.github.com> Date: Thu, 27 Feb 2025 14:49:02 +0000 Subject: [PATCH 130/338] fix: copy file --- setup.sh | 2 +- setup_cn.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.sh b/setup.sh index 51228b2..d275f9e 100644 --- a/setup.sh +++ b/setup.sh @@ -96,7 +96,7 @@ Install_MCSManager() { # compatible with tar.gz packages of different formats if [ -d "/opt/mcsmanager/mcsmanager" ]; then - cp -rf /opt/mcsmanager/mcsmanager/*.* /opt/mcsmanager/ + cp -rf /opt/mcsmanager/mcsmanager/* /opt/mcsmanager/ rm -rf /opt/mcsmanager/mcsmanager fi diff --git a/setup_cn.sh b/setup_cn.sh index f5223da..d9a7083 100755 --- a/setup_cn.sh +++ b/setup_cn.sh @@ -97,7 +97,7 @@ Install_MCSManager() { # compatible with tar.gz packages of different formats if [ -d "/opt/mcsmanager/mcsmanager" ]; then - cp -rf /opt/mcsmanager/mcsmanager/*.* /opt/mcsmanager/ + cp -rf /opt/mcsmanager/mcsmanager/* /opt/mcsmanager/ rm -rf /opt/mcsmanager/mcsmanager fi From 0445c2146ecc42c94f1d59928055d2088ecb9c0d Mon Sep 17 00:00:00 2001 From: Antony Blem Date: Sat, 1 Mar 2025 16:53:20 +0100 Subject: [PATCH 131/338] feat: Add NeoForge Versions (Type: minecraft/java) --- templates.json | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/templates.json b/templates.json index 0737380..256e01e 100644 --- a/templates.json +++ b/templates.json @@ -467,6 +467,82 @@ "oe": "utf-8" } }, + { + "language": "en_us", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "title": "NeoForge 1.21.4 (Supports Mods)", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft NeoForge", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.4.101-beta/neoforge-21.4.101-beta-installer.jar", + "author": "neoforged.net", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar neoforge-21.4.101-beta-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "title": "NeoForge 1.20.6 (Supports Mods)", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft NeoForge", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/20.6.125/neoforge-20.6.125-installer.jar", + "author": "neoforged.net", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar neoforge-20.6.125-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "title": "NeoForge 1.20.4 (Supports Mods)", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft NeoForge", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/20.4.239/neoforge-20.4.239-installer.jar", + "author": "neoforged.net", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar neoforge-20.4.239-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "title": "NeoForge 1.20.2 (Supports Mods)", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft NeoForge", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/20.2.88/neoforge-20.2.88-installer.jar", + "author": "neoforged.net", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar neoforge-20.2.88-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", From b34cec54e4f43cf414c9bce2c03a891090f9e09d Mon Sep 17 00:00:00 2001 From: Antony Date: Mon, 17 Mar 2025 10:27:24 +0100 Subject: [PATCH 132/338] Update Purpur and Paper 1.21.4 Builds --- templates.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/templates.json b/templates.json index 256e01e..2f70dea 100644 --- a/templates.json +++ b/templates.json @@ -19,11 +19,11 @@ "hardware": "RAM 4G+", "size": "50MB", "remark": "Only Purpur included", - "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.4-2399.jar", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.4-2408.jar", "author": "purpurmc.org", "setupInfo": { "type": "minecraft/java/purpur", - "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.4-2399.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.4-2408.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -209,11 +209,11 @@ "hardware": "RAM 4G+", "size": "50MB", "remark": "Only Paper included", - "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/178/downloads/paper-1.21.4-178.jar", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/178/downloads/paper-1.21.4-211.jar", "author": "papermc.io", "setupInfo": { "type": "minecraft/java/paper", - "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.4-178.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.4-211.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", From 704c67e42c520eafd01fe1c9facd320a59206ddd Mon Sep 17 00:00:00 2001 From: Antony Date: Mon, 17 Mar 2025 11:05:31 +0100 Subject: [PATCH 133/338] Update Forge Versions --- templates.json | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/templates.json b/templates.json index 2f70dea..eb34c4c 100644 --- a/templates.json +++ b/templates.json @@ -551,13 +551,13 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.4-54.1.1/forge-1.21.4-54.1.1-installer.jar", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.4-54.1.3/forge-1.21.4-54.1.3-installer.jar", "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar forge-1.21.4-54.1.1-installer.jar --installServer", + "updateCommand": "java -jar forge-1.21.4-54.1.3-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -570,13 +570,13 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.3-53.0.53/forge-1.21.3-53.0.53-installer.jar", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.3-53.1.0/forge-1.21.3-53.1.0-installer.jar", "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar forge-1.21.3-53.0.53-installer.jar --installServer", + "updateCommand": "java -jar forge-1.21.3-53.1.0-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -589,13 +589,13 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.1-52.0.53/forge-1.21.1-52.0.53-installer.jar", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.1-52.1.0/forge-1.21.1-52.0.53-installer.jar", "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar forge-1.21.1-52.0.53-installer.jar --installServer", + "updateCommand": "java -jar forge-1.21.1-52.1.0-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -608,13 +608,13 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.6-50.1.48/forge-1.20.6-50.1.48-installer.jar", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.6-50.2.0/forge-1.20.6-50.2.0-installer.jar", "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar forge-1.20.6-50.1.48-installer.jar --installServer", + "updateCommand": "java -jar forge-1.20.6-50.2.0-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -627,13 +627,13 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.4-49.1.36/forge-1.20.4-49.1.36-installer.jar", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.4-49.2.0/forge-1.20.4-49.2.0-installer.jar", "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar forge-1.20.4-49.1.36-installer.jar --installServer", + "updateCommand": "java -jar forge-1.20.4-49.2.0-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -646,13 +646,13 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.1-47.3.33/forge-1.20.1-47.3.33-installer.jar", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.1-47.4.0/forge-1.20.1-47.4.0-installer.jar", "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar forge-1.20.1-47.3.33-installer.jar --installServer", + "updateCommand": "java -jar forge-1.20.1-47.4.0-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -665,13 +665,13 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.19.4-45.3.24/forge-1.19.4-45.3.24-installer.jar", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.19.4-45.4.0/forge-1.19.4-45.4.0-installer.jar", "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar forge-1.19.4-45.3.24-installer.jar --installServer", + "updateCommand": "java -jar forge-1.19.4-45.4.0-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -684,13 +684,13 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.19.2-43.4.20/forge-1.19.2-43.4.20-installer.jar", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.19.2-43.5.0/forge-1.19.2-43.5.0-installer.jar", "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar forge-1.19.2-43.4.20-installer.jar --installServer", + "updateCommand": "java -jar forge-1.19.2-43.5.0-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -703,13 +703,13 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.18.2-40.3.6/forge-1.18.2-40.3.6-installer.jar", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.18.2-40.3.9/forge-1.18.2-40.3.9-installer.jar", "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar forge-1.18.2-40.3.6-installer.jar --installServer", + "updateCommand": "java -jar forge-1.18.2-40.3.9-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } From 336470ff75928c8539efccd104d0e347a827dda1 Mon Sep 17 00:00:00 2001 From: Antony Blem Date: Mon, 5 May 2025 16:33:06 +0200 Subject: [PATCH 134/338] fix: Update setup.sh to always use the latest MCSM Release --- setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index d275f9e..f7abe1f 100644 --- a/setup.sh +++ b/setup.sh @@ -2,7 +2,7 @@ # Official installation script. mcsmanager_install_path="/opt/mcsmanager" -mcsmanager_download_addr="https://github.com/MCSManager/MCSManager/releases/download/v10.5.0/mcsmanager_linux_release.tar.gz" +mcsmanager_download_addr="https://github.com/MCSManager/MCSManager/releases/latest/download/mcsmanager_linux_release.tar.gz" package_name="mcsmanager_linux_release.tar.gz" node="v20.12.2" arch=$(uname -m) From 2ad499248c321100973afda15004ff2881898109 Mon Sep 17 00:00:00 2001 From: SkyKing_PX Date: Mon, 5 May 2025 14:55:12 +0000 Subject: [PATCH 135/338] Update templates.json --- templates.json | 197 +++++++++++++++++++++++++++++++------------------ 1 file changed, 127 insertions(+), 70 deletions(-) diff --git a/templates.json b/templates.json index eb34c4c..a02e914 100644 --- a/templates.json +++ b/templates.json @@ -19,11 +19,11 @@ "hardware": "RAM 4G+", "size": "50MB", "remark": "Only Purpur included", - "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.4-2408.jar", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.4-2416.jar", "author": "purpurmc.org", "setupInfo": { "type": "minecraft/java/purpur", - "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.4-2408.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.4-2416.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -209,11 +209,11 @@ "hardware": "RAM 4G+", "size": "50MB", "remark": "Only Paper included", - "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/178/downloads/paper-1.21.4-211.jar", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/227/downloads/paper-1.21.4-227.jar", "author": "papermc.io", "setupInfo": { "type": "minecraft/java/paper", - "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.4-211.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.4-227.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -467,6 +467,25 @@ "oe": "utf-8" } }, + { + "language": "en_us", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "title": "NeoForge 1.21.5 (Supports Mods)", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft NeoForge", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.5.63-beta/neoforge-21.5.63-beta-installer.jar", + "author": "neoforged.net", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar neoforge-21.5.63-beta-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", @@ -475,13 +494,32 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft NeoForge", - "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.4.101-beta/neoforge-21.4.101-beta-installer.jar", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.4.135/neoforge-21.4.135-installer.jar", + "author": "neoforged.net", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar neoforge-21.4.135-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "title": "NeoForge 1.21.1 (Supports Mods)", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft NeoForge", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.1.169/neoforge-21.1.169-installer.jar", "author": "neoforged.net", "setupInfo": { "type": "minecraft/java", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar neoforge-21.4.101-beta-installer.jar --installServer", + "updateCommand": "java -jar neoforge-21.1.169-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -494,13 +532,13 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft NeoForge", - "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/20.6.125/neoforge-20.6.125-installer.jar", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/20.6.135/neoforge-20.6.135-installer.jar", "author": "neoforged.net", "setupInfo": { "type": "minecraft/java", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar neoforge-20.6.125-installer.jar --installServer", + "updateCommand": "java -jar neoforge-20.6.135-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -513,13 +551,13 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft NeoForge", - "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/20.4.239/neoforge-20.4.239-installer.jar", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/20.4.248/neoforge-20.4.248-installer.jar", "author": "neoforged.net", "setupInfo": { "type": "minecraft/java", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar neoforge-20.4.239-installer.jar --installServer", + "updateCommand": "java -jar neoforge-20.4.248-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -532,13 +570,13 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft NeoForge", - "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/20.2.88/neoforge-20.2.88-installer.jar", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/20.2.93/neoforge-20.2.93-installer.jar", "author": "neoforged.net", "setupInfo": { "type": "minecraft/java", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar neoforge-20.2.88-installer.jar --installServer", + "updateCommand": "java -jar neoforge-20.2.93-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -546,18 +584,18 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "title": "Forge 1.21.4 (Supports Mods)", + "title": "Forge 1.21.5 (Supports Mods)", "runtime": "Java 21+", "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.4-54.1.3/forge-1.21.4-54.1.3-installer.jar", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.5-55.0.9/forge-1.21.5-55.0.9-installer.jar", "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar forge-1.21.4-54.1.3-installer.jar --installServer", + "updateCommand": "java -jar forge-1.21.5-55.0.9-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -565,18 +603,18 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "title": "Forge 1.21.3 (Supports Mods)", + "title": "Forge 1.21.4 (Supports Mods)", "runtime": "Java 21+", "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.3-53.1.0/forge-1.21.3-53.1.0-installer.jar", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.4-54.1.3/forge-1.21.4-54.1.3-installer.jar", "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar forge-1.21.3-53.1.0-installer.jar --installServer", + "updateCommand": "java -jar forge-1.21.4-54.1.3-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -811,247 +849,266 @@ }, { "language": "en_us", - "description": "[Fabric] Minecraft 1.21.4 Fabric", - "title": "Minecraft 1.21.4 with Fabric Loader", + "description": "Minecraft 1.21.5 with Fabric Loader", + "title": "Fabric 1.21.5 (Supports Mods)", "runtime": "Java 21+", "hardware": "RAM 4G+", "size": "5MB", "remark": "Minecraft Fabric", - "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.1/fabric-installer-1.0.1.jar", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", "author": "fabricmc.net", "setupInfo": { "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.21.4 -downloadMinecraft -noprofile", + "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.21.5 -downloadMinecraft -noprofile", "ie": "utf-8", "oe": "utf-8" } }, { "language": "en_us", - "description": "[Fabric] Minecraft 1.21.3 Fabric", - "title": "Minecraft 1.21.3 with Fabric Loader", + "description": "Minecraft 1.21.4 with Fabric Loader", + "title": "Fabric 1.21.4 (Supports Mods)", "runtime": "Java 21+", "hardware": "RAM 4G+", "size": "5MB", "remark": "Minecraft Fabric", - "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.1/fabric-installer-1.0.1.jar", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", "author": "fabricmc.net", "setupInfo": { "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.21.3 -downloadMinecraft -noprofile", + "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.21.4 -downloadMinecraft -noprofile", "ie": "utf-8", "oe": "utf-8" } }, { "language": "en_us", - "description": "[Fabric] Minecraft 1.21.1 Fabric", - "title": "Minecraft 1.21.1 with Fabric Loader", + "description": "Minecraft 1.21.1 with Fabric Loader", + "title": "Fabric 1.21.1 (Supports Mods)", "runtime": "Java 21+", "hardware": "RAM 4G+", "size": "5MB", "remark": "Minecraft Fabric", - "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.1/fabric-installer-1.0.1.jar", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", "author": "fabricmc.net", "setupInfo": { "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.21.1 -downloadMinecraft -noprofile", + "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.21.1 -downloadMinecraft -noprofile", "ie": "utf-8", "oe": "utf-8" } }, { "language": "en_us", - "description": "[Fabric] Minecraft 1.20.6 Fabric", - "title": "Minecraft 1.20.6 with Fabric Loader", + "description": "Minecraft 1.20.6 with Fabric Loader", + "title": "Fabric 1.20.6 (Supports Mods)", "runtime": "Java 21+", "hardware": "RAM 4G+", "size": "5MB", "remark": "Minecraft Fabric", - "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.1/fabric-installer-1.0.1.jar", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", "author": "fabricmc.net", "setupInfo": { "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.20.6 -downloadMinecraft -noprofile", + "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.20.6 -downloadMinecraft -noprofile", "ie": "utf-8", "oe": "utf-8" } }, { "language": "en_us", - "description": "[Fabric] Minecraft 1.20.4 Fabric", - "title": "Minecraft 1.20.4 with Fabric Loader", + "description": "Minecraft 1.20.4 with Fabric Loader", + "title": "Fabric 1.20.4 (Supports Mods)", "runtime": "Java 21+", "hardware": "RAM 4G+", "size": "5MB", "remark": "Minecraft Fabric", - "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.1/fabric-installer-1.0.1.jar", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", "author": "fabricmc.net", "setupInfo": { "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.20.4 -downloadMinecraft -noprofile", + "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.20.4 -downloadMinecraft -noprofile", "ie": "utf-8", "oe": "utf-8" } }, { "language": "en_us", - "description": "[Fabric] Minecraft 1.20.1 Fabric", - "title": "Minecraft 1.20.1 with Fabric Loader", + "description": "Minecraft 1.20.1 with Fabric Loader", + "title": "Fabric 1.20.1 (Supports Mods)", "runtime": "Java 17+", "hardware": "RAM 4G+", "size": "5MB", "remark": "Minecraft Fabric", - "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.1/fabric-installer-1.0.1.jar", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", "author": "fabricmc.net", "setupInfo": { "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.20.1 -downloadMinecraft -noprofile", + "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.20.1 -downloadMinecraft -noprofile", "ie": "utf-8", "oe": "utf-8" } }, { "language": "en_us", - "description": "[Fabric] Minecraft 1.19.4 Fabric", - "title": "Minecraft 1.19.4 with Fabric Loader", + "description": "Minecraft 1.19.4 with Fabric Loader", + "title": "Fabric 1.19.4 (Supports Mods)", "runtime": "Java 17+", "hardware": "RAM 4G+", "size": "5MB", "remark": "Minecraft Fabric", - "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.1/fabric-installer-1.0.1.jar", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", "author": "fabricmc.net", "setupInfo": { "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.19.4 -downloadMinecraft -noprofile", + "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.19.4 -downloadMinecraft -noprofile", "ie": "utf-8", "oe": "utf-8" } }, { "language": "en_us", - "description": "[Fabric] Minecraft 1.19.2 Fabric", - "title": "Minecraft 1.19.2 with Fabric Loader", + "description": "Minecraft 1.19.2 with Fabric Loader", + "title": "Fabric 1.19.2 (Supports Mods)", "runtime": "Java 17+", "hardware": "RAM 4G+", "size": "5MB", "remark": "Minecraft Fabric", - "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.1/fabric-installer-1.0.1.jar", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", "author": "fabricmc.net", "setupInfo": { "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.19.2 -downloadMinecraft -noprofile", + "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.19.2 -downloadMinecraft -noprofile", "ie": "utf-8", "oe": "utf-8" } }, { "language": "en_us", - "description": "[Fabric] Minecraft 1.18.2 Fabric", - "title": "Minecraft 1.18.2 with Fabric Loader", + "description": "Minecraft 1.18.2 with Fabric Loader", + "title": "Fabric 1.18.2 (Supports Mods)", "runtime": "Java 17+", "hardware": "RAM 4G+", "size": "5MB", "remark": "Minecraft Fabric", - "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.1/fabric-installer-1.0.1.jar", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", "author": "fabricmc.net", "setupInfo": { "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.18.2 -downloadMinecraft -noprofile", + "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.18.2 -downloadMinecraft -noprofile", "ie": "utf-8", "oe": "utf-8" } }, { "language": "en_us", - "description": "[Fabric] Minecraft 1.17.1 Fabric", - "title": "Minecraft 1.17.1 with Fabric Loader", + "description": "Minecraft 1.17.1 with Fabric Loader", + "title": "Fabric 1.17.1 (Supports Mods)", "runtime": "Java 16+", "hardware": "RAM 4G+", "size": "5MB", "remark": "Minecraft Fabric", - "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.1/fabric-installer-1.0.1.jar", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", "author": "fabricmc.net", "setupInfo": { "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.17.1 -downloadMinecraft -noprofile", + "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.17.1 -downloadMinecraft -noprofile", "ie": "utf-8", "oe": "utf-8" } }, { "language": "en_us", - "description": "[Fabric] Minecraft 1.16.5 Fabric", - "title": "Minecraft 1.16.5 with Fabric Loader", + "description": "Minecraft 1.16.5 with Fabric Loader", + "title": "Fabric 1.16.5 (Supports Mods)", "runtime": "Java 8+", "hardware": "RAM 4G+", "size": "5MB", "remark": "Minecraft Fabric", - "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.1/fabric-installer-1.0.1.jar", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", "author": "fabricmc.net", "setupInfo": { "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.16.5 -downloadMinecraft -noprofile", + "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.16.5 -downloadMinecraft -noprofile", "ie": "utf-8", "oe": "utf-8" } }, { "language": "en_us", - "description": "[Fabric] Minecraft 1.15.2 Fabric", - "title": "Minecraft 1.15.2 with Fabric Loader", + "description": "Minecraft 1.15.2 with Fabric Loader", + "title": "Fabric 1.15.2 (Supports Mods)", "runtime": "Java 8+", "hardware": "RAM 4G+", "size": "5MB", "remark": "Minecraft Fabric", - "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.1/fabric-installer-1.0.1.jar", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", "author": "fabricmc.net", "setupInfo": { "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.15.2 -downloadMinecraft -noprofile", + "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.15.2 -downloadMinecraft -noprofile", "ie": "utf-8", "oe": "utf-8" } }, { "language": "en_us", - "description": "[Fabric] Minecraft 1.14.4 Fabric", - "title": "Minecraft 1.14.4 with Fabric Loader", + "description": "Minecraft 1.14.4 with Fabric Loader", + "title": "Fabric 1.14.4 (Supports Mods)", "runtime": "Java 8+", "hardware": "RAM 4G+", "size": "5MB", "remark": "Minecraft Fabric", - "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.1/fabric-installer-1.0.1.jar", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", "author": "fabricmc.net", "setupInfo": { "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.14.4 -downloadMinecraft -noprofile", + "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.14.4 -downloadMinecraft -noprofile", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Vanilla] Minecraft 1.21.5", + "title": "Minecraft 1.21.5", + "runtime": "Java 21+", + "hardware": "RAM 2G+", + "size": "55MB", + "remark": "Minecraft Java", + "targetLink": "https://piston-data.mojang.com/v1/objects/e6ec2f64e6080b9b5d9b471b291c33cc7f509733/server.jar", + "author": "Mojang", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", + "stopCommand": "stop", + "updateCommand": "", "ie": "utf-8", "oe": "utf-8" } From 2739fe955810a922a69ffa7074f44c4698b3321d Mon Sep 17 00:00:00 2001 From: KevinLu Date: Wed, 7 May 2025 23:35:45 -0400 Subject: [PATCH 136/338] added initial skeleton --- .gitignore | 46 ++++----- setup.sh | 273 ++++++++--------------------------------------------- 2 files changed, 65 insertions(+), 254 deletions(-) diff --git a/.gitignore b/.gitignore index 6741c00..dc3c282 100644 --- a/.gitignore +++ b/.gitignore @@ -1,21 +1,25 @@ -# Build and Release Folders -bin-debug/ -bin-release/ -[Oo]bj/ -[Bb]in/ - -# Other files and folders -.settings/ - -# Executables -*.swf -*.air -*.ipa -*.apk - -# Project files, i.e. `.project`, `.actionScriptProperties` and `.flexProperties` -# should NOT be excluded as they contain compiler settings and other important -# information for Eclipse / Flash Builder. - -# Remove old cli sh -cli_old.sh +# Build and Release Folders +bin-debug/ +bin-release/ +[Oo]bj/ +[Bb]in/ + +# Other files and folders +.settings/ + +# Executables +*.swf +*.air +*.ipa +*.apk + +# Project files, i.e. `.project`, `.actionScriptProperties` and `.flexProperties` +# should NOT be excluded as they contain compiler settings and other important +# information for Eclipse / Flash Builder. + +# Remove old cli sh +cli_old.sh + +# +setup_old.sh +design.txt \ No newline at end of file diff --git a/setup.sh b/setup.sh index f7abe1f..ee82e12 100644 --- a/setup.sh +++ b/setup.sh @@ -1,243 +1,50 @@ #!/bin/bash -# Official installation script. - -mcsmanager_install_path="/opt/mcsmanager" -mcsmanager_download_addr="https://github.com/MCSManager/MCSManager/releases/latest/download/mcsmanager_linux_release.tar.gz" +# Official MCSManager installation script. +# This script installs or updates the MCSManager Web and/or Daemon to the latest version. +# ------------------------------------------------------------------------------ +# Supported Linux distributions: +# This script supports the following mainstream Linux distributions: +# - Ubuntu: 18.04, 20.04, 22.04, 24.04 +# - Debian: 10, 11, 12, 13 +# - CentOS: 7, 8 Stream, 9 Stream, 10 Stream +# - RHEL: 7, 8, 9, 10 +# - Arch Linux: Support planned (TBD) +# ------------------------------------------------------------------------------ + +# Target installation directory (can be overridden with --install-dir) +install_dir="/opt/mcsmanager/" + +# Primary download URL bas. Full package URL = download_base_url + package_name +download_base_url="https://github.com/MCSManager/MCSManager/releases/latest/download/" + +# Fallback download URL (can also be a local directory or mirror) +download_fallback_url="https://github.com/MCSManager/MCSManager/releases/latest/download/" + +# Name of the release package to download/detect package_name="mcsmanager_linux_release.tar.gz" -node="v20.12.2" -arch=$(uname -m) - -if [ "$(id -u)" -ne 0]; then - echo "This script must be run as root. Please use \"sudo bash\" instead." - exit 1 -fi - -printf "\033c" - -echo_cyan() { - printf '\033[1;36m%b\033[0m\n' "$@" -} -echo_red() { - printf '\033[1;31m%b\033[0m\n' "$@" -} -echo_green() { - printf '\033[1;32m%b\033[0m\n' "$@" -} -echo_cyan_n() { - printf '\033[1;36m%b\033[0m' "$@" -} -echo_yellow() { - printf '\033[1;33m%b\033[0m\n' "$@" -} - -# script info -echo_cyan "+---------------------------------------------------------------------- -| MCSManager Installer -+---------------------------------------------------------------------- -" - -Red_Error() { - echo '=================================================' - printf '\033[1;31;40m%b\033[0m\n' "$@" - echo '=================================================' - exit 1 -} - -Install_Node() { - echo_cyan_n "[+] Install Node.JS environment...\n" - - rm -irf "$node_install_path" - - cd /opt || Red_Error "[x] Failed to enter /opt" - - rm -rf "node-$node-linux-$arch.tar.gz" - - wget "https://nodejs.org/dist/$node/node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to download node release" - - tar -zxf "node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to untar node" - - rm -rf "node-$node-linux-$arch.tar.gz" - - if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then - echo_green "Success" - else - Red_Error "[x] Node installation failed!" - fi - - echo - echo_yellow "=============== Node.JS Version ===============" - echo_yellow " node: $("$node_install_path"/bin/node -v)" - echo_yellow " npm: v$(env "$node_install_path"/bin/node "$node_install_path"/bin/npm -v)" - echo_yellow "=============== Node.JS Version ===============" - echo - - sleep 3 -} - -Install_MCSManager() { - echo_cyan "[+] Install MCSManager..." - - # stop service - systemctl disable --now mcsm-{web,daemon} - - # delete service - rm -rf /etc/systemd/system/mcsm-{daemon,web}.service - systemctl daemon-reload - - mkdir -p "${mcsmanager_install_path}" || Red_Error "[x] Failed to create ${mcsmanager_install_path}" - - # cd /opt/mcsmanager - cd "${mcsmanager_install_path}" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}" - - # download MCSManager release - wget "${mcsmanager_download_addr}" -O "${package_name}" || Red_Error "[x] Failed to download MCSManager" - tar -zxf ${package_name} -o || Red_Error "[x] Failed to untar ${package_name}" - rm -rf "${mcsmanager_install_path}/${package_name}" - - # compatible with tar.gz packages of different formats - if [ -d "/opt/mcsmanager/mcsmanager" ]; then - cp -rf /opt/mcsmanager/mcsmanager/* /opt/mcsmanager/ - rm -rf /opt/mcsmanager/mcsmanager - fi - - # echo "[→] cd daemon" - cd "${mcsmanager_install_path}/daemon" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/daemon" - - echo_cyan "[+] Install MCSManager-Daemon dependencies..." - env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${mcsmanager_install_path}/daemon" - - # echo "[←] cd .." - cd "${mcsmanager_install_path}/web" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/web" - - echo_cyan "[+] Install MCSManager-Web dependencies..." - env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${mcsmanager_install_path}/web" - - echo - echo_yellow "=============== MCSManager ===============" - echo_green "Daemon: ${mcsmanager_install_path}/daemon" - echo_green "Web: ${mcsmanager_install_path}/web" - echo_yellow "=============== MCSManager ===============" - echo - echo_green "[+] MCSManager installation success!" - - chmod -R 755 "$mcsmanager_install_path" - - sleep 3 -} - -Create_Service() { - echo_cyan "[+] Create MCSManager service..." - - echo "[Unit] -Description=MCSManager-Daemon - -[Service] -WorkingDirectory=${mcsmanager_install_path}/daemon -ExecStart=${node_install_path}/bin/node app.js -ExecReload=/bin/kill -s QUIT \$MAINPID -ExecStop=/bin/kill -s QUIT \$MAINPID -Environment=\"PATH=${PATH}\" - -[Install] -WantedBy=multi-user.target -" >/etc/systemd/system/mcsm-daemon.service - - echo "[Unit] -Description=MCSManager-Web - -[Service] -WorkingDirectory=${mcsmanager_install_path}/web -ExecStart=${node_install_path}/bin/node app.js -ExecReload=/bin/kill -s QUIT \$MAINPID -ExecStop=/bin/kill -s QUIT \$MAINPID -Environment=\"PATH=${PATH}\" - -[Install] -WantedBy=multi-user.target -" >/etc/systemd/system/mcsm-web.service - - systemctl daemon-reload - systemctl enable --now mcsm-{daemon,web}.service - echo_green "Registered!" - - sleep 2 - - printf "\n\n\n\n" - - echo_yellow "==================================================================" - echo_green "Installation is complete! Welcome to the MCSManager!!!" - echo_yellow " " - echo_cyan_n "HTTP Web Service: " - echo_yellow "http://:23333 (Browser)" - echo_cyan_n "Daemon Address: " - echo_yellow "ws://:24444 (Cluster)" - echo_red "You must expose ports " - echo_yellow "23333" - echo_red " and " - echo_yellow "24444" - echo_red " to use the service properly on the Internet." - echo_yellow " " - echo_cyan "Usage:" - echo_cyan "systemctl start mcsm-{daemon,web}.service" - echo_cyan "systemctl stop mcsm-{daemon,web}.service" - echo_cyan "systemctl restart mcsm-{daemon,web}.service" - echo_yellow " " - echo_green "Official Document: https://docs.mcsmanager.com/" - echo_yellow "==================================================================" -} -# Environmental inspection -if [[ "$arch" == x86_64 ]]; then - arch=x64 - #echo "[-] x64 architecture detected" -elif [[ $arch == aarch64 ]]; then - arch=arm64 - #echo "[-] 64-bit ARM architecture detected" -elif [[ $arch == arm ]]; then - arch=armv7l - #echo "[-] 32-bit ARM architecture detected" -elif [[ $arch == ppc64le ]]; then - arch=ppc64le - #echo "[-] IBM POWER architecture detected" -elif [[ $arch == s390x ]]; then - arch=s390x - #echo "[-] IBM LinuxONE architecture detected" -else - Red_Error "[x] Sorry, this architecture is not supported yet!\n[x]Please try to install manually: https://github.com/MCSManager/MCSManager#linux" -fi +# Node.js version to be installed +node_version="v20.12.2" -# Define the variable Node installation directory -node_install_path="/opt/node-$node-linux-$arch" +# Node.js installation path (defaults to the MCSManager installation path. Can be overridden with --node-install-dir) +node_install_dir="$install_dir" -# Check network connection -echo_cyan "[-] Architecture: $arch" +# --------------- Global Variables ---------------# +# DO NOT MODIFY # -# Install related software -echo_cyan_n "[+] Installing dependent software (git, tar, wget)... " -if [[ -x "$(command -v yum)" ]]; then - yum install -y git tar wget -elif [[ -x "$(command -v apt-get)" ]]; then - apt-get install -y git tar wget -elif [[ -x "$(command -v pacman)" ]]; then - pacman -S --noconfirm --needed git tar wget -elif [[ -x "$(command -v zypper)" ]]; then - zypper --non-interactive install git tar wget -else - echo_red "[!] Cannot find your package manager! You may need to install git, tar and wget manually!" -fi +# System architecture (detected automatically) +arch="" -# Determine whether the relevant software is installed successfully -if [[ -x "$(command -v git)" && -x "$(command -v tar)" && -x "$(command -v wget)" ]]; then - echo_green "Success" -else - Red_Error "[x] Failed to find git, tar and wget, please install them manually!" -fi +# Component installation options. +# For fresh installs, both daemon and web components are installed by default. +# For updates, behavior depends on detected existing components. +# Can be overridden with --install daemon/web/all +install_daemon=true +install_web=true -# Install the Node environment -Install_Node +# Install MCSM as (default: root). +# To install as a general user (e.g., "mcsm"), use the --user option: --user mcsm +# To ensure compatibility, only user mcsm is supported. +install_user="root" -# Install MCSManager -Install_MCSManager -# Create MCSManager background service -Create_Service From e2d8f9ed6606cf1632ca7c88da24c31ff34414e4 Mon Sep 17 00:00:00 2001 From: KevinLu Date: Wed, 7 May 2025 23:48:42 -0400 Subject: [PATCH 137/338] added install source override --- setup.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/setup.sh b/setup.sh index ee82e12..6bf1d6a 100644 --- a/setup.sh +++ b/setup.sh @@ -47,4 +47,26 @@ install_web=true # To ensure compatibility, only user mcsm is supported. install_user="root" +# Optional: Override the default installation source file. +# If --install-source is specified, the installer will use the provided +# "mcsmanager_linux_release.tar.gz" file instead of downloading it. +# Only support local absolute path. +install_source_path="" +### Helper Functions +# Function to ensure the script is run as root +check_root() { + # Using Bash's built-in EUID variable + if [ -n "$EUID" ]; then + if [ "$EUID" -ne 0 ]; then + echo "Error: This script must be run as root. Please use sudo or switch to the root user." + exit 1 + fi + else + # Fallback to using id -u if EUID is unavailable (e.g., non-Bash shell or misconfigured environment) + if [ "$(id -u)" -ne 0 ]; then + echo "Error: This script must be run as root. Please use sudo or switch to the root user." + exit 1 + fi + fi +} \ No newline at end of file From faf16dcedada980c7a72f5decf2b8e709b2478f4 Mon Sep 17 00:00:00 2001 From: KevinLu Date: Wed, 7 May 2025 23:54:44 -0400 Subject: [PATCH 138/338] added arg parser & simple main --- setup.sh | 111 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 110 insertions(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index 6bf1d6a..05965b2 100644 --- a/setup.sh +++ b/setup.sh @@ -69,4 +69,113 @@ check_root() { exit 1 fi fi -} \ No newline at end of file +} + +# Parse cmd arguments. +parse_args() { + while [[ $# -gt 0 ]]; do + case "$1" in + --install-dir) + if [[ -n "$2" ]]; then + install_dir="$2" + shift 2 + else + echo "Error: --install-dir requires a path argument." + exit 1 + fi + ;; + --node-install-dir) + if [[ -n "$2" ]]; then + node_install_dir="$2" + shift 2 + else + echo "Error: --node-install-dir requires a path argument." + exit 1 + fi + ;; + --install) + if [[ -n "$2" ]]; then + case "$2" in + daemon) + install_daemon=true + install_web=false + ;; + web) + install_daemon=false + install_web=true + ;; + all) + install_daemon=true + install_web=true + ;; + *) + echo "Error: Invalid value for --install. Expected 'daemon', 'web', or 'all'." + echo "Usage: --install daemon|web|all" + exit 1 + ;; + esac + shift 2 + else + echo "Error: --install requires an argument (daemon, web, or all)." + exit 1 + fi + ;; + --user) + if [[ -n "$2" ]]; then + case "$2" in + root) + install_user="root" + ;; + mcsm) + install_user="mcsm" + ;; + *) + echo "Error: Invalid user '$2'. Only 'root' and 'mcsm' are supported." + echo "Usage: --user root|mcsm" + exit 1 + ;; + esac + shift 2 + else + echo "Error: --user requires a value (root or mcsm)." + exit 1 + fi + ;; + --install-source) + if [[ -n "$2" ]]; then + install_source_path="$2" + shift 2 + else + echo "Error: --install-source requires a file path." + exit 1 + fi + ;; + *) + echo "Error: Unknown argument: $1" + exit 1 + ;; + esac + done +} + + + + + + + + + + + + + + + + +main() { + check_root + parse_args "$@" + +} +main "$@" \ No newline at end of file From e0c37a7e66d7b6ebba75dab734f898792e7eb742 Mon Sep 17 00:00:00 2001 From: KevinLu Date: Thu, 8 May 2025 00:04:46 -0400 Subject: [PATCH 139/338] added safe execution wrapper --- setup.sh | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 73 insertions(+), 2 deletions(-) diff --git a/setup.sh b/setup.sh index 05965b2..9b546d4 100644 --- a/setup.sh +++ b/setup.sh @@ -54,6 +54,18 @@ install_user="root" install_source_path="" ### Helper Functions + +# Execution wrapper, avoid unexpected crashes. +safe_run() { + local step_func="$1" + local error_message="$2" + + if ! "$step_func"; then + echo "Error: $error_message" + exit 1 + fi +} + # Function to ensure the script is run as root check_root() { # Using Bash's built-in EUID variable @@ -158,6 +170,64 @@ parse_args() { done } +# Get Distribution & Architecture Info +detect_os_info() { + # Default values + distro="Unknown" + version="Unknown" + arch="" + + # Detect arch + arch=$(uname -m) + + # Primary detection using /etc/os-release + if [ -f /etc/os-release ]; then + . /etc/os-release + distro_id="${ID,,}" + distro_version="${VERSION_ID,,}" + + case "$distro_id" in + ubuntu) + distro="Ubuntu" + version="$distro_version" + ;; + debian) + distro="Debian" + if grep -q "testing" /etc/debian_version 2>/dev/null; then + version="testing" + else + version="$(cat /etc/debian_version)" + fi + ;; + centos) + distro="CentOS" + version="$distro_version" + ;; + rhel*) + distro="RHEL" + version="$distro_version" + ;; + arch) + distro="Arch" + version="rolling" + ;; + esac + + # Fallbacks for older/partial systems + elif [ -f /etc/lsb-release ]; then + . /etc/lsb-release + distro="${DISTRIB_ID:-Ubuntu}" + version="${DISTRIB_RELEASE:-Unknown}" + elif [ -f /etc/issue ]; then + if grep -qi "ubuntu" /etc/issue; then + distro="Ubuntu" + version="$(grep -oP '[0-9]{2}\.[0-9]{2}' /etc/issue | head -1)" + fi + fi + + echo "Detected OS: $distro $version" + echo "Detected Architecture: $arch" +} @@ -174,8 +244,9 @@ parse_args() { main() { - check_root - parse_args "$@" + safe_run check_root "Script must be run as root." + safe_run parse_args "Failed to parse command-line arguments." + safe_run detect_os_info "Failed to detect operating system information." } main "$@" \ No newline at end of file From 7c7936487510d6d120b1159c33807fa5b987644b Mon Sep 17 00:00:00 2001 From: KevinLu Date: Thu, 8 May 2025 00:06:17 -0400 Subject: [PATCH 140/338] allowed arg pass through to sub functions --- setup.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/setup.sh b/setup.sh index 9b546d4..551bc9c 100644 --- a/setup.sh +++ b/setup.sh @@ -57,11 +57,12 @@ install_source_path="" # Execution wrapper, avoid unexpected crashes. safe_run() { - local step_func="$1" - local error_message="$2" + local func="$1" + local err_msg="$2" + shift 2 - if ! "$step_func"; then - echo "Error: $error_message" + if ! "$func" "$@"; then + echo "Error: $err_msg" exit 1 fi } @@ -244,9 +245,8 @@ detect_os_info() { main() { - safe_run check_root "Script must be run as root." - safe_run parse_args "Failed to parse command-line arguments." - safe_run detect_os_info "Failed to detect operating system information." - + safe_run check_root "Script must be run as root" + safe_run parse_args "Failed to parse arguments" "$@" + safe_run detect_os_info "Failed to detect OS" } main "$@" \ No newline at end of file From 49b4c9075a60062f808b8125f3916defd4243849 Mon Sep 17 00:00:00 2001 From: KevinLu Date: Thu, 8 May 2025 00:06:49 -0400 Subject: [PATCH 141/338] added trap --- setup.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup.sh b/setup.sh index 551bc9c..86f29fd 100644 --- a/setup.sh +++ b/setup.sh @@ -245,6 +245,8 @@ detect_os_info() { main() { + trap 'echo "Unexpected error occurred."; exit 99' ERR + safe_run check_root "Script must be run as root" safe_run parse_args "Failed to parse arguments" "$@" safe_run detect_os_info "Failed to detect OS" From 762ef6cd41134eb4494704ce9227629c2ab98edc Mon Sep 17 00:00:00 2001 From: KevinLu Date: Thu, 8 May 2025 00:18:23 -0400 Subject: [PATCH 142/338] added OS check barrier --- setup.sh | 40 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/setup.sh b/setup.sh index 86f29fd..32c5a46 100644 --- a/setup.sh +++ b/setup.sh @@ -32,8 +32,6 @@ node_install_dir="$install_dir" # --------------- Global Variables ---------------# # DO NOT MODIFY # -# System architecture (detected automatically) -arch="" # Component installation options. # For fresh installs, both daemon and web components are installed by default. @@ -53,6 +51,20 @@ install_user="root" # Only support local absolute path. install_source_path="" +# System architecture (detected automatically) +arch="" +version="" +distro="" + +# Supported OS versions (map-style structure) +# Format: supported_os["distro_name"]="version1 version2 version3 ..." +declare -A supported_os +supported_os["Ubuntu"]="18.04 20.04 22.04 24.04" +supported_os["Debian"]="10 11 12 13" +supported_os["CentOS"]="7 8 8-stream 9-stream 10-stream" +supported_os["RHEL"]="7 8 9 10" +supported_os["Arch"]="rolling" + ### Helper Functions # Execution wrapper, avoid unexpected crashes. @@ -225,11 +237,32 @@ detect_os_info() { version="$(grep -oP '[0-9]{2}\.[0-9]{2}' /etc/issue | head -1)" fi fi - + + version_major="${version%%.*}" + version="$version_major" echo "Detected OS: $distro $version" echo "Detected Architecture: $arch" + } +# Check if current OS is supported +check_supported_os() { + local supported_versions="${supported_os[$distro]}" + + if [[ -z "$supported_versions" ]]; then + echo "Error: Distribution '$distro' is not supported by this installer." + return 1 + fi + + if [[ "$supported_versions" != *"$version"* ]]; then + echo "Error: Version '$version' of '$distro' is not supported." + echo "Supported versions are: $supported_versions" + return 1 + fi + + echo "OS compatibility check passed." + return 0 +} @@ -250,5 +283,6 @@ main() { safe_run check_root "Script must be run as root" safe_run parse_args "Failed to parse arguments" "$@" safe_run detect_os_info "Failed to detect OS" + safe_run check_supported_os "Unsupported OS or version" } main "$@" \ No newline at end of file From 97bd3bcfa717da4f6bc07b37aef416aa3babb8e3 Mon Sep 17 00:00:00 2001 From: KevinLu Date: Thu, 8 May 2025 00:20:00 -0400 Subject: [PATCH 143/338] collapsed ubuntu version for OS check --- setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index 32c5a46..b80fba0 100644 --- a/setup.sh +++ b/setup.sh @@ -59,7 +59,7 @@ distro="" # Supported OS versions (map-style structure) # Format: supported_os["distro_name"]="version1 version2 version3 ..." declare -A supported_os -supported_os["Ubuntu"]="18.04 20.04 22.04 24.04" +supported_os["Ubuntu"]="18 20 22 24" supported_os["Debian"]="10 11 12 13" supported_os["CentOS"]="7 8 8-stream 9-stream 10-stream" supported_os["RHEL"]="7 8 9 10" From 9d9381970a0ad4ffe75e09fdc3d7959278cd24e9 Mon Sep 17 00:00:00 2001 From: KevinLu Date: Thu, 8 May 2025 00:30:05 -0400 Subject: [PATCH 144/338] simplified os detection logic --- setup.sh | 58 +++++++++++++++++++++++++++++--------------------------- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/setup.sh b/setup.sh index b80fba0..c81525d 100644 --- a/setup.sh +++ b/setup.sh @@ -185,66 +185,68 @@ parse_args() { # Get Distribution & Architecture Info detect_os_info() { - # Default values distro="Unknown" version="Unknown" - arch="" - - # Detect arch arch=$(uname -m) - # Primary detection using /etc/os-release + # Try primary source if [ -f /etc/os-release ]; then . /etc/os-release distro_id="${ID,,}" - distro_version="${VERSION_ID,,}" + version_id="${VERSION_ID,,}" case "$distro_id" in ubuntu) distro="Ubuntu" - version="$distro_version" + version="$version_id" ;; debian) distro="Debian" - if grep -q "testing" /etc/debian_version 2>/dev/null; then - version="testing" - else - version="$(cat /etc/debian_version)" - fi + version="$version_id" ;; centos) distro="CentOS" - version="$distro_version" + version="$version_id" ;; rhel*) distro="RHEL" - version="$distro_version" + version="$version_id" ;; arch) distro="Arch" version="rolling" ;; + *) + distro="${ID:-Unknown}" + version="$version_id" + ;; esac + fi - # Fallbacks for older/partial systems - elif [ -f /etc/lsb-release ]; then - . /etc/lsb-release - distro="${DISTRIB_ID:-Ubuntu}" - version="${DISTRIB_RELEASE:-Unknown}" - elif [ -f /etc/issue ]; then - if grep -qi "ubuntu" /etc/issue; then - distro="Ubuntu" - version="$(grep -oP '[0-9]{2}\.[0-9]{2}' /etc/issue | head -1)" + # Fallbacks for missing or invalid version + if [[ -z "$version" || "$version" == "unknown" || "$version" == "" ]]; then + if [ -f /etc/issue ]; then + version_guess=$(grep -oP '[0-9]+(\.[0-9]+)*' /etc/issue | head -1) + if [[ -n "$version_guess" ]]; then + version="$version_guess" + fi fi fi - - version_major="${version%%.*}" - version="$version_major" - echo "Detected OS: $distro $version" + + # Normalize version: keep only major version + version_full="$version" + if [[ "$version" =~ ^[0-9]+(\.[0-9]+)*$ ]]; then + version="${version%%.*}" + else + echo "Warning: Could not detect a clean numeric version. Defaulting to unknown." + version="unknown" + fi + + echo "Detected OS: $distro $version_full" echo "Detected Architecture: $arch" - } + # Check if current OS is supported check_supported_os() { local supported_versions="${supported_os[$distro]}" From b2b3e8b2d32f7c486c796bcc9f350a50e401db73 Mon Sep 17 00:00:00 2001 From: KevinLu Date: Thu, 8 May 2025 00:34:56 -0400 Subject: [PATCH 145/338] added required cmd check --- setup.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/setup.sh b/setup.sh index c81525d..6908546 100644 --- a/setup.sh +++ b/setup.sh @@ -65,6 +65,15 @@ supported_os["CentOS"]="7 8 8-stream 9-stream 10-stream" supported_os["RHEL"]="7 8 9 10" supported_os["Arch"]="rolling" +# Required system commands for installation +# These will be checked before logic process +required_commands=( + chmod + chown + wget + tar +) + ### Helper Functions # Execution wrapper, avoid unexpected crashes. @@ -266,7 +275,25 @@ check_supported_os() { return 0 } +# Check if all required commands are available +check_required_commands() { + local missing=0 + for cmd in "${required_commands[@]}"; do + if ! command -v "$cmd" >/dev/null 2>&1; then + echo "Error: Required command '$cmd' is not available in PATH." + missing=1 + fi + done + + if [ "$missing" -ne 0 ]; then + echo "One or more required commands are missing. Please install them and try again." + return 1 + fi + + echo "All required commands are available." + return 0 +} @@ -286,5 +313,6 @@ main() { safe_run parse_args "Failed to parse arguments" "$@" safe_run detect_os_info "Failed to detect OS" safe_run check_supported_os "Unsupported OS or version" + safe_run check_required_commands "Missing required system commands" } main "$@" \ No newline at end of file From 23b38268b77cb1b693ec449375fc8c999e7e724b Mon Sep 17 00:00:00 2001 From: KevinLu Date: Thu, 8 May 2025 00:49:50 -0400 Subject: [PATCH 146/338] added terminal color & style capability check --- setup.sh | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/setup.sh b/setup.sh index 6908546..7742b0b 100644 --- a/setup.sh +++ b/setup.sh @@ -74,8 +74,30 @@ required_commands=( tar ) +# Terminal color & style related +# Default to false, auto check later +SUPPORTS_COLOR=false +SUPPORTS_STYLE=false +# ANSI escape codes for text formatting +RESET="\033[0m" +BOLD="\033[1m" +UNDERLINE="\033[4m" +ITALIC="\033[3m" # Not supported on all terminals + +# Foreground colors +FG_RED="\033[1;31m" +FG_GREEN="\033[1;32m" +FG_YELLOW="\033[1;33m" +FG_BLUE="\033[1;34m" +FG_MAGENTA="\033[1;35m" +FG_CYAN="\033[1;36m" +FG_WHITE="\033[1;37m" ### Helper Functions +## Color Functions + + +## Utility Functions # Execution wrapper, avoid unexpected crashes. safe_run() { local func="$1" @@ -105,6 +127,32 @@ check_root() { fi } +# Function to check whether current terminal support color & style +detect_terminal_capabilities() { + SUPPORTS_COLOR=false + SUPPORTS_STYLE=false + + if [ -t 1 ] && command -v tput >/dev/null 2>&1; then + if [ "$(tput colors)" -ge 8 ]; then + SUPPORTS_COLOR=true + fi + if tput bold >/dev/null 2>&1 && tput smul >/dev/null 2>&1; then + SUPPORTS_STYLE=true + fi + fi + + if [ "$SUPPORTS_COLOR" = true ]; then + echo "[OK] Terminal supports colored output." + else + echo "Note: Terminal does not support colored output. Continuing without formatting." + fi + + if [ "$SUPPORTS_STYLE" = true ]; then + echo "[OK] Terminal supports bold and underline formatting." + else + echo "Note: Terminal does not support advanced text styles." + fi +} # Parse cmd arguments. parse_args() { while [[ $# -gt 0 ]]; do @@ -314,5 +362,6 @@ main() { safe_run detect_os_info "Failed to detect OS" safe_run check_supported_os "Unsupported OS or version" safe_run check_required_commands "Missing required system commands" + safe_run detect_terminal_capabilities "Failed to detect terminal capabilities" } main "$@" \ No newline at end of file From 4805f359ce7a5808bf4e17d98959eda37577f091 Mon Sep 17 00:00:00 2001 From: KevinLu Date: Thu, 8 May 2025 00:50:54 -0400 Subject: [PATCH 147/338] reformatted color style codes --- setup.sh | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/setup.sh b/setup.sh index 7742b0b..b9dee70 100644 --- a/setup.sh +++ b/setup.sh @@ -78,20 +78,29 @@ required_commands=( # Default to false, auto check later SUPPORTS_COLOR=false SUPPORTS_STYLE=false -# ANSI escape codes for text formatting +# Declare ANSI reset RESET="\033[0m" -BOLD="\033[1m" -UNDERLINE="\033[4m" -ITALIC="\033[3m" # Not supported on all terminals # Foreground colors -FG_RED="\033[1;31m" -FG_GREEN="\033[1;32m" -FG_YELLOW="\033[1;33m" -FG_BLUE="\033[1;34m" -FG_MAGENTA="\033[1;35m" -FG_CYAN="\033[1;36m" -FG_WHITE="\033[1;37m" +declare -A FG_COLORS=( + [black]="\033[0;30m" + [red]="\033[0;31m" + [green]="\033[0;32m" + [yellow]="\033[0;33m" + [blue]="\033[0;34m" + [magenta]="\033[0;35m" + [cyan]="\033[0;36m" + [white]="\033[0;37m" +) + +# Font styles +declare -A STYLES=( + [bold]="\033[1m" + [underline]="\033[4m" + [italic]="\033[3m" # Often ignored on many terminals +) + + ### Helper Functions ## Color Functions From 3fe55c2bb94845f8ee22e83c1cb5e64b0f0c1e67 Mon Sep 17 00:00:00 2001 From: KevinLu Date: Thu, 8 May 2025 00:54:45 -0400 Subject: [PATCH 148/338] added color printing function --- setup.sh | 40 +++++++++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 5 deletions(-) diff --git a/setup.sh b/setup.sh index b9dee70..40df2b0 100644 --- a/setup.sh +++ b/setup.sh @@ -102,11 +102,6 @@ declare -A STYLES=( ### Helper Functions - -## Color Functions - - -## Utility Functions # Execution wrapper, avoid unexpected crashes. safe_run() { local func="$1" @@ -352,6 +347,40 @@ check_required_commands() { return 0 } +# Print with specified color and style, fallback to RESET if not supported. +cprint() { + local color="" + local style="" + local text="" + + # Iterate through all args except last + while [[ $# -gt 1 ]]; do + case "$1" in + black|red|green|yellow|blue|magenta|cyan|white) + color="$1" + ;; + bold|underline|italic) + style="$1" + ;; + *) + echo "Unknown style or color: $1" >&2 + ;; + esac + shift + done + + text="$1" + + local prefix="" + if [ "$SUPPORTS_COLOR" = true ] && [[ -n "${FG_COLORS[$color]}" ]]; then + prefix+="${FG_COLORS[$color]}" + fi + if [ "$SUPPORTS_STYLE" = true ] && [[ -n "${STYLES[$style]}" ]]; then + prefix+="${STYLES[$style]}" + fi + + printf "%b%s%b\n" "$prefix" "$text" "$RESET" +} @@ -372,5 +401,6 @@ main() { safe_run check_supported_os "Unsupported OS or version" safe_run check_required_commands "Missing required system commands" safe_run detect_terminal_capabilities "Failed to detect terminal capabilities" + } main "$@" \ No newline at end of file From 4f3475238538d372a2ec48a9e7d23f55c81ebf22 Mon Sep 17 00:00:00 2001 From: KevinLu Date: Thu, 8 May 2025 01:00:03 -0400 Subject: [PATCH 149/338] fixed cprint arg detection logic --- setup.sh | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/setup.sh b/setup.sh index 40df2b0..623d468 100644 --- a/setup.sh +++ b/setup.sh @@ -348,12 +348,21 @@ check_required_commands() { } # Print with specified color and style, fallback to RESET if not supported. +# Note: Only one style support at a time. +# Example usage: +# cprint green bold "Installation completed successfully." +# cprint yellow "" "Warning: Disk space is low." +# cprint red underline "Failed to detect required command: wget" +# cprint yellow "Warning: Disk space is low." +# cprint underline "Failed to detect required command: wget" +# cprint bold green "Installation completed successfully." + cprint() { local color="" local style="" local text="" - - # Iterate through all args except last + + # Parse all arguments except the last one as options while [[ $# -gt 1 ]]; do case "$1" in black|red|green|yellow|blue|magenta|cyan|white) @@ -363,7 +372,6 @@ cprint() { style="$1" ;; *) - echo "Unknown style or color: $1" >&2 ;; esac shift @@ -372,10 +380,10 @@ cprint() { text="$1" local prefix="" - if [ "$SUPPORTS_COLOR" = true ] && [[ -n "${FG_COLORS[$color]}" ]]; then + if [[ -n "$color" && "$SUPPORTS_COLOR" = true && -n "${FG_COLORS[$color]}" ]]; then prefix+="${FG_COLORS[$color]}" fi - if [ "$SUPPORTS_STYLE" = true ] && [[ -n "${STYLES[$style]}" ]]; then + if [[ -n "$style" && "$SUPPORTS_STYLE" = true && -n "${STYLES[$style]}" ]]; then prefix+="${STYLES[$style]}" fi @@ -401,6 +409,7 @@ main() { safe_run check_supported_os "Unsupported OS or version" safe_run check_required_commands "Missing required system commands" safe_run detect_terminal_capabilities "Failed to detect terminal capabilities" - + + } main "$@" \ No newline at end of file From 3e7e2f7f79f53e482bd4d1d643be2a31464c615d Mon Sep 17 00:00:00 2001 From: KevinLu Date: Thu, 8 May 2025 01:09:26 -0400 Subject: [PATCH 150/338] added support for clear and strikethrough line --- setup.sh | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/setup.sh b/setup.sh index 623d468..dbd241f 100644 --- a/setup.sh +++ b/setup.sh @@ -97,7 +97,9 @@ declare -A FG_COLORS=( declare -A STYLES=( [bold]="\033[1m" [underline]="\033[4m" - [italic]="\033[3m" # Often ignored on many terminals + [italic]="\033[3m" # Often ignored + [clear_line]="\r\033[2K" + [strikethrough]="\033[9m" ) @@ -348,30 +350,28 @@ check_required_commands() { } # Print with specified color and style, fallback to RESET if not supported. -# Note: Only one style support at a time. +# Supported colors*: black|red|green|yellow|blue|magenta|cyan|white +# Supported styles*: bold|underline|italic|clear_line|strikethrough +# *Note: some style may not necessarily work on all terminals. # Example usage: # cprint green bold "Installation completed successfully." -# cprint yellow "" "Warning: Disk space is low." # cprint red underline "Failed to detect required command: wget" # cprint yellow "Warning: Disk space is low." # cprint underline "Failed to detect required command: wget" -# cprint bold green "Installation completed successfully." +# cprint bold green underline"Installation completed successfully." cprint() { local color="" - local style="" local text="" - - # Parse all arguments except the last one as options + local styles="" + while [[ $# -gt 1 ]]; do case "$1" in black|red|green|yellow|blue|magenta|cyan|white) color="$1" ;; - bold|underline|italic) - style="$1" - ;; - *) + bold|underline|italic|clear_line|strikethrough) + styles+="${STYLES[$1]}" ;; esac shift @@ -380,11 +380,11 @@ cprint() { text="$1" local prefix="" - if [[ -n "$color" && "$SUPPORTS_COLOR" = true && -n "${FG_COLORS[$color]}" ]]; then + if [[ -n "$color" && "$SUPPORTS_COLOR" = true ]]; then prefix+="${FG_COLORS[$color]}" fi - if [[ -n "$style" && "$SUPPORTS_STYLE" = true && -n "${STYLES[$style]}" ]]; then - prefix+="${STYLES[$style]}" + if [ "$SUPPORTS_STYLE" = true ] || [[ "$styles" == *"${STYLES[clear_line]}"* ]]; then + prefix="$styles$prefix" fi printf "%b%s%b\n" "$prefix" "$text" "$RESET" @@ -399,7 +399,6 @@ cprint() { - main() { trap 'echo "Unexpected error occurred."; exit 99' ERR @@ -410,6 +409,5 @@ main() { safe_run check_required_commands "Missing required system commands" safe_run detect_terminal_capabilities "Failed to detect terminal capabilities" - } main "$@" \ No newline at end of file From 6514e9eb03430c7a166ef78f67e5bb29a0d99929 Mon Sep 17 00:00:00 2001 From: KevinLu Date: Fri, 9 May 2025 00:37:58 -0400 Subject: [PATCH 151/338] added Node.js pre & post check functions --- setup.sh | 105 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 104 insertions(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index dbd241f..d2ddd8e 100644 --- a/setup.sh +++ b/setup.sh @@ -12,7 +12,7 @@ # ------------------------------------------------------------------------------ # Target installation directory (can be overridden with --install-dir) -install_dir="/opt/mcsmanager/" +install_dir="/opt/mcsmanager" # Primary download URL bas. Full package URL = download_base_url + package_name download_base_url="https://github.com/MCSManager/MCSManager/releases/latest/download/" @@ -24,6 +24,7 @@ download_fallback_url="https://github.com/MCSManager/MCSManager/releases/latest/ package_name="mcsmanager_linux_release.tar.gz" # Node.js version to be installed +# Keep the leading "v" node_version="v20.12.2" # Node.js installation path (defaults to the MCSManager installation path. Can be overridden with --node-install-dir) @@ -74,6 +75,18 @@ required_commands=( tar ) +# Node.js related sections +# Enable strict version checking (exact match) +# enabled -> strict requriement for defined node version +# false -> newer version allowed +# Older version is NEVER allowed +strict_node_version_check=false + +# Will be set based on actual node status +install_node=true +# Remove leading "v" from defined version +required_node_ver="${node_version#v}" + # Terminal color & style related # Default to false, auto check later SUPPORTS_COLOR=false @@ -390,9 +403,98 @@ cprint() { printf "%b%s%b\n" "$prefix" "$text" "$RESET" } +# Check if Node.js at PATH is valid. +# This function check Node.js version + NPM (if Node.js valid) +verify_node_at_path() { + local node_path="$1" + local bin_node="$node_path/bin/node" + local bin_npm="$node_path/bin/npm" + + # Node binary missing + if [ ! -x "$bin_node" ]; then + return 1 + fi + + local installed_ver + installed_ver="$("$bin_node" -v 2>/dev/null | sed 's/^v//')" + + # Node exists but version not returned + if [[ -z "$installed_ver" ]]; then + return 1 + fi + + # Version mismatch, even if newer + if [ "$strict_node_version_check" = true ]; then + if [[ "$installed_ver" != "$required_node_ver" ]]; then + return 3 + fi + else + # Version mismatch, too old. + local cmp + cmp=$(printf "%s\n%s\n" "$required_node_ver" "$installed_ver" | sort -V | head -1) + if [[ "$cmp" != "$required_node_ver" ]]; then + return 2 + fi + fi + + # node cmd valid, but npm is missing or broken. + if [ ! -x "$bin_npm" ] || ! "$bin_npm" --version >/dev/null 2>&1; then + return 4 + fi + + return 0 +} +# Node.js pre-check. check if we need to install Node.js before installer run. +# Use postcheck_node_after_install() to check after install. +check_node_installed() { + local node_path="${node_install_dir}/node-${node_version}-linux-${arch}" + + verify_node_at_path "$node_path" + local result=$? + + case $result in + 0) + cprint green bold "Node.js and npm found at $node_path (version $required_node_ver or compatible)" + install_node=false + ;; + 1) + cprint yellow bold "Node.js binary not found or unusable at $node_path" + install_node=true + ;; + 2) + cprint red bold "Node.js version at $node_path is too old. Required: >= $required_node_ver" + install_node=true + ;; + 3) + cprint red bold "Node.js version mismatch. Required: $required_node_ver, found something else." + install_node=true + ;; + 4) + cprint red bold "Node.js is present but npm is missing or broken." + install_node=true + ;; + *) + cprint red bold "Unexpected error in node verification." + install_node=true + ;; + esac +} +# Node.js post-check. check if Node.js is valid after install. + +postcheck_node_after_install() { + local node_path="${node_install_dir}/node-${node_version}-linux-${arch}" + verify_node_at_path "$node_path" + if [[ $? -ne 0 ]]; then + cprint red bold "Node.js installation failed or is invalid at $node_path" + return 1 + else + cprint green bold "Node.js is installed and functioning at $node_path" + return 0 + fi +} @@ -408,6 +510,7 @@ main() { safe_run check_supported_os "Unsupported OS or version" safe_run check_required_commands "Missing required system commands" safe_run detect_terminal_capabilities "Failed to detect terminal capabilities" + safe_run check_node_installed "Failed to detect Node.js or npm at expected path. Node.js will be installed." } main "$@" \ No newline at end of file From 53b2741b57627d464ed36764c482c6a165c9485b Mon Sep 17 00:00:00 2001 From: KevinLu Date: Fri, 9 May 2025 01:06:10 -0400 Subject: [PATCH 152/338] added Node.js installation function --- setup.sh | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 82 insertions(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index d2ddd8e..ca6590c 100644 --- a/setup.sh +++ b/setup.sh @@ -27,6 +27,14 @@ package_name="mcsmanager_linux_release.tar.gz" # Keep the leading "v" node_version="v20.12.2" +# Node download base URL - primary +node_download_url_base="https://nodejs.org/dist/" + +# Node download URL - fallback. +# This is the URL points directly to the file, not the base. This can also be a local absolute path. +# Only supports https:// or http:// for web locations. +node_download_fallback="" + # Node.js installation path (defaults to the MCSManager installation path. Can be overridden with --node-install-dir) node_install_dir="$install_dir" @@ -496,7 +504,78 @@ postcheck_node_after_install() { fi } +# Install Node.js and check +install_node() { + local archive_name="node-${node_version}-linux-${arch}.tar.gz" + local target_dir="${node_install_dir}/node-${node_version}-linux-${arch}" + local archive_path="${node_install_dir}/${archive_name}" + local download_url="${node_download_url_base}${node_version}/${archive_name}" + local fallback="$node_download_fallback" + cprint cyan bold "Installing Node.js $node_version..." + + # Ensure install dir exists + mkdir -p "$node_install_dir" || { + cprint red bold "Failed to create node install directory: $node_install_dir" + return 1 + } + + # Try primary download + cprint cyan "Downloading Node.js from: $download_url" + if ! wget --progress=bar:force -O "$archive_path" "$download_url"; then + cprint yellow "Primary download failed. Attempting fallback..." + + if [[ -n "$fallback" ]]; then + if [[ "$fallback" =~ ^https?:// ]]; then + cprint cyan "Downloading from fallback URL: $fallback" + if ! wget --progress=bar:force -O "$archive_path" "$fallback"; then + cprint red bold "Fallback download for Node.js failed from: $fallback" + return 1 + fi + elif [ -f "$fallback" ]; then + cprint cyan "Copying from local fallback: $fallback" + cp "$fallback" "$archive_path" || { + cprint red bold "Failed to copy fallback archive from $fallback" + return 1 + } + else + cprint red bold "Invalid fallback path: $fallback" + return 1 + fi + else + cprint red bold "Primary download source failed, and no fallback source configured. Cannot proceed." + return 1 + fi + fi + + # Extract archive + cprint cyan "Extracting Node.js archive..." + if ! tar -xzf "$archive_path" -C "$node_install_dir"; then + cprint red bold "Failed to extract Node.js archive." + return 1 + fi + + # Set execute permissions for all users + chmod -R a+rx "$target_dir" || { + cprint red bold "Failed to set execute permissions on Node.js files." + return 1 + } + + # Re-verify installation + verify_node_at_path "$target_dir" + local result=$? + if [[ $result -ne 0 ]]; then + cprint red bold "Node.js installation failed verification." + return 1 + fi + + # Clean up + cprint cyan "Cleaning up archive..." + rm -f "$archive_path" + + cprint green bold "Node.js $node_version installed successfully at $target_dir" + return 0 +} @@ -511,6 +590,8 @@ main() { safe_run check_required_commands "Missing required system commands" safe_run detect_terminal_capabilities "Failed to detect terminal capabilities" safe_run check_node_installed "Failed to detect Node.js or npm at expected path. Node.js will be installed." - + if [ "$install_node" = true ]; then + safe_run install_node "Node.js installation failed" + fi } main "$@" \ No newline at end of file From bc5e00216074aaeaa1fa9e72c5550870009bdb89 Mon Sep 17 00:00:00 2001 From: KevinLu Date: Fri, 9 May 2025 01:13:40 -0400 Subject: [PATCH 153/338] fixed Node.js download URL & arch issue --- setup.sh | 40 +++++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/setup.sh b/setup.sh index ca6590c..db2cba0 100644 --- a/setup.sh +++ b/setup.sh @@ -490,7 +490,6 @@ check_node_installed() { } # Node.js post-check. check if Node.js is valid after install. - postcheck_node_after_install() { local node_path="${node_install_dir}/node-${node_version}-linux-${arch}" @@ -506,21 +505,38 @@ postcheck_node_after_install() { # Install Node.js and check install_node() { - local archive_name="node-${node_version}-linux-${arch}.tar.gz" - local target_dir="${node_install_dir}/node-${node_version}-linux-${arch}" + # Map global arch to Node.js naming conventions (local only) + local node_arch="" + case "$arch" in + x86_64) + node_arch="x64" + ;; + aarch64) + node_arch="arm64" + ;; + armv7l) + node_arch="armv7l" + ;; + *) + cprint red bold "Unsupported architecture for Node.js: $arch" + return 1 + ;; + esac + + local archive_name="node-${node_version}-linux-${node_arch}.tar.xz" + local target_dir="${node_install_dir}/node-${node_version}-linux-${node_arch}" local archive_path="${node_install_dir}/${archive_name}" local download_url="${node_download_url_base}${node_version}/${archive_name}" local fallback="$node_download_fallback" - cprint cyan bold "Installing Node.js $node_version..." + cprint cyan bold "Installing Node.js $node_version for arch: $node_arch" - # Ensure install dir exists mkdir -p "$node_install_dir" || { cprint red bold "Failed to create node install directory: $node_install_dir" return 1 } - # Try primary download + # Download cprint cyan "Downloading Node.js from: $download_url" if ! wget --progress=bar:force -O "$archive_path" "$download_url"; then cprint yellow "Primary download failed. Attempting fallback..." @@ -529,13 +545,13 @@ install_node() { if [[ "$fallback" =~ ^https?:// ]]; then cprint cyan "Downloading from fallback URL: $fallback" if ! wget --progress=bar:force -O "$archive_path" "$fallback"; then - cprint red bold "Fallback download for Node.js failed from: $fallback" + cprint red bold "Fallback download failed from: $fallback" return 1 fi elif [ -f "$fallback" ]; then cprint cyan "Copying from local fallback: $fallback" cp "$fallback" "$archive_path" || { - cprint red bold "Failed to copy fallback archive from $fallback" + cprint red bold "Failed to copy fallback Node.js archive from $fallback" return 1 } else @@ -543,25 +559,23 @@ install_node() { return 1 fi else - cprint red bold "Primary download source failed, and no fallback source configured. Cannot proceed." + cprint red bold "No fallback source configured. Cannot proceed." return 1 fi fi # Extract archive cprint cyan "Extracting Node.js archive..." - if ! tar -xzf "$archive_path" -C "$node_install_dir"; then + if ! tar -xf "$archive_path" -C "$node_install_dir"; then cprint red bold "Failed to extract Node.js archive." return 1 fi - # Set execute permissions for all users chmod -R a+rx "$target_dir" || { cprint red bold "Failed to set execute permissions on Node.js files." return 1 } - # Re-verify installation verify_node_at_path "$target_dir" local result=$? if [[ $result -ne 0 ]]; then @@ -569,7 +583,6 @@ install_node() { return 1 fi - # Clean up cprint cyan "Cleaning up archive..." rm -f "$archive_path" @@ -580,6 +593,7 @@ install_node() { + main() { trap 'echo "Unexpected error occurred."; exit 99' ERR From 35e71c910efd2eb0e3c25befc331bf6edce1404a Mon Sep 17 00:00:00 2001 From: KevinLu Date: Fri, 9 May 2025 01:19:39 -0400 Subject: [PATCH 154/338] stored node & npm binary path to global variable --- setup.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/setup.sh b/setup.sh index db2cba0..dbd7eda 100644 --- a/setup.sh +++ b/setup.sh @@ -95,6 +95,10 @@ install_node=true # Remove leading "v" from defined version required_node_ver="${node_version#v}" +# Holds absolute path for node & npm +node_bin_path="" +npm_bin_path="" + # Terminal color & style related # Default to false, auto check later SUPPORTS_COLOR=false @@ -587,6 +591,12 @@ install_node() { rm -f "$archive_path" cprint green bold "Node.js $node_version installed successfully at $target_dir" + # Save resolved binary paths to global variables + node_bin_path="${target_dir}/bin/node" + npm_bin_path="${target_dir}/bin/npm" + + cprint green "Node.js binary: $node_bin_path" + cprint green "npm binary: $npm_bin_path" return 0 } From 5efd7ea26237f0371b36b3ee1a823f2bd247f5b2 Mon Sep 17 00:00:00 2001 From: KevinLu Date: Fri, 9 May 2025 01:27:54 -0400 Subject: [PATCH 155/338] fixed Node.js detection logic & minor logic optimizations --- setup.sh | 55 +++++++++++++++++++++++++++++++++---------------------- 1 file changed, 33 insertions(+), 22 deletions(-) diff --git a/setup.sh b/setup.sh index dbd7eda..fa14013 100644 --- a/setup.sh +++ b/setup.sh @@ -98,6 +98,10 @@ required_node_ver="${node_version#v}" # Holds absolute path for node & npm node_bin_path="" npm_bin_path="" +# Hold Node.js arch name, e.g. x86_64 -> x64 +node_arch="" +# Hold Node.js intallation path, e.g. ${node_install_dir}/node-${node_version}-linux-${arch} +node_path="" # Terminal color & style related # Default to false, auto check later @@ -415,6 +419,32 @@ cprint() { printf "%b%s%b\n" "$prefix" "$text" "$RESET" } +# Map OS arch with actual Node.js Arch name +# This function should be placed after var arch has been assigned a valid value. +resolve_node_arch() { + case "$arch" in + x86_64) + node_arch="x64" + ;; + aarch64) + node_arch="arm64" + ;; + armv7l) + node_arch="armv7l" + ;; + *) + cprint red bold "Unsupported architecture for Node.js: $arch" + return 1 + ;; + esac + + # Assign node_path based on resolved arch and current version/install dir + node_path="${node_install_dir}/node-${node_version}-linux-${node_arch}" + + cprint cyan "Resolved Node.js architecture: $node_arch" + cprint cyan "Computed Node.js install path: $node_path" +} + # Check if Node.js at PATH is valid. # This function check Node.js version + NPM (if Node.js valid) verify_node_at_path() { @@ -460,8 +490,6 @@ verify_node_at_path() { # Node.js pre-check. check if we need to install Node.js before installer run. # Use postcheck_node_after_install() to check after install. check_node_installed() { - local node_path="${node_install_dir}/node-${node_version}-linux-${arch}" - verify_node_at_path "$node_path" local result=$? @@ -495,8 +523,6 @@ check_node_installed() { # Node.js post-check. check if Node.js is valid after install. postcheck_node_after_install() { - local node_path="${node_install_dir}/node-${node_version}-linux-${arch}" - verify_node_at_path "$node_path" if [[ $? -ne 0 ]]; then cprint red bold "Node.js installation failed or is invalid at $node_path" @@ -509,24 +535,6 @@ postcheck_node_after_install() { # Install Node.js and check install_node() { - # Map global arch to Node.js naming conventions (local only) - local node_arch="" - case "$arch" in - x86_64) - node_arch="x64" - ;; - aarch64) - node_arch="arm64" - ;; - armv7l) - node_arch="armv7l" - ;; - *) - cprint red bold "Unsupported architecture for Node.js: $arch" - return 1 - ;; - esac - local archive_name="node-${node_version}-linux-${node_arch}.tar.xz" local target_dir="${node_install_dir}/node-${node_version}-linux-${node_arch}" local archive_path="${node_install_dir}/${archive_name}" @@ -611,6 +619,9 @@ main() { safe_run parse_args "Failed to parse arguments" "$@" safe_run detect_os_info "Failed to detect OS" safe_run check_supported_os "Unsupported OS or version" + # To be moved to a master pre check function. + safe_run resolve_node_arch "Failed to resolve Node.js architecture" + safe_run check_required_commands "Missing required system commands" safe_run detect_terminal_capabilities "Failed to detect terminal capabilities" safe_run check_node_installed "Failed to detect Node.js or npm at expected path. Node.js will be installed." From 03fe0b035681814ccd108a7104fc46b6b3a68f39 Mon Sep 17 00:00:00 2001 From: KevinLu Date: Sat, 10 May 2025 01:13:59 -0400 Subject: [PATCH 156/338] added function to check if a component is installed --- setup.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/setup.sh b/setup.sh index fa14013..2da8a6c 100644 --- a/setup.sh +++ b/setup.sh @@ -188,6 +188,22 @@ detect_terminal_capabilities() { echo "Note: Terminal does not support advanced text styles." fi } + +# Check whether daemon or web is installed +is_component_installed() { + local component_name="$1" + local component_path="${install_dir}/${component_name}" + + if [[ -d "$component_path" ]]; then + cprint green "Component '$component_name' is already installed at $component_path" + return 0 + else + cprint yellow "Component '$component_name' is not installed" + return 1 + fi +} + + # Parse cmd arguments. parse_args() { while [[ $# -gt 0 ]]; do From 33a4730ecbd1de5e552196a22510ea17d9abf582 Mon Sep 17 00:00:00 2001 From: KevinLu Date: Sat, 10 May 2025 01:21:22 -0400 Subject: [PATCH 157/338] updated arg parse to install/update component based on their status & user input --- setup.sh | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/setup.sh b/setup.sh index 2da8a6c..703eaee 100644 --- a/setup.sh +++ b/setup.sh @@ -249,8 +249,30 @@ parse_args() { esac shift 2 else - echo "Error: --install requires an argument (daemon, web, or all)." - exit 1 + # No argument passed with --install, detect based on installed components + daemon_installed=false + web_installed=false + + if is_component_installed "daemon"; then + daemon_installed=true + fi + if is_component_installed "web"; then + web_installed=true + fi + + if [[ "$daemon_installed" == true && "$web_installed" == false ]]; then + install_daemon=true + install_web=false + elif [[ "$daemon_installed" == false && "$web_installed" == true ]]; then + install_daemon=false + install_web=true + else + # None or both installed perform fresh install or update both + install_daemon=true + install_web=true + fi + + shift 1 fi ;; --user) From 0badf114ab3b124627f265ca473de07fe19a82ec Mon Sep 17 00:00:00 2001 From: KevinLu Date: Sat, 10 May 2025 01:35:31 -0400 Subject: [PATCH 158/338] added global variable for installed status --- setup.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/setup.sh b/setup.sh index 703eaee..96bb4fc 100644 --- a/setup.sh +++ b/setup.sh @@ -53,6 +53,12 @@ install_web=true # To install as a general user (e.g., "mcsm"), use the --user option: --user mcsm # To ensure compatibility, only user mcsm is supported. install_user="root" +# Installed user, for permission check +web_installed=false +daemon_installed=false +web_installed_user="" +daemon_installed_user="" + # Optional: Override the default installation source file. # If --install-source is specified, the installer will use the provided @@ -196,14 +202,32 @@ is_component_installed() { if [[ -d "$component_path" ]]; then cprint green "Component '$component_name' is already installed at $component_path" + + # Set corresponding global variable + if [[ "$component_name" == "daemon" ]]; then + daemon_installed=true + elif [[ "$component_name" == "web" ]]; then + web_installed=true + fi + return 0 else cprint yellow "Component '$component_name' is not installed" + + # Set corresponding global variable + if [[ "$component_name" == "daemon" ]]; then + daemon_installed=false + elif [[ "$component_name" == "web" ]]; then + web_installed=false + fi + return 1 fi } + + # Parse cmd arguments. parse_args() { while [[ $# -gt 0 ]]; do From 3487a857c771b6036d9cf7e6286a08549261f096 Mon Sep 17 00:00:00 2001 From: KUMAKAIHA Date: Sun, 11 May 2025 18:55:34 +0800 Subject: [PATCH 159/338] add setup_macOS.sh for macOS setup --- setup_macOS.sh | 226 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 226 insertions(+) create mode 100644 setup_macOS.sh diff --git a/setup_macOS.sh b/setup_macOS.sh new file mode 100644 index 0000000..f4fbdc4 --- /dev/null +++ b/setup_macOS.sh @@ -0,0 +1,226 @@ +#!/bin/bash + +# 获取脚本所在的目录作为安装目录 +# 使用 dirname "$0" 获取脚本路径,然后 cd 到该目录并打印当前路径 (pwd -P 处理符号链接) +# 使用 || exit 表示如果 cd 失败就退出 +INSTALL_DIR="$(cd "$(dirname "$0")" || exit; pwd -P)" +MCSM_DIR="$INSTALL_DIR/mcsmanager" # MCSManager 文件解压后的目录 + +echo "==================================================" +echo " MCSManager 安装脚本 (macOS)" +echo "==================================================" +echo "安装目录: $INSTALL_DIR" +echo "注意:需要 Homebrew 和 Node.js 已安装。" +echo "==================================================" + +# --- 检查必要命令 --- +echo "检查必要命令 (brew, node, npm, curl, tar, pm2)..." +if ! command -v brew &> /dev/null; then + echo "错误: Homebrew 未找到。请先安装 Homebrew。" + exit 1 +fi +if ! command -v node &> /dev/null; then + echo "错误: Node.js 未找到。请使用 'brew install node' 安装。" + exit 1 +fi +if ! command -v npm &> /dev/null; then + echo "错误: npm 未找到。请确保 Node.js 安装正确。" + exit 1 +fi +if ! command -v curl &> /dev/null; then + echo "错误: curl 未找到。" + exit 1 +fi +if ! command -v tar &> /dev/null; then + echo "错误: tar 未找到。" + exit 1 +fi + +# 检查 PM2 是否全局安装,如果没有则提示用户或尝试安装 +if ! command -v pm2 &> /dev/null; then + echo "PM2 未找到。尝试全局安装 PM2..." + npm install -g pm2 + if ! command -v pm2 &> /dev/null; then + echo "错误: PM2 安装失败。请手动运行 'npm install -g pm2'。" + exit 1 + fi + echo "PM2 安装成功。" +else + echo "PM2 已安装。" +fi +echo "必要命令检查通过。" + +# --- 提供安装选项 --- +echo "请选择安装模式:" +echo "1) 安装 Web 面板 + 节点 (Daemon) (推荐)" +echo "2) 只安装节点 (Daemon)" +read -p "请输入选项 (1 或 2): " choice + +# 验证用户输入 +if [[ "$choice" != "1" && "$choice" != "2" ]]; then + echo "无效的输入。请重新运行脚本并选择 1 或 2。" + exit 1 +fi + +# --- 创建安装目录 (脚本所在目录已存在,但需要确保是可写) --- +echo "使用安装目录: $INSTALL_DIR" +if [ ! -w "$INSTALL_DIR" ]; then + echo "错误: 脚本所在目录 $INSTALL_DIR 不可写。请检查权限。" + exit 1 +fi +echo "目录权限检查通过。" + +# --- 下载 MCSManager Release --- +# 使用 Linux 版本,因为 Node.js 部分是跨平台的,且 release 包同时包含 web 和 daemon +MCSM_TAR_URL="https://github.com/MCSManager/MCSManager/releases/latest/download/mcsmanager_linux_release.tar.gz" +MCSM_TAR_FILE="$INSTALL_DIR/mcsmanager_linux_release.tar.gz" + +echo "下载 MCSManager Release ($MCSM_TAR_URL) 到 $MCSM_TAR_FILE" +# 使用 curl 下载,-L 跟随重定向,-o 指定输出文件,-f 在 HTTP 错误时退出 +curl -L -f "$MCSM_TAR_URL" -o "$MCSM_TAR_FILE" +if [ $? -ne 0 ]; then + echo "错误: 下载失败。请检查网络连接或 URL。" + exit 1 +fi +echo "下载成功。" + +# --- 解压 MCSManager Release --- +echo "解压 $MCSM_TAR_FILE 到 $INSTALL_DIR" +# -C 指定解压目录 +tar -zxf "$MCSM_TAR_FILE" -C "$INSTALL_DIR" +if [ $? -ne 0 ]; then + echo "错误: 解压失败。" + # 尝试删除可能不完整的目录 + rm -rf "$MCSM_DIR" + exit 1 +fi + +# 检查解压是否成功创建了 mcsmanager 目录 +if [ ! -d "$MCSM_DIR" ]; then + echo "错误: 解压失败。未找到目录 $MCSM_DIR。" + exit 1 +fi +echo "解压成功。" + +# 清理下载的压缩包 +echo "移除下载的压缩包: $MCSM_TAR_FILE" +rm "$MCSM_TAR_FILE" + +# --- 进入 MCSManager 目录并安装依赖 --- +echo "切换到目录: $MCSM_DIR" +cd "$MCSM_DIR" +if [ $? -ne 0 ]; then + echo "错误: 无法切换到目录 $MCSM_DIR。" + exit 1 +fi + +echo "运行 ./install.sh 安装依赖..." +# 使用 bash 确保脚本正确执行 +bash ./install.sh +if [ $? -ne 0 ]; then + echo "错误: ./install.sh 运行失败。请检查输出信息。" + exit 1 +fi +echo "依赖安装步骤完成。" + +# --- 使用 PM2 启动 MCSManager 进程并配置自启动 --- +echo "使用 PM2 启动 MCSManager 进程..." + +# 停止并删除旧的 PM2 进程(如果存在) +echo "停止并删除旧的 PM2 进程 (如果存在)..." +pm2 stop MCSManager-Daemon &> /dev/null +pm2 delete MCSManager-Daemon &> /dev/null +pm2 stop MCSManager-Web &> /dev/null +pm2 delete MCSManager-Web &> /dev/null +sleep 1 # 等待片刻确保进程停止 + +# 启动 Daemon +echo "启动 MCSManager Daemon..." +pm2 start ./start-daemon.sh --name "MCSManager-Daemon" --output "$INSTALL_DIR/daemon_output.log" --error "$INSTALL_DIR/daemon_error.log" +sleep 3 # 等待片刻让 PM2 启动进程 +if ! pm2 status | grep -q "MCSManager-Daemon"; then + echo "错误: PM2 未能成功启动 MCSManager-Daemon。" + pm2 logs MCSManager-Daemon + exit 1 +fi +echo "MCSManager Daemon 已通过 PM2 启动。" +echo "查看 Daemon 状态: pm2 status MCSManager-Daemon" +echo "查看 Daemon 日志: pm2 logs MCSManager-Daemon" +echo "Daemon 默认监听端口: 24444" + + +# 如果选择安装 Web 面板 +if [ "$choice" == "1" ]; then + echo "" + echo "启动 MCSManager Web 面板..." + pm2 start ./start-web.sh --name "MCSManager-Web" --output "$INSTALL_DIR/web_output.log" --error "$INSTALL_DIR/web_error.log" + sleep 3 # 等待片刻让 PM2 启动进程 + if ! pm2 status | grep -q "MCSManager-Web"; then + echo "错误: PM2 未能成功启动 MCSManager-Web。" + pm2 logs MCSManager-Web + # 注意:这里不退出,因为 Daemon 可能已经启动成功 + echo "请手动检查 MCSManager-Web 的问题。" + else + echo "MCSManager Web 面板已通过 PM2 启动。" + echo "查看 Web 状态: pm2 status MCSManager-Web" + echo "查看 Web 日志: pm2 logs MCSManager-Web" + echo "Web 默认监听端口: 23333" + fi +fi + +echo "" +echo "配置 PM2 自启动 (使用 launchd)..." +# 这个命令会生成一个 launchd 配置文件,并通常会输出一条需要用户手动运行的命令 +# 运行一次即可,它配置的是 PM2 daemon 本身,而不是 MCSM 进程 +pm2 startup launchd + +echo "" +echo "==================================================" +if [ "$choice" == "1" ]; then + echo " MCSManager Web 面板 + 节点 安装完成!" +else + echo " MCSManager 节点 (Daemon) 安装完成!" +fi +echo "==================================================" +echo "安装目录: $INSTALL_DIR" +echo "" + +echo "--- PM2 控制命令参考 ---" +echo "查看所有 MCSManager 进程状态:" +echo " pm2 status" +echo "" +echo "--- Daemon (节点) ---" +echo "进程名: MCSManager-Daemon" +echo "日志文件: $INSTALL_DIR/daemon_output.log, $INSTALL_DIR/daemon_error.log" +echo "启动 Daemon: pm2 start MCSManager-Daemon" +echo "停止 Daemon: pm2 stop MCSManager-Daemon" +echo "重启 Daemon: pm2 restart MCSManager-Daemon" +echo "删除 Daemon (从 PM2 列表移除): pm2 delete MCSManager-Daemon" +echo "查看 Daemon 日志: pm2 logs MCSManager-Daemon" +echo "查看 Daemon 实时日志: pm2 logs MCSManager-Daemon --follow" +echo "" + +if [ "$choice" == "1" ]; then + echo "--- Web 面板 ---" + echo "进程名: MCSManager-Web" + echo "日志文件: $INSTALL_DIR/web_output.log, $INSTALL_DIR/web_error.log" + echo "启动 Web: pm2 start MCSManager-Web" + echo "停止 Web: pm2 stop MCSManager-Web" + echo "重启 Web: pm2 restart MCSManager-Web" + echo "删除 Web (从 PM2 列表移除): pm2 delete MCSManager-Web" + echo "查看 Web 日志: pm2 logs MCSManager-Web" + echo "查看 Web 实时日志: pm2 logs MCSManager-Web --follow" + echo "" + echo "默认访问地址: http://localhost:23333" +fi + +echo "--- 重要:完成自启动设置 ---" +echo "请查找上面 'pm2 startup launchd' 命令的输出,它会显示一条需要您手动执行的命令,通常以 'sudo env PATH=...' 开头。" +echo "请复制并粘贴该命令到终端中运行,以确保 PM2 Daemon 本身在系统重启后自动启动,从而管理 MCSManager 进程。" +echo "示例 (请运行实际输出的命令):" +echo " sudo env PATH=\$PATH:/usr/local/bin /Users/youruser/.nvm/versions/node/vX.Y.Z/bin/pm2 startup launchd -u youruser --hp /Users/youruser" +echo "" +echo "==================================================" + +exit 0 + From 7769af52fc84c16a0cb62a959aa12165be283d1e Mon Sep 17 00:00:00 2001 From: KevinLu Date: Wed, 14 May 2025 01:25:03 -0400 Subject: [PATCH 160/338] check component running permission --- setup.sh | 49 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index 96bb4fc..5b07204 100644 --- a/setup.sh +++ b/setup.sh @@ -59,13 +59,18 @@ daemon_installed=false web_installed_user="" daemon_installed_user="" - +# Service file locations +# the final dir = systemd_file + {web/daemon} + ".service" +systemd_file="/etc/systemd/system/mcsm-" # Optional: Override the default installation source file. # If --install-source is specified, the installer will use the provided # "mcsmanager_linux_release.tar.gz" file instead of downloading it. # Only support local absolute path. install_source_path="" +# temp path for extracted file(s) +install_tmp_dir="" + # System architecture (detected automatically) arch="" version="" @@ -225,6 +230,42 @@ is_component_installed() { fi } +check_component_permission() { + local component="$1" + local service_file="${systemd_file}${component}.service" + + if [[ ! -f "$service_file" ]]; then + cprint yellow "Service file not found: $service_file" + return 0 # nothing changed + fi + + # Extract the User= line if it exists + local user_line + user_line=$(grep -E '^User=' "$service_file" 2>/dev/null | head -1) + + local user + if [[ -z "$user_line" ]]; then + user="root" # default if no User= is defined + else + user="${user_line#User=}" + fi + + # Validate user + if [[ "$user" != "root" && "$user" != "mcsm" ]]; then + cprint red bold "Unsupported user '$user' in $service_file. Expected 'root' or 'mcsm'." + exit 1 + fi + + # Assign to appropriate global + if [[ "$component" == "web" ]]; then + web_installed_user="$user" + elif [[ "$component" == "daemon" ]]; then + daemon_installed_user="$user" + fi + + cprint cyan "Detected $component installed as user: $user" + return 0 +} @@ -255,15 +296,19 @@ parse_args() { case "$2" in daemon) install_daemon=true + check_component_permission "daemon" install_web=false ;; web) install_daemon=false install_web=true + check_component_permission "web" ;; all) install_daemon=true + check_component_permission "daemon" install_web=true + check_component_permission "web" ;; *) echo "Error: Invalid value for --install. Expected 'daemon', 'web', or 'all'." @@ -279,9 +324,11 @@ parse_args() { if is_component_installed "daemon"; then daemon_installed=true + check_component_permission "daemon" fi if is_component_installed "web"; then web_installed=true + check_component_permission "web" fi if [[ "$daemon_installed" == true && "$web_installed" == false ]]; then From a9cf3e01e1e045a7964e5e0a9d36920ddd106d4c Mon Sep 17 00:00:00 2001 From: KevinLu Date: Wed, 14 May 2025 01:39:03 -0400 Subject: [PATCH 161/338] added function to validate permission before file operations --- setup.sh | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/setup.sh b/setup.sh index 5b07204..54036b7 100644 --- a/setup.sh +++ b/setup.sh @@ -92,6 +92,7 @@ required_commands=( chown wget tar + stat ) # Node.js related sections @@ -528,6 +529,53 @@ cprint() { printf "%b%s%b\n" "$prefix" "$text" "$RESET" } +# Permission check before proceed with installation +permission_barrier() { + if [[ "$web_installed" == false && "$daemon_installed" == false ]]; then + cprint cyan "No components currently installed — skipping permission check." + return 0 + fi + + for component in web daemon; do + local is_installed_var="${component}_installed" + local installed_user_var="${component}_installed_user" + + if [[ "${!is_installed_var}" == true ]]; then + local installed_user="${!installed_user_var}" + + # Step 1: User match check + if [[ "$installed_user" != "$install_user" ]]; then + cprint red bold "Permission mismatch for '$component':" + cprint red "Installed as user: $installed_user" + cprint red "Current install target user: $install_user" + cprint red "Unable to proceed due to ownership conflict." + exit 1 + fi + fi + done + + # Step 2: Directory ownership check + local dir_owner + dir_owner=$(stat -c '%U' "$install_dir" 2>/dev/null) + + if [[ -z "$dir_owner" ]]; then + cprint red bold "✖ Unable to determine owner of install_dir: $install_dir" + exit 1 + fi + + if [[ "$dir_owner" != "$install_user" ]]; then + cprint red bold "✖ Install directory ownership mismatch:" + cprint red " Directory: $install_dir" + cprint red " Owned by: $dir_owner" + cprint red " Expected: $install_user" + exit 1 + fi + + cprint green bold "✔ Permissions and ownership validated. Proceeding." + return 0 +} + + # Map OS arch with actual Node.js Arch name # This function should be placed after var arch has been assigned a valid value. resolve_node_arch() { @@ -737,5 +785,7 @@ main() { if [ "$install_node" = true ]; then safe_run install_node "Node.js installation failed" fi + + safe_run permission_barrier "Permission validation failed — aborting install" } main "$@" \ No newline at end of file From 3d2f42f8476184b10e30e512fd9a8a168f639faa Mon Sep 17 00:00:00 2001 From: KevinLu Date: Wed, 14 May 2025 01:52:58 -0400 Subject: [PATCH 162/338] added function to download MCSManager package --- setup.sh | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/setup.sh b/setup.sh index 54036b7..018226b 100644 --- a/setup.sh +++ b/setup.sh @@ -38,6 +38,9 @@ node_download_fallback="" # Node.js installation path (defaults to the MCSManager installation path. Can be overridden with --node-install-dir) node_install_dir="$install_dir" +# Temp dir for file extraction +tmp_dir="/tmp" + # --------------- Global Variables ---------------# # DO NOT MODIFY # @@ -765,8 +768,82 @@ install_node() { return 0 } +# Function to download MCSM package. fetch from primary URL first, then fallback URL. +# This function only put extracted file(s) into install_dir, it does not perform the actual update. +download_mcsm() { + local archive_name="$package_name" + local archive_path="${tmp_dir}/${archive_name}" + local primary_url="${download_base_url}${archive_name}" + local fallback="$download_fallback_url" + + cprint cyan bold "➡ Downloading MCSManager package..." + + # Step 1: Try downloading from primary URL + if ! wget --progress=bar:force -O "$archive_path" "$primary_url"; then + cprint yellow "Primary download failed. Attempting fallback source..." + + if [[ -z "$fallback" ]]; then + cprint red bold "No fallback URL or path specified." + return 1 + fi + + if [[ "$fallback" =~ ^https?:// ]]; then + if ! wget --progress=bar:force -O "$archive_path" "$fallback"; then + cprint red bold "Fallback download failed from $fallback" + return 1 + fi + elif [[ -f "$fallback" ]]; then + cp "$fallback" "$archive_path" || { + cprint red bold "Failed to copy fallback archive from $fallback" + return 1 + } + else + cprint red bold "Fallback path is invalid: $fallback" + return 1 + fi + fi + # Step 2: Generate extract directory + local suffix + suffix=$(tr -dc 'a-z0-9' Date: Wed, 14 May 2025 02:03:53 -0400 Subject: [PATCH 163/338] updated permission barrier to count for customized systemd file --- setup.sh | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/setup.sh b/setup.sh index 018226b..f1fb22b 100644 --- a/setup.sh +++ b/setup.sh @@ -546,12 +546,20 @@ permission_barrier() { if [[ "${!is_installed_var}" == true ]]; then local installed_user="${!installed_user_var}" + # Step 0: Ensure installed user is detected + if [[ -z "$installed_user" ]]; then + cprint red bold "Detected that '$component' is installed but could not determine the user from its systemd service file." + cprint red " This may indicate a custom or unsupported service file setup." + cprint red " Refusing to proceed to avoid potential conflicts." + exit 1 + fi + # Step 1: User match check if [[ "$installed_user" != "$install_user" ]]; then cprint red bold "Permission mismatch for '$component':" - cprint red "Installed as user: $installed_user" - cprint red "Current install target user: $install_user" - cprint red "Unable to proceed due to ownership conflict." + cprint red " Installed as user: $installed_user" + cprint red " Current install target user: $install_user" + cprint red " Unable to proceed due to ownership conflict." exit 1 fi fi @@ -562,23 +570,24 @@ permission_barrier() { dir_owner=$(stat -c '%U' "$install_dir" 2>/dev/null) if [[ -z "$dir_owner" ]]; then - cprint red bold "✖ Unable to determine owner of install_dir: $install_dir" + cprint red bold "Unable to determine owner of install_dir: $install_dir" exit 1 fi if [[ "$dir_owner" != "$install_user" ]]; then - cprint red bold "✖ Install directory ownership mismatch:" + cprint red bold "Install directory ownership mismatch:" cprint red " Directory: $install_dir" cprint red " Owned by: $dir_owner" cprint red " Expected: $install_user" exit 1 fi - cprint green bold "✔ Permissions and ownership validated. Proceeding." + cprint green bold "Permissions and ownership validated. Proceeding." return 0 } + # Map OS arch with actual Node.js Arch name # This function should be placed after var arch has been assigned a valid value. resolve_node_arch() { From 931c511d969afea0929cef5f6ed1f67004962b80 Mon Sep 17 00:00:00 2001 From: KevinLu Date: Wed, 14 May 2025 02:30:35 -0400 Subject: [PATCH 164/338] added function to prepre file & permissions before actual install --- setup.sh | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/setup.sh b/setup.sh index f1fb22b..96a6cd1 100644 --- a/setup.sh +++ b/setup.sh @@ -74,6 +74,11 @@ install_source_path="" # temp path for extracted file(s) install_tmp_dir="" +# dir name for data dir backup +# e.g. /opt/mcsmanager/daemon/data -> /opt/mcsmanager/data_bak_data +# only valid for when during an update +backup_prefix="data_bak_" + # System architecture (detected automatically) arch="" version="" @@ -854,6 +859,68 @@ download_mcsm() { return 0 } +# Prepare file & permissions before install. +mcsm_install_prepare() { + if [[ ! -d "$install_tmp_dir" ]]; then + cprint red bold "install_tmp_dir does not exist: $install_tmp_dir" + exit 1 + fi + + cprint cyan "Changing ownership of $install_tmp_dir to user '$install_user'..." + chown -R "$install_user":"$install_user" "$install_tmp_dir" || { + cprint red bold "Failed to change ownership of $install_tmp_dir" + exit 1 + } + + # Normalize install_dir to ensure it ends with a slash + [[ "${install_dir}" != */ ]] && install_dir="${install_dir}/" + + if [[ "$web_installed" == false && "$daemon_installed" == false ]]; then + cprint cyan "No existing components detected — skipping data backup/cleanup." + return 0 + fi + + for component in web daemon; do + local is_installed_var="${component}_installed" + if [[ "${!is_installed_var}" == true ]]; then + local component_path="${install_dir}${component}" + local data_dir="${component_path}/data" + local backup_path="${install_dir}${backup_prefix}${component}" + + if [[ ! -d "$component_path" ]]; then + cprint yellow "Expected installed component directory not found: $component_path" + continue + fi + + if [[ -d "$data_dir" ]]; then + if [[ -e "$backup_path" ]]; then + cprint red bold "Backup destination already exists: $backup_path" + cprint red " Please resolve this conflict manually before continuing." + exit 1 + fi + + cprint cyan "Backing up data directory for $component..." + mv "$data_dir" "$backup_path" || { + cprint red bold "Failed to move $data_dir to $backup_path" + exit 1 + } + cprint green "Moved $data_dir → $backup_path" + else + cprint yellow "No data directory found for $component — skipping backup." + fi + + cprint cyan "Removing old component directory: $component_path" + rm -rf "$component_path" || { + cprint red bold "Failed to remove old component directory: $component_path" + exit 1 + } + fi + done + + cprint green bold "Existing components prepared successfully." + return 0 +} + main() { trap 'echo "Unexpected error occurred."; exit 99' ERR From 85281f3992c06431a161434ffd8e1d0da4f2c396 Mon Sep 17 00:00:00 2001 From: KevinLu Date: Wed, 14 May 2025 02:46:44 -0400 Subject: [PATCH 165/338] added function to prepare standalone user --- setup.sh | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/setup.sh b/setup.sh index 96a6cd1..45c262e 100644 --- a/setup.sh +++ b/setup.sh @@ -101,6 +101,8 @@ required_commands=( wget tar stat + useradd + usermod ) # Node.js related sections @@ -859,8 +861,55 @@ download_mcsm() { return 0 } +# Prepare user if needed +prepare_user() { + if [[ "$install_user" == "root" ]]; then + cprint cyan "✔ install_user is 'root' — skipping user creation." + return 0 + fi + + # Check if user already exists + if id "$install_user" &>/dev/null; then + cprint green "User '$install_user' already exists." + else + cprint cyan "Creating system user: $install_user (nologin, no password)..." + if ! useradd --system --home "$install_dir" --shell /usr/sbin/nologin "$install_user"; then + cprint red bold "Failed to create user: $install_user" + exit 1 + fi + cprint green "User '$install_user' created." + fi + + # Docker integration + if command -v docker &>/dev/null; then + cprint cyan "Docker is installed — checking group assignment..." + + if getent group docker &>/dev/null; then + if id -nG "$install_user" | grep -qw docker; then + cprint green "User '$install_user' is already in the 'docker' group." + else + cprint cyan "Adding user '$install_user' to 'docker' group..." + if usermod -aG docker "$install_user"; then + cprint green "Docker group access granted to '$install_user'." + else + cprint red "Failed to add '$install_user' to 'docker' group. Docker may not be usable by this user." + fi + fi + else + cprint red "Docker installed but 'docker' group not found. Skipping group assignment." + fi + else + cprint yellow "Docker not installed — skipping Docker group configuration." + fi + + return 0 +} + # Prepare file & permissions before install. mcsm_install_prepare() { + # Prepare the user first + prepare_user + if [[ ! -d "$install_tmp_dir" ]]; then cprint red bold "install_tmp_dir does not exist: $install_tmp_dir" exit 1 From 297c5c220bd67cf92434f452bd534bdf0550701a Mon Sep 17 00:00:00 2001 From: KevinLu Date: Wed, 14 May 2025 03:07:06 -0400 Subject: [PATCH 166/338] added function to install a single component & simple wrapper --- setup.sh | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/setup.sh b/setup.sh index 45c262e..c683537 100644 --- a/setup.sh +++ b/setup.sh @@ -970,6 +970,82 @@ mcsm_install_prepare() { return 0 } +# Install or update a component +install_component() { + local component="$1" + local target_path="${install_dir}${component}" + local backup_data_path="${install_dir}${backup_prefix}${component}" + local source_path="${install_tmp_dir}/mcsmanager/${component}" + + cprint cyan bold "➡ Installing component: $component" + + # Step 1: Move new component to install_dir + if [[ ! -d "$source_path" ]]; then + cprint red bold "Source directory not found: $source_path" + exit 1 + fi + + if [[ -e "$target_path" ]]; then + cprint red bold "Target path already exists: $target_path" + cprint red " This should not happen — possible permission error or unclean install." + exit 1 + fi + + mv "$source_path" "$target_path" || { + cprint red bold "Failed to move $source_path → $target_path" + exit 1 + } + + cprint green "Moved $component to $target_path" + + # Step 2: Restore backed-up data directory if present + if [[ -d "$backup_data_path" ]]; then + local target_data_path="${target_path}/data" + + cprint cyan "Restoring backed-up data directory for $component..." + + rm -rf "$target_data_path" # Ensure no conflict + mv "$backup_data_path" "$target_data_path" || { + cprint red bold "Failed to restore data directory to $target_data_path" + exit 1 + } + + cprint green "Data directory restored: $target_data_path" + else + cprint yellow "No backed-up data directory found for $component — fresh install assumed." + fi + + # Step 3: Install NPM dependencies + if [[ ! -x "$npm_bin_path" ]]; then + cprint red bold "npm binary not found or not executable: $npm_bin_path" + exit 1 + fi + + cprint cyan "Installing dependencies for $component using npm..." + pushd "$target_path" >/dev/null || { + cprint red bold "Failed to change directory to $target_path" + exit 1 + } + + if ! "$npm_bin_path" install --no-audit --no-fund --loglevel=warn; then + cprint red bold "NPM dependency installation failed for $component" + popd >/dev/null + exit 1 + fi + + popd >/dev/null + cprint green bold "Component '$component' installed successfully." +} + +install_mcsm() { + if [[ "$install_web" == true ]]; then + install_component "web" + fi + + if [[ "$install_daemon" == true ]]; then + install_component "daemon" + fi +} main() { trap 'echo "Unexpected error occurred."; exit 99' ERR @@ -991,5 +1067,8 @@ main() { safe_run permission_barrier "Permission validation failed — aborting install" safe_run download_mcsm "Failed to acquire MCSManager source" + safe_run mcsm_install_prepare "Error while preparing for installation" + + } main "$@" \ No newline at end of file From 1734516ff6d09e2dd5609ba2567f706280d48839 Mon Sep 17 00:00:00 2001 From: KevinLu Date: Wed, 14 May 2025 03:07:52 -0400 Subject: [PATCH 167/338] minor language fix --- setup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.sh b/setup.sh index c683537..8f5de3c 100644 --- a/setup.sh +++ b/setup.sh @@ -977,7 +977,7 @@ install_component() { local backup_data_path="${install_dir}${backup_prefix}${component}" local source_path="${install_tmp_dir}/mcsmanager/${component}" - cprint cyan bold "➡ Installing component: $component" + cprint cyan bold "Installing/Updating component: $component" # Step 1: Move new component to install_dir if [[ ! -d "$source_path" ]]; then @@ -1034,7 +1034,7 @@ install_component() { fi popd >/dev/null - cprint green bold "Component '$component' installed successfully." + cprint green bold "Component '$component' installed/updated successfully." } install_mcsm() { From e757094224fed58bc27b8be54c24f8396c9c813a Mon Sep 17 00:00:00 2001 From: KevinLu Date: Wed, 14 May 2025 03:31:22 -0400 Subject: [PATCH 168/338] added function to create service file --- setup.sh | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/setup.sh b/setup.sh index 8f5de3c..d5e028c 100644 --- a/setup.sh +++ b/setup.sh @@ -1037,13 +1037,83 @@ install_component() { cprint green bold "Component '$component' installed/updated successfully." } +# Create systemd service for a given component. +# This will overwrite the existing service file. +create_systemd_service() { + local component="$1" + local service_path="${systemd_file}${component}.service" + local working_dir="${install_dir}${component}" + local exec="${node_bin_path} app.js" + + if [[ ! -d "$working_dir" ]]; then + cprint red bold "Component directory not found: $working_dir" + return 1 + fi + + cprint cyan "Creating systemd service for '$component'..." + + cat > "$service_path" < 0 )); then + cprint cyan "Reloading systemd daemon..." + # systemctl daemon-reexec + systemctl daemon-reload + + for comp in "${components[@]}"; do + local svc="mcsm-${comp}.service" + + cprint cyan "Enabling service: $svc" + if systemctl enable "$svc" &>/dev/null; then + cprint green "Enabled service: $svc" + else + cprint red bold "Failed to enable service: $svc" + exit 1 + fi + done fi } From 3fda815352ba38074fc242679689bf3a55820819 Mon Sep 17 00:00:00 2001 From: KUMAKAIHA Date: Thu, 15 May 2025 10:38:08 +0800 Subject: [PATCH 169/338] Separate Chinese and English scripts and further automate the process. --- setup_macOS.sh | 223 ++++++++++++++++++++++------------------- setup_macOS_cn.sh | 245 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 366 insertions(+), 102 deletions(-) create mode 100644 setup_macOS_cn.sh diff --git a/setup_macOS.sh b/setup_macOS.sh index f4fbdc4..68de860 100644 --- a/setup_macOS.sh +++ b/setup_macOS.sh @@ -1,197 +1,220 @@ #!/bin/bash -# 获取脚本所在的目录作为安装目录 -# 使用 dirname "$0" 获取脚本路径,然后 cd 到该目录并打印当前路径 (pwd -P 处理符号链接) -# 使用 || exit 表示如果 cd 失败就退出 INSTALL_DIR="$(cd "$(dirname "$0")" || exit; pwd -P)" -MCSM_DIR="$INSTALL_DIR/mcsmanager" # MCSManager 文件解压后的目录 +MCSM_DIR="$INSTALL_DIR/mcsmanager" echo "==================================================" -echo " MCSManager 安装脚本 (macOS)" +echo " MCSManager Installation Script (macOS)" echo "==================================================" -echo "安装目录: $INSTALL_DIR" -echo "注意:需要 Homebrew 和 Node.js 已安装。" +echo "Install directory: $INSTALL_DIR" +echo "Note: Homebrew and Node.js are required." echo "==================================================" -# --- 检查必要命令 --- -echo "检查必要命令 (brew, node, npm, curl, tar, pm2)..." +echo "Automatically checking and installing required dependencies (brew, node, npm, curl, tar, pm2)..." + if ! command -v brew &> /dev/null; then - echo "错误: Homebrew 未找到。请先安装 Homebrew。" - exit 1 + echo "Homebrew not found, installing Homebrew..." + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + if ! command -v brew &> /dev/null; then + echo "Error: Homebrew installation failed." + exit 1 + fi fi + if ! command -v node &> /dev/null; then - echo "错误: Node.js 未找到。请使用 'brew install node' 安装。" - exit 1 + echo "Node.js not found, installing Node.js via Homebrew..." + brew install node + if ! command -v node &> /dev/null; then + echo "Error: Node.js installation failed." + exit 1 + fi fi + if ! command -v npm &> /dev/null; then - echo "错误: npm 未找到。请确保 Node.js 安装正确。" - exit 1 + echo "npm not found, reinstalling Node.js via Homebrew..." + brew install node + if ! command -v npm &> /dev/null; then + echo "Error: npm installation failed." + exit 1 + fi fi + if ! command -v curl &> /dev/null; then - echo "错误: curl 未找到。" - exit 1 + echo "curl not found, installing curl via Homebrew..." + brew install curl + if ! command -v curl &> /dev/null; then + echo "Error: curl installation failed." + exit 1 + fi fi + if ! command -v tar &> /dev/null; then - echo "错误: tar 未找到。" - exit 1 + echo "tar not found, installing tar via Homebrew..." + brew install tar + if ! command -v tar &> /dev/null; then + echo "Error: tar installation failed." + exit 1 + fi fi -# 检查 PM2 是否全局安装,如果没有则提示用户或尝试安装 if ! command -v pm2 &> /dev/null; then - echo "PM2 未找到。尝试全局安装 PM2..." + echo "PM2 not found, installing PM2 globally..." npm install -g pm2 if ! command -v pm2 &> /dev/null; then - echo "错误: PM2 安装失败。请手动运行 'npm install -g pm2'。" + echo "Error: PM2 installation failed. Please run 'npm install -g pm2' manually." exit 1 fi - echo "PM2 安装成功。" + echo "PM2 installed successfully." else - echo "PM2 已安装。" + echo "PM2 is already installed." fi -echo "必要命令检查通过。" - -# --- 提供安装选项 --- -echo "请选择安装模式:" -echo "1) 安装 Web 面板 + 节点 (Daemon) (推荐)" -echo "2) 只安装节点 (Daemon)" -read -p "请输入选项 (1 或 2): " choice +echo "All dependencies checked and installed." -# 验证用户输入 -if [[ "$choice" != "1" && "$choice" != "2" ]]; then - echo "无效的输入。请重新运行脚本并选择 1 或 2。" - exit 1 +echo "Web Panel + Node (Daemon) will be installed automatically (recommended)." +read -p "Continue installation? (y/n): " confirm +if [[ "$confirm" != "y" && "$confirm" != "Y" ]]; then + echo "Installation cancelled." + exit 0 fi +choice="1" -# --- 创建安装目录 (脚本所在目录已存在,但需要确保是可写) --- -echo "使用安装目录: $INSTALL_DIR" +echo "Using install directory: $INSTALL_DIR" if [ ! -w "$INSTALL_DIR" ]; then - echo "错误: 脚本所在目录 $INSTALL_DIR 不可写。请检查权限。" + echo "Error: $INSTALL_DIR is not writable. Please check permissions." exit 1 fi -echo "目录权限检查通过。" +echo "Directory permission check passed." -# --- 下载 MCSManager Release --- -# 使用 Linux 版本,因为 Node.js 部分是跨平台的,且 release 包同时包含 web 和 daemon MCSM_TAR_URL="https://github.com/MCSManager/MCSManager/releases/latest/download/mcsmanager_linux_release.tar.gz" MCSM_TAR_FILE="$INSTALL_DIR/mcsmanager_linux_release.tar.gz" -echo "下载 MCSManager Release ($MCSM_TAR_URL) 到 $MCSM_TAR_FILE" -# 使用 curl 下载,-L 跟随重定向,-o 指定输出文件,-f 在 HTTP 错误时退出 +echo "Downloading MCSManager Release ($MCSM_TAR_URL) to $MCSM_TAR_FILE" curl -L -f "$MCSM_TAR_URL" -o "$MCSM_TAR_FILE" if [ $? -ne 0 ]; then - echo "错误: 下载失败。请检查网络连接或 URL。" + echo "Error: Download failed. Please check your network or the URL." exit 1 fi -echo "下载成功。" +echo "Download successful." -# --- 解压 MCSManager Release --- -echo "解压 $MCSM_TAR_FILE 到 $INSTALL_DIR" -# -C 指定解压目录 +echo "Extracting $MCSM_TAR_FILE to $INSTALL_DIR" tar -zxf "$MCSM_TAR_FILE" -C "$INSTALL_DIR" if [ $? -ne 0 ]; then - echo "错误: 解压失败。" - # 尝试删除可能不完整的目录 + echo "Error: Extraction failed." rm -rf "$MCSM_DIR" exit 1 fi -# 检查解压是否成功创建了 mcsmanager 目录 if [ ! -d "$MCSM_DIR" ]; then - echo "错误: 解压失败。未找到目录 $MCSM_DIR。" + echo "Error: Extraction failed. Directory $MCSM_DIR not found." exit 1 fi -echo "解压成功。" +echo "Extraction successful." -# 清理下载的压缩包 -echo "移除下载的压缩包: $MCSM_TAR_FILE" +echo "Removing downloaded archive: $MCSM_TAR_FILE" rm "$MCSM_TAR_FILE" -# --- 进入 MCSManager 目录并安装依赖 --- -echo "切换到目录: $MCSM_DIR" +echo "Changing to directory: $MCSM_DIR" cd "$MCSM_DIR" if [ $? -ne 0 ]; then - echo "错误: 无法切换到目录 $MCSM_DIR。" + echo "Error: Failed to change directory to $MCSM_DIR." exit 1 fi -echo "运行 ./install.sh 安装依赖..." -# 使用 bash 确保脚本正确执行 +echo "Running ./install.sh to install dependencies..." bash ./install.sh if [ $? -ne 0 ]; then - echo "错误: ./install.sh 运行失败。请检查输出信息。" + echo "Error: ./install.sh failed. Please check the output." exit 1 fi -echo "依赖安装步骤完成。" +echo "Dependency installation completed." -# --- 使用 PM2 启动 MCSManager 进程并配置自启动 --- -echo "使用 PM2 启动 MCSManager 进程..." +echo "Starting MCSManager processes with PM2..." -# 停止并删除旧的 PM2 进程(如果存在) -echo "停止并删除旧的 PM2 进程 (如果存在)..." +echo "Stopping and deleting old PM2 processes (if any)..." pm2 stop MCSManager-Daemon &> /dev/null pm2 delete MCSManager-Daemon &> /dev/null pm2 stop MCSManager-Web &> /dev/null pm2 delete MCSManager-Web &> /dev/null -sleep 1 # 等待片刻确保进程停止 +sleep 1 -# 启动 Daemon -echo "启动 MCSManager Daemon..." -pm2 start ./start-daemon.sh --name "MCSManager-Daemon" --output "$INSTALL_DIR/daemon_output.log" --error "$INSTALL_DIR/daemon_error.log" -sleep 3 # 等待片刻让 PM2 启动进程 +echo "Starting MCSManager Daemon..." +pm2 start ./start-daemon.sh --name "MCSManager-Daemon" --output "$MCSM_DIR/daemon_output.log" --error "$MCSM_DIR/daemon_error.log" +sleep 3 if ! pm2 status | grep -q "MCSManager-Daemon"; then - echo "错误: PM2 未能成功启动 MCSManager-Daemon。" + echo "Error: PM2 failed to start MCSManager-Daemon." pm2 logs MCSManager-Daemon exit 1 fi -echo "MCSManager Daemon 已通过 PM2 启动。" -echo "查看 Daemon 状态: pm2 status MCSManager-Daemon" -echo "查看 Daemon 日志: pm2 logs MCSManager-Daemon" -echo "Daemon 默认监听端口: 24444" +echo "MCSManager Daemon started with PM2." +echo "Check Daemon status: pm2 status MCSManager-Daemon" +echo "Check Daemon logs: pm2 logs MCSManager-Daemon" +echo "Daemon default port: 24444" - -# 如果选择安装 Web 面板 if [ "$choice" == "1" ]; then echo "" - echo "启动 MCSManager Web 面板..." - pm2 start ./start-web.sh --name "MCSManager-Web" --output "$INSTALL_DIR/web_output.log" --error "$INSTALL_DIR/web_error.log" - sleep 3 # 等待片刻让 PM2 启动进程 + echo "Starting MCSManager Web Panel..." + pm2 start ./start-web.sh --name "MCSManager-Web" --output "$MCSM_DIR/web_output.log" --error "$MCSM_DIR/web_error.log" + sleep 3 if ! pm2 status | grep -q "MCSManager-Web"; then - echo "错误: PM2 未能成功启动 MCSManager-Web。" + echo "Error: PM2 failed to start MCSManager-Web." pm2 logs MCSManager-Web - # 注意:这里不退出,因为 Daemon 可能已经启动成功 - echo "请手动检查 MCSManager-Web 的问题。" + echo "Please check the MCSManager-Web issue manually." else - echo "MCSManager Web 面板已通过 PM2 启动。" - echo "查看 Web 状态: pm2 status MCSManager-Web" - echo "查看 Web 日志: pm2 logs MCSManager-Web" - echo "Web 默认监听端口: 23333" + echo "MCSManager Web Panel started with PM2." + echo "Check Web status: pm2 status MCSManager-Web" + echo "Check Web logs: pm2 logs MCSManager-Web" + echo "Web default port: 23333" fi fi echo "" -echo "配置 PM2 自启动 (使用 launchd)..." -# 这个命令会生成一个 launchd 配置文件,并通常会输出一条需要用户手动运行的命令 -# 运行一次即可,它配置的是 PM2 daemon 本身,而不是 MCSM 进程 -pm2 startup launchd +echo "Configuring PM2 startup (using launchd)..." +startup_cmd=$(pm2 startup launchd | grep 'sudo' | sed 's/^.*\(sudo.*\)$/\1/') +if [ -n "$startup_cmd" ]; then + echo "Executing PM2 startup command automatically..." + eval $startup_cmd + if [ $? -eq 0 ]; then + echo "PM2 startup configuration completed automatically." + else + echo "Failed to execute PM2 startup command automatically. Please run the following command manually:" + echo " $startup_cmd" + fi +else + echo "Failed to get PM2 startup command automatically. Please run 'pm2 startup launchd' and follow the instructions." +fi echo "" echo "==================================================" if [ "$choice" == "1" ]; then - echo " MCSManager Web 面板 + 节点 安装完成!" + echo " MCSManager Web Panel + Node installation completed!" else - echo " MCSManager 节点 (Daemon) 安装完成!" + echo " MCSManager Node (Daemon) installation completed!" fi echo "==================================================" -echo "安装目录: $INSTALL_DIR" +echo "Install directory: $INSTALL_DIR" echo "" +GLOBAL_JSON="$MCSM_DIR/daemon/data/Config/global.json" +if [ -f "$GLOBAL_JSON" ]; then + NODE_KEY=$(grep '"key"' "$GLOBAL_JSON" | head -n1 | sed 's/.*"key": *"\([^"]*\)".*/\1/') + if [ -n "$NODE_KEY" ]; then + echo "请及时复制以下远程节点密钥,用于连接节点:" + echo "节点 Key: $NODE_KEY" + else + echo "未能自动获取节点 Key,请手动查看 $GLOBAL_JSON" + fi +else + echo "未找到 $GLOBAL_JSON,无法获取节点 Key。" +fi + +echo "" echo "--- PM2 控制命令参考 ---" echo "查看所有 MCSManager 进程状态:" echo " pm2 status" echo "" echo "--- Daemon (节点) ---" echo "进程名: MCSManager-Daemon" -echo "日志文件: $INSTALL_DIR/daemon_output.log, $INSTALL_DIR/daemon_error.log" +echo "日志文件: $MCSM_DIR/daemon_output.log, $MCSM_DIR/daemon_error.log" echo "启动 Daemon: pm2 start MCSManager-Daemon" echo "停止 Daemon: pm2 stop MCSManager-Daemon" echo "重启 Daemon: pm2 restart MCSManager-Daemon" @@ -203,7 +226,7 @@ echo "" if [ "$choice" == "1" ]; then echo "--- Web 面板 ---" echo "进程名: MCSManager-Web" - echo "日志文件: $INSTALL_DIR/web_output.log, $INSTALL_DIR/web_error.log" + echo "日志文件: $MCSM_DIR/web_output.log, $MCSM_DIR/web_error.log" echo "启动 Web: pm2 start MCSManager-Web" echo "停止 Web: pm2 stop MCSManager-Web" echo "重启 Web: pm2 restart MCSManager-Web" @@ -215,11 +238,7 @@ if [ "$choice" == "1" ]; then fi echo "--- 重要:完成自启动设置 ---" -echo "请查找上面 'pm2 startup launchd' 命令的输出,它会显示一条需要您手动执行的命令,通常以 'sudo env PATH=...' 开头。" -echo "请复制并粘贴该命令到终端中运行,以确保 PM2 Daemon 本身在系统重启后自动启动,从而管理 MCSManager 进程。" -echo "示例 (请运行实际输出的命令):" -echo " sudo env PATH=\$PATH:/usr/local/bin /Users/youruser/.nvm/versions/node/vX.Y.Z/bin/pm2 startup launchd -u youruser --hp /Users/youruser" -echo "" +echo "PM2 自启动配置已自动尝试执行。若有报错,请参考上方命令手动执行。" echo "==================================================" exit 0 diff --git a/setup_macOS_cn.sh b/setup_macOS_cn.sh new file mode 100644 index 0000000..6374f67 --- /dev/null +++ b/setup_macOS_cn.sh @@ -0,0 +1,245 @@ +#!/bin/bash + +INSTALL_DIR="$(cd "$(dirname "$0")" || exit; pwd -P)" +MCSM_DIR="$INSTALL_DIR/mcsmanager" + +echo "==================================================" +echo " MCSManager 安装脚本 (macOS)" +echo "==================================================" +echo "安装目录: $INSTALL_DIR" +echo "注意:需要 Homebrew 和 Node.js 已安装。" +echo "==================================================" + +echo "将自动检测并安装所需依赖 (brew, node, npm, curl, tar, pm2)..." + +if ! command -v brew &> /dev/null; then + echo "未检测到 Homebrew,正在自动安装 Homebrew..." + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + if ! command -v brew &> /dev/null; then + echo "错误: Homebrew 安装失败。" + exit 1 + fi +fi + +if ! command -v node &> /dev/null; then + echo "未检测到 Node.js,正在通过 Homebrew 安装 Node.js..." + brew install node + if ! command -v node &> /dev/null; then + echo "错误: Node.js 安装失败。" + exit 1 + fi +fi + +if ! command -v npm &> /dev/null; then + echo "未检测到 npm,正在通过 Homebrew 重新安装 Node.js..." + brew install node + if ! command -v npm &> /dev/null; then + echo "错误: npm 安装失败。" + exit 1 + fi +fi + +if ! command -v curl &> /dev/null; then + echo "未检测到 curl,正在通过 Homebrew 安装 curl..." + brew install curl + if ! command -v curl &> /dev/null; then + echo "错误: curl 安装失败。" + exit 1 + fi +fi + +if ! command -v tar &> /dev/null; then + echo "未检测到 tar,正在通过 Homebrew 安装 tar..." + brew install tar + if ! command -v tar &> /dev/null; then + echo "错误: tar 安装失败。" + exit 1 + fi +fi + +if ! command -v pm2 &> /dev/null; then + echo "未检测到 PM2,正在全局安装 PM2..." + npm install -g pm2 + if ! command -v pm2 &> /dev/null; then + echo "错误: PM2 安装失败。请手动运行 'npm install -g pm2'。" + exit 1 + fi + echo "PM2 安装成功。" +else + echo "PM2 已安装。" +fi +echo "所有依赖检测并安装完成。" + +echo "将自动安装 Web 面板 + 节点 (Daemon) (推荐)" +read -p "是否继续安装?(y/n): " confirm +if [[ "$confirm" != "y" && "$confirm" != "Y" ]]; then + echo "已取消安装。" + exit 0 +fi +choice="1" + +echo "使用安装目录: $INSTALL_DIR" +if [ ! -w "$INSTALL_DIR" ]; then + echo "错误: 脚本所在目录 $INSTALL_DIR 不可写。请检查权限。" + exit 1 +fi +echo "目录权限检查通过。" + +MCSM_TAR_URL="https://github.com/MCSManager/MCSManager/releases/latest/download/mcsmanager_linux_release.tar.gz" +MCSM_TAR_FILE="$INSTALL_DIR/mcsmanager_linux_release.tar.gz" + +echo "下载 MCSManager Release ($MCSM_TAR_URL) 到 $MCSM_TAR_FILE" +curl -L -f "$MCSM_TAR_URL" -o "$MCSM_TAR_FILE" +if [ $? -ne 0 ]; then + echo "错误: 下载失败。请检查网络连接或 URL。" + exit 1 +fi +echo "下载成功。" + +echo "解压 $MCSM_TAR_FILE 到 $INSTALL_DIR" +tar -zxf "$MCSM_TAR_FILE" -C "$INSTALL_DIR" +if [ $? -ne 0 ]; then + echo "错误: 解压失败。" + rm -rf "$MCSM_DIR" + exit 1 +fi + +if [ ! -d "$MCSM_DIR" ]; then + echo "错误: 解压失败。未找到目录 $MCSM_DIR。" + exit 1 +fi +echo "解压成功。" + +echo "移除下载的压缩包: $MCSM_TAR_FILE" +rm "$MCSM_TAR_FILE" + +echo "切换到目录: $MCSM_DIR" +cd "$MCSM_DIR" +if [ $? -ne 0 ]; then + echo "错误: 无法切换到目录 $MCSM_DIR。" + exit 1 +fi + +echo "运行 ./install.sh 安装依赖..." +bash ./install.sh +if [ $? -ne 0 ]; then + echo "错误: ./install.sh 运行失败。请检查输出信息。" + exit 1 +fi +echo "依赖安装步骤完成。" + +echo "使用 PM2 启动 MCSManager 进程..." + +echo "停止并删除旧的 PM2 进程 (如果存在)..." +pm2 stop MCSManager-Daemon &> /dev/null +pm2 delete MCSManager-Daemon &> /dev/null +pm2 stop MCSManager-Web &> /dev/null +pm2 delete MCSManager-Web &> /dev/null +sleep 1 + +echo "启动 MCSManager Daemon..." +pm2 start ./start-daemon.sh --name "MCSManager-Daemon" --output "$MCSM_DIR/daemon_output.log" --error "$MCSM_DIR/daemon_error.log" +sleep 3 +if ! pm2 status | grep -q "MCSManager-Daemon"; then + echo "错误: PM2 未能成功启动 MCSManager-Daemon。" + pm2 logs MCSManager-Daemon + exit 1 +fi +echo "MCSManager Daemon 已通过 PM2 启动。" +echo "查看 Daemon 状态: pm2 status MCSManager-Daemon" +echo "查看 Daemon 日志: pm2 logs MCSManager-Daemon" +echo "Daemon 默认监听端口: 24444" + +if [ "$choice" == "1" ]; then + echo "" + echo "启动 MCSManager Web 面板..." + pm2 start ./start-web.sh --name "MCSManager-Web" --output "$MCSM_DIR/web_output.log" --error "$MCSM_DIR/web_error.log" + sleep 3 + if ! pm2 status | grep -q "MCSManager-Web"; then + echo "错误: PM2 未能成功启动 MCSManager-Web。" + pm2 logs MCSManager-Web + echo "请手动检查 MCSManager-Web 的问题。" + else + echo "MCSManager Web 面板已通过 PM2 启动。" + echo "查看 Web 状态: pm2 status MCSManager-Web" + echo "查看 Web 日志: pm2 logs MCSManager-Web" + echo "Web 默认监听端口: 23333" + fi +fi + +echo "" +echo "配置 PM2 自启动 (使用 launchd)..." +startup_cmd=$(pm2 startup launchd | grep 'sudo' | sed 's/^.*\(sudo.*\)$/\1/') +if [ -n "$startup_cmd" ]; then + echo "自动执行 PM2 自启动命令..." + eval $startup_cmd + if [ $? -eq 0 ]; then + echo "PM2 自启动配置已自动完成。" + else + echo "自动执行 PM2 自启动命令失败,请手动执行以下命令:" + echo " $startup_cmd" + fi +else + echo "未能自动获取 PM2 自启动命令,请手动运行 'pm2 startup launchd' 并按提示操作。" +fi + +echo "" +echo "==================================================" +if [ "$choice" == "1" ]; then + echo " MCSManager Web 面板 + 节点 安装完成!" +else + echo " MCSManager 节点 (Daemon) 安装完成!" +fi +echo "==================================================" +echo "安装目录: $INSTALL_DIR" +echo "" + +GLOBAL_JSON="$MCSM_DIR/daemon/data/Config/global.json" +if [ -f "$GLOBAL_JSON" ]; then + NODE_KEY=$(grep '"key"' "$GLOBAL_JSON" | head -n1 | sed 's/.*"key": *"\([^"]*\)".*/\1/') + if [ -n "$NODE_KEY" ]; then + echo "请及时复制以下远程节点密钥,用于连接节点:" + echo "节点 Key: $NODE_KEY" + else + echo "未能自动获取节点 Key,请手动查看 $GLOBAL_JSON" + fi +else + echo "未找到 $GLOBAL_JSON,无法获取节点 Key。" +fi + +echo "" +echo "--- PM2 控制命令参考 ---" +echo "查看所有 MCSManager 进程状态:" +echo " pm2 status" +echo "" +echo "--- Daemon (节点) ---" +echo "进程名: MCSManager-Daemon" +echo "日志文件: $MCSM_DIR/daemon_output.log, $MCSM_DIR/daemon_error.log" +echo "启动 Daemon: pm2 start MCSManager-Daemon" +echo "停止 Daemon: pm2 stop MCSManager-Daemon" +echo "重启 Daemon: pm2 restart MCSManager-Daemon" +echo "删除 Daemon (从 PM2 列表移除): pm2 delete MCSManager-Daemon" +echo "查看 Daemon 日志: pm2 logs MCSManager-Daemon" +echo "查看 Daemon 实时日志: pm2 logs MCSManager-Daemon --follow" +echo "" + +if [ "$choice" == "1" ]; then + echo "--- Web 面板 ---" + echo "进程名: MCSManager-Web" + echo "日志文件: $MCSM_DIR/web_output.log, $MCSM_DIR/web_error.log" + echo "启动 Web: pm2 start MCSManager-Web" + echo "停止 Web: pm2 stop MCSManager-Web" + echo "重启 Web: pm2 restart MCSManager-Web" + echo "删除 Web (从 PM2 列表移除): pm2 delete MCSManager-Web" + echo "查看 Web 日志: pm2 logs MCSManager-Web" + echo "查看 Web 实时日志: pm2 logs MCSManager-Web --follow" + echo "" + echo "默认访问地址: http://localhost:23333" +fi + +echo "--- 重要:完成自启动设置 ---" +echo "PM2 自启动配置已自动尝试执行。若有报错,请参考上方命令手动执行。" +echo "==================================================" + +exit 0 + From edfb57be17431c8622137325f6a1d9af7436f430 Mon Sep 17 00:00:00 2001 From: KUMAKAIHA Date: Thu, 15 May 2025 11:27:15 +0800 Subject: [PATCH 170/338] Add a separate installation option for nodes --- setup_macOS.sh | 67 ++++++++++++++++++++++++----------------------- setup_macOS_cn.sh | 13 ++++----- 2 files changed, 41 insertions(+), 39 deletions(-) diff --git a/setup_macOS.sh b/setup_macOS.sh index 68de860..3df4d1b 100644 --- a/setup_macOS.sh +++ b/setup_macOS.sh @@ -70,13 +70,14 @@ else fi echo "All dependencies checked and installed." -echo "Web Panel + Node (Daemon) will be installed automatically (recommended)." -read -p "Continue installation? (y/n): " confirm -if [[ "$confirm" != "y" && "$confirm" != "Y" ]]; then - echo "Installation cancelled." - exit 0 +echo "Please select installation mode:" +echo "1) Install Web Panel + Node (Daemon) (recommended)" +echo "2) Install Node (Daemon) only" +read -p "Enter your choice (1 or 2): " choice +if [[ "$choice" != "1" && "$choice" != "2" ]]; then + echo "Invalid input. Please rerun the script and select 1 or 2." + exit 1 fi -choice="1" echo "Using install directory: $INSTALL_DIR" if [ ! -w "$INSTALL_DIR" ]; then @@ -198,47 +199,47 @@ GLOBAL_JSON="$MCSM_DIR/daemon/data/Config/global.json" if [ -f "$GLOBAL_JSON" ]; then NODE_KEY=$(grep '"key"' "$GLOBAL_JSON" | head -n1 | sed 's/.*"key": *"\([^"]*\)".*/\1/') if [ -n "$NODE_KEY" ]; then - echo "请及时复制以下远程节点密钥,用于连接节点:" - echo "节点 Key: $NODE_KEY" + echo "Please copy the following remote node key for connecting this node:" + echo "Node Key: $NODE_KEY" else - echo "未能自动获取节点 Key,请手动查看 $GLOBAL_JSON" + echo "Failed to automatically get node key, please check $GLOBAL_JSON manually." fi else - echo "未找到 $GLOBAL_JSON,无法获取节点 Key。" + echo "File $GLOBAL_JSON not found, unable to get node key." fi echo "" -echo "--- PM2 控制命令参考 ---" -echo "查看所有 MCSManager 进程状态:" +echo "--- PM2 Command Reference ---" +echo "Check all MCSManager process status:" echo " pm2 status" echo "" -echo "--- Daemon (节点) ---" -echo "进程名: MCSManager-Daemon" -echo "日志文件: $MCSM_DIR/daemon_output.log, $MCSM_DIR/daemon_error.log" -echo "启动 Daemon: pm2 start MCSManager-Daemon" -echo "停止 Daemon: pm2 stop MCSManager-Daemon" -echo "重启 Daemon: pm2 restart MCSManager-Daemon" -echo "删除 Daemon (从 PM2 列表移除): pm2 delete MCSManager-Daemon" -echo "查看 Daemon 日志: pm2 logs MCSManager-Daemon" -echo "查看 Daemon 实时日志: pm2 logs MCSManager-Daemon --follow" +echo "--- Daemon (Node) ---" +echo "Process name: MCSManager-Daemon" +echo "Log files: $MCSM_DIR/daemon_output.log, $MCSM_DIR/daemon_error.log" +echo "Start Daemon: pm2 start MCSManager-Daemon" +echo "Stop Daemon: pm2 stop MCSManager-Daemon" +echo "Restart Daemon: pm2 restart MCSManager-Daemon" +echo "Delete Daemon (remove from PM2): pm2 delete MCSManager-Daemon" +echo "View Daemon logs: pm2 logs MCSManager-Daemon" +echo "View Daemon live logs: pm2 logs MCSManager-Daemon --follow" echo "" if [ "$choice" == "1" ]; then - echo "--- Web 面板 ---" - echo "进程名: MCSManager-Web" - echo "日志文件: $MCSM_DIR/web_output.log, $MCSM_DIR/web_error.log" - echo "启动 Web: pm2 start MCSManager-Web" - echo "停止 Web: pm2 stop MCSManager-Web" - echo "重启 Web: pm2 restart MCSManager-Web" - echo "删除 Web (从 PM2 列表移除): pm2 delete MCSManager-Web" - echo "查看 Web 日志: pm2 logs MCSManager-Web" - echo "查看 Web 实时日志: pm2 logs MCSManager-Web --follow" + echo "--- Web Panel ---" + echo "Process name: MCSManager-Web" + echo "Log files: $MCSM_DIR/web_output.log, $MCSM_DIR/web_error.log" + echo "Start Web: pm2 start MCSManager-Web" + echo "Stop Web: pm2 stop MCSManager-Web" + echo "Restart Web: pm2 restart MCSManager-Web" + echo "Delete Web (remove from PM2): pm2 delete MCSManager-Web" + echo "View Web logs: pm2 logs MCSManager-Web" + echo "View Web live logs: pm2 logs MCSManager-Web --follow" echo "" - echo "默认访问地址: http://localhost:23333" + echo "Default access: http://localhost:23333" fi -echo "--- 重要:完成自启动设置 ---" -echo "PM2 自启动配置已自动尝试执行。若有报错,请参考上方命令手动执行。" +echo "--- IMPORTANT: Complete PM2 Startup Setup ---" +echo "PM2 startup configuration has been attempted automatically. If there are errors, please refer to the command above and run it manually." echo "==================================================" exit 0 diff --git a/setup_macOS_cn.sh b/setup_macOS_cn.sh index 6374f67..55294ff 100644 --- a/setup_macOS_cn.sh +++ b/setup_macOS_cn.sh @@ -70,13 +70,14 @@ else fi echo "所有依赖检测并安装完成。" -echo "将自动安装 Web 面板 + 节点 (Daemon) (推荐)" -read -p "是否继续安装?(y/n): " confirm -if [[ "$confirm" != "y" && "$confirm" != "Y" ]]; then - echo "已取消安装。" - exit 0 +echo "请选择安装模式:" +echo "1) 安装 Web 面板 + 节点 (Daemon) (推荐)" +echo "2) 只安装节点 (Daemon)" +read -p "请输入选项 (1 或 2): " choice +if [[ "$choice" != "1" && "$choice" != "2" ]]; then + echo "无效的输入。请重新运行脚本并选择 1 或 2。" + exit 1 fi -choice="1" echo "使用安装目录: $INSTALL_DIR" if [ ! -w "$INSTALL_DIR" ]; then From 8624ebe17769171931e28192e9e4b2288fa198a4 Mon Sep 17 00:00:00 2001 From: KUMAKAIHA Date: Thu, 15 May 2025 11:34:39 +0800 Subject: [PATCH 171/338] Optimize script prompt text --- setup_macOS.sh | 2 +- setup_macOS_cn.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup_macOS.sh b/setup_macOS.sh index 3df4d1b..f711303 100644 --- a/setup_macOS.sh +++ b/setup_macOS.sh @@ -172,7 +172,7 @@ echo "" echo "Configuring PM2 startup (using launchd)..." startup_cmd=$(pm2 startup launchd | grep 'sudo' | sed 's/^.*\(sudo.*\)$/\1/') if [ -n "$startup_cmd" ]; then - echo "Executing PM2 startup command automatically..." + echo "Executing PM2 startup command automatically. Please enter your password below (not visible):" eval $startup_cmd if [ $? -eq 0 ]; then echo "PM2 startup configuration completed automatically." diff --git a/setup_macOS_cn.sh b/setup_macOS_cn.sh index 55294ff..abcc950 100644 --- a/setup_macOS_cn.sh +++ b/setup_macOS_cn.sh @@ -172,7 +172,7 @@ echo "" echo "配置 PM2 自启动 (使用 launchd)..." startup_cmd=$(pm2 startup launchd | grep 'sudo' | sed 's/^.*\(sudo.*\)$/\1/') if [ -n "$startup_cmd" ]; then - echo "自动执行 PM2 自启动命令..." + echo "自动执行 PM2 自启动命令 请在下方输入密码(非明文)" eval $startup_cmd if [ $? -eq 0 ]; then echo "PM2 自启动配置已自动完成。" From 4612c7d72e23f80a5453bc08f01011daedc2c09a Mon Sep 17 00:00:00 2001 From: KevinLu Date: Thu, 15 May 2025 01:15:58 -0400 Subject: [PATCH 172/338] added function to extract daemon key and http port --- setup.sh | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/setup.sh b/setup.sh index d5e028c..d9adcd8 100644 --- a/setup.sh +++ b/setup.sh @@ -125,6 +125,12 @@ node_arch="" # Hold Node.js intallation path, e.g. ${node_install_dir}/node-${node_version}-linux-${arch} node_path="" +# For installation result +daemon_key="" +web_port="" +daemon_key_config_subpath="data/Config/global.json" +web_port_config_subpath="data/SystemConfig/config.json" + # Terminal color & style related # Default to false, auto check later SUPPORTS_COLOR=false @@ -1082,6 +1088,64 @@ EOF return 0 } +# Extract daemon key and/or http port +extract_component_info() { + # DAEMON SECTION + if [[ "$install_daemon" == true ]]; then + local daemon_service="mcsm-daemon.service" + local daemon_path="${install_dir}/daemon" + local daemon_config_path="${daemon_path}/${daemon_key_config_subpath}" + + cprint cyan bold "Starting daemon service..." + if systemctl start "$daemon_service"; then + cprint green "Daemon service started." + + sleep 1 # Let the service init and config populate + + if [[ -f "$daemon_config_path" ]]; then + daemon_key=$(grep -oP '"key"\s*:\s*"\K[^"]+' "$daemon_config_path") + if [[ -n "$daemon_key" ]]; then + cprint green "Extracted daemon key: $daemon_key" + else + cprint red "Failed to extract daemon key from: $daemon_config_path" + fi + else + cprint red "Daemon config file not found: $daemon_config_path" + fi + else + cprint red bold "Failed to start daemon service: $daemon_service" + fi + fi + + # WEB SECTION + if [[ "$install_web" == true ]]; then + local web_service="mcsm-web.service" + local web_path="${install_dir}/web" + local web_config_path="${web_path}/${web_port_config_subpath}" + + cprint cyan bold "Starting web service..." + if systemctl start "$web_service"; then + cprint green "Web service started." + + sleep 1 + + if [[ -f "$web_config_path" ]]; then + web_port=$(grep -oP '"httpPort"\s*:\s*"\K[^"]+' "$web_config_path") + if [[ -n "$web_port" ]]; then + cprint green "Extracted web port: $web_port" + else + cprint red "Failed to extract web port from: $web_config_path" + fi + else + cprint red "Web config file not found: $web_config_path" + fi + else + cprint red bold "Failed to start web service: $web_service" + fi + fi +} + + install_mcsm() { local components=() From 3a845786f33871c51c5413083d087a3e0863be6c Mon Sep 17 00:00:00 2001 From: KevinLu Date: Thu, 15 May 2025 03:26:12 -0400 Subject: [PATCH 173/338] added support for daemon port --- setup.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/setup.sh b/setup.sh index d9adcd8..01cf92a 100644 --- a/setup.sh +++ b/setup.sh @@ -127,6 +127,7 @@ node_path="" # For installation result daemon_key="" +daemon_port="" web_port="" daemon_key_config_subpath="data/Config/global.json" web_port_config_subpath="data/SystemConfig/config.json" @@ -1100,15 +1101,23 @@ extract_component_info() { if systemctl start "$daemon_service"; then cprint green "Daemon service started." - sleep 1 # Let the service init and config populate + sleep 1 # Allow service to init and write configs if [[ -f "$daemon_config_path" ]]; then daemon_key=$(grep -oP '"key"\s*:\s*"\K[^"]+' "$daemon_config_path") + daemon_port=$(grep -oP '"port"\s*:\s*\K[0-9]+' "$daemon_config_path") + if [[ -n "$daemon_key" ]]; then cprint green "Extracted daemon key: $daemon_key" else cprint red "Failed to extract daemon key from: $daemon_config_path" fi + + if [[ -n "$daemon_port" ]]; then + cprint green "Extracted daemon port: $daemon_port" + else + cprint red "Failed to extract daemon port from: $daemon_config_path" + fi else cprint red "Daemon config file not found: $daemon_config_path" fi @@ -1127,7 +1136,7 @@ extract_component_info() { if systemctl start "$web_service"; then cprint green "Web service started." - sleep 1 + sleep 1 # Allow time to populate config if [[ -f "$web_config_path" ]]; then web_port=$(grep -oP '"httpPort"\s*:\s*"\K[^"]+' "$web_config_path") @@ -1145,7 +1154,6 @@ extract_component_info() { fi } - install_mcsm() { local components=() From f659d3272a95b37b44d163aa7b8617b50d809aec Mon Sep 17 00:00:00 2001 From: KevinLu Date: Thu, 15 May 2025 03:52:11 -0400 Subject: [PATCH 174/338] added intallation result --- setup.sh | 100 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 99 insertions(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index 01cf92a..d6767a0 100644 --- a/setup.sh +++ b/setup.sh @@ -1154,6 +1154,100 @@ extract_component_info() { fi } +print_install_result() { + # Clear the screen + clear &>/dev/null || true + + # Print ASCII banner + echo "" + echo " _/ _/ _/_/_/ _/_/_/ _/ _/ " + echo " _/_/ _/_/ _/ _/ _/_/ _/_/ _/_/_/ _/_/_/ _/_/_/ _/_/_/ _/_/ _/ _/_/ " + echo " _/ _/ _/ _/ _/_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/_/_/_/ _/_/ " + echo " _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ " + echo "_/ _/ _/_/_/ _/_/_/ _/ _/ _/_/_/ _/ _/ _/_/_/ _/_/_/ _/_/_/ _/ " + echo " _/ " + echo " _/_/ " + echo "" + + # status summary + echo "Installed/Updated Components:" + if [[ "$install_daemon" == true && -n "$daemon_key" && -n "$daemon_port" ]]; then + echo "Daemon" + elif [[ "$install_daemon" == true ]]; then + echo "Daemon (partial, config not fully detected)" + fi + + if [[ "$install_web" == true && -n "$web_port" ]]; then + echo "Web Interface" + elif [[ "$install_web" == true ]]; then + echo "Web Interface (partial, config not fully detected)" + fi + + echo "" + + # Local IP detection + local ip_address + ip_address=$(hostname -I 2>/dev/null | awk '{print $1}') + [[ -z "$ip_address" ]] && ip_address="YOUR-IP" + + # Daemon info + if [[ "$install_daemon" == true ]]; then + local daemon_address="ws://$ip_address:${daemon_port:-Failed to Retrieve from Config file}" + local daemon_key_display="${daemon_key:-Failed to Retrieve from Config file}" + + echo "Daemon Address:" + echo " $daemon_address" + echo "Daemon Key:" + echo " $daemon_key_display" + echo "" + fi + + # Web info + if [[ "$install_web" == true ]]; then + local web_address="http://$ip_address:${web_port:-Failed to Retrieve from Config file}" + echo "HTTP Web Interface:" + echo " $web_address (open in browser)" + echo "" + fi + + # Port guidance + echo "NOTE:" + echo " Make sure to expose the above ports through your firewall." + echo " If accessing from outside your network, you may need to configure port forwarding on your router." + echo "" + + # Service management help + echo "Service Management Commands:" + if [[ "$install_daemon" == true ]]; then + echo " systemctl start mcsm-daemon.service" + echo " systemctl stop mcsm-daemon.service" + echo " systemctl restart mcsm-daemon.service" + echo " systemctl status mcsm-daemon.service" + fi + if [[ "$install_web" == true ]]; then + echo " systemctl start mcsm-web.service" + echo " systemctl stop mcsm-web.service" + echo " systemctl restart mcsm-web.service" + echo " systemctl status mcsm-web.service" + fi + echo "" + + # Official doc + echo "Official Documentation:" + echo " https://docs.mcsmanager.com/" + echo "" + + # HTTPS support + echo "Need HTTPS?" + echo " To enable secure HTTPS access, configure a reverse proxy:" + echo " https://docs.mcsmanager.com/ops/proxy_https.html" + echo "" + + # Closing message + echo "Installation completed. Enjoy managing your servers with MCSManager!" + echo "" +} + install_mcsm() { local components=() @@ -1187,6 +1281,10 @@ install_mcsm() { fi done fi + + # Extract installed component info + safe_run extract_component_info "Failed to extract runtime info from installed services" + safe_rul print_install_result "Failed to print installation result" } main() { @@ -1211,6 +1309,6 @@ main() { safe_run download_mcsm "Failed to acquire MCSManager source" safe_run mcsm_install_prepare "Error while preparing for installation" - + safe_run install_mcsm "Failed to install MCSManager" } main "$@" \ No newline at end of file From bb92ae41a2a8e8aaa15f55bfc2849e9074888705 Mon Sep 17 00:00:00 2001 From: KevinLu Date: Thu, 15 May 2025 03:54:41 -0400 Subject: [PATCH 175/338] added function to clear tmp dir --- setup.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/setup.sh b/setup.sh index d6767a0..b2506d6 100644 --- a/setup.sh +++ b/setup.sh @@ -1282,9 +1282,17 @@ install_mcsm() { done fi + # Clear temp dir + if rm -rf "$install_tmp_dir"; then + cprint green "Cleaned up temporary install folder: $install_tmp_dir" + else + cprint red "Failed to remove temporary folder: $install_tmp_dir" + fi + # Extract installed component info safe_run extract_component_info "Failed to extract runtime info from installed services" safe_rul print_install_result "Failed to print installation result" + } main() { From 387bad9f1973a66102becee75aac4aaf77c054ae Mon Sep 17 00:00:00 2001 From: KevinLu Date: Thu, 15 May 2025 03:56:04 -0400 Subject: [PATCH 176/338] updated ascii banner --- setup.sh | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/setup.sh b/setup.sh index b2506d6..a1d236e 100644 --- a/setup.sh +++ b/setup.sh @@ -1159,16 +1159,12 @@ print_install_result() { clear &>/dev/null || true # Print ASCII banner - echo "" - echo " _/ _/ _/_/_/ _/_/_/ _/ _/ " - echo " _/_/ _/_/ _/ _/ _/_/ _/_/ _/_/_/ _/_/_/ _/_/_/ _/_/_/ _/_/ _/ _/_/ " - echo " _/ _/ _/ _/ _/_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/_/_/_/ _/_/ " - echo " _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ " - echo "_/ _/ _/_/_/ _/_/_/ _/ _/ _/_/_/ _/ _/ _/_/_/ _/_/_/ _/_/_/ _/ " - echo " _/ " - echo " _/_/ " - echo "" - + echo "______ _______________________ ___" + echo "___ |/ /_ ____/_ ___/__ |/ /_____ _____________ _______ _____________" + echo "__ /|_/ /_ / _____ \__ /|_/ /_ __ \`/_ __ \ __ \`/_ __ \`/ _ \_ ___/" + echo "_ / / / / /___ ____/ /_ / / / / /_/ /_ / / / /_/ /_ /_/ // __/ /" + echo "/_/ /_/ \____/ /____/ /_/ /_/ \__,_/ /_/ /_/\__,_/ _\__, / \___//_/" + echo " # status summary echo "Installed/Updated Components:" if [[ "$install_daemon" == true && -n "$daemon_key" && -n "$daemon_port" ]]; then From 5fc4f823016f5eb9a6a9baf6e03d0e40cff4caaa Mon Sep 17 00:00:00 2001 From: shane0411 Date: Sun, 18 May 2025 11:28:48 +0800 Subject: [PATCH 177/338] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E4=BB=A5=E5=8F=8A=E7=B4=94=E7=AF=80=E9=BB=9E=E5=AE=89?= =?UTF-8?q?=E8=A3=9D=E8=85=B3=E6=9C=AC=EF=BC=8C=E5=B0=87setup=E8=85=B3?= =?UTF-8?q?=E6=9C=AC=E4=B8=AD=E7=8D=B2=E5=8F=96=E7=89=88=E6=9C=AC=E6=94=B9?= =?UTF-8?q?=E7=82=BA=E8=87=AA=E5=8B=95=E7=8D=B2=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 + daemon/setup.sh | 220 ++++++++++++++++++++++++++++++++ daemon/setup_cn.sh | 219 +++++++++++++++++++++++++++++++ setup.sh | 4 +- setup_cn.sh | 4 +- update/setup.sh | 311 +++++++++++++++++++++++++++++++++++++++++++++ update/setup_cn.sh | 308 ++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 1064 insertions(+), 4 deletions(-) create mode 100644 daemon/setup.sh create mode 100644 daemon/setup_cn.sh create mode 100644 update/setup.sh create mode 100644 update/setup_cn.sh diff --git a/.gitignore b/.gitignore index 6741c00..5b443b9 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,5 @@ bin-release/ # Remove old cli sh cli_old.sh + +.idea diff --git a/daemon/setup.sh b/daemon/setup.sh new file mode 100644 index 0000000..aa1a6c2 --- /dev/null +++ b/daemon/setup.sh @@ -0,0 +1,220 @@ +#!/bin/bash +# Official installation script. + +mcsmanager_install_path="/opt/mcsmanager" +mcsmanager_download_addr=$(curl -s https://api.github.com/repos/MCSManager/MCSManager/releases/latest | grep -o 'https://.*linux.*\.tar\.gz') +package_name="mcsmanager_linux_release.tar.gz" +node="v20.12.2" +arch=$(uname -m) + +if [ "$(id -u)" -ne 0 ]; then + echo "This script must be run as root. Please use \"sudo bash\" instead." + exit 1 +fi + +printf "\033c" + +echo_cyan() { + printf '\033[1;36m%b\033[0m\n' "$@" +} +echo_red() { + printf '\033[1;31m%b\033[0m\n' "$@" +} +echo_green() { + printf '\033[1;32m%b\033[0m\n' "$@" +} +echo_cyan_n() { + printf '\033[1;36m%b\033[0m' "$@" +} +echo_yellow() { + printf '\033[1;33m%b\033[0m\n' "$@" +} + +# script info +echo_cyan "+---------------------------------------------------------------------- +| MCSManager Installer ++---------------------------------------------------------------------- +" + +Red_Error() { + echo '=================================================' + printf '\033[1;31;40m%b\033[0m\n' "$@" + echo '=================================================' + exit 1 +} + +Install_Node() { + echo_cyan_n "[+] Install Node.JS environment...\n" + + rm -irf "$node_install_path" + + cd /opt || Red_Error "[x] Failed to enter /opt" + + rm -rf "node-$node-linux-$arch.tar.gz" + + wget "https://nodejs.org/dist/$node/node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to download node release" + + tar -zxf "node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to untar node" + + rm -rf "node-$node-linux-$arch.tar.gz" + + if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then + echo_green "Success" + else + Red_Error "[x] Node installation failed!" + fi + + echo + echo_yellow "=============== Node.JS Version ===============" + echo_yellow " node: $("$node_install_path"/bin/node -v)" + echo_yellow " npm: v$(env "$node_install_path"/bin/node "$node_install_path"/bin/npm -v)" + echo_yellow "=============== Node.JS Version ===============" + echo + + sleep 3 +} + +Install_MCSManager() { + echo_cyan "[+] Install MCSManager..." + + # stop service + systemctl disable --now mcsm-{web,daemon} + + # delete service + rm -rf /etc/systemd/system/mcsm-{daemon,web}.service + systemctl daemon-reload + + mkdir -p "${mcsmanager_install_path}" || Red_Error "[x] Failed to create ${mcsmanager_install_path}" + + # cd /opt/mcsmanager + cd "${mcsmanager_install_path}" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}" + + # download MCSManager release + wget "${mcsmanager_download_addr}" -O "${package_name}" || Red_Error "[x] Failed to download MCSManager" + tar -zxf ${package_name} -o || Red_Error "[x] Failed to untar ${package_name}" + rm -rf "${mcsmanager_install_path}/${package_name}" + + # compatible with tar.gz packages of different formats + if [ -d "/opt/mcsmanager/mcsmanager" ]; then + cp -rf /opt/mcsmanager/mcsmanager/* /opt/mcsmanager/ + rm -rf /opt/mcsmanager/mcsmanager + fi + + rm -rf "${mcsmanager_install_path}/web" + + # echo "[→] cd daemon" + cd "${mcsmanager_install_path}/daemon" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/daemon" + + echo_cyan "[+] Install MCSManager-Daemon dependencies..." + env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${mcsmanager_install_path}/daemon" + + echo + echo_yellow "=============== MCSManager ===============" + echo_green "Daemon: ${mcsmanager_install_path}/daemon" + echo_yellow "=============== MCSManager ===============" + echo + echo_green "[+] MCSManager installation success!" + + chmod -R 755 "$mcsmanager_install_path" + + sleep 3 +} + +Create_Service() { + echo_cyan "[+] Create MCSManager service..." + + echo "[Unit] +Description=MCSManager-Daemon + +[Service] +WorkingDirectory=${mcsmanager_install_path}/daemon +ExecStart=${node_install_path}/bin/node app.js +ExecReload=/bin/kill -s QUIT \$MAINPID +ExecStop=/bin/kill -s QUIT \$MAINPID +Environment=\"PATH=${PATH}\" + +[Install] +WantedBy=multi-user.target +" >/etc/systemd/system/mcsm-daemon.service + + systemctl daemon-reload + systemctl enable --now mcsm-daemon.service + echo_green "Registered!" + + sleep 2 + + printf "\n\n\n\n" + + echo_yellow "==================================================================" + echo_green "Installation is complete! Welcome to the MCSManager!!!" + echo_yellow " " + echo_cyan_n "Daemon Address: " + echo_yellow "ws://:24444 (Cluster)" + echo_red "You must expose ports " + echo_yellow "24444" + echo_red " to use the service properly on the Internet." + echo_yellow " " + echo_cyan "Usage:" + echo_cyan "systemctl start mcsm-daemon.service" + echo_cyan "systemctl stop mcsm-daemon.service" + echo_cyan "systemctl restart mcsm-daemon.service" + echo_yellow " " + echo_green "Official Document: https://docs.mcsmanager.com/" + echo_yellow "==================================================================" +} + +# Environmental inspection +if [[ "$arch" == x86_64 ]]; then + arch=x64 + #echo "[-] x64 architecture detected" +elif [[ $arch == aarch64 ]]; then + arch=arm64 + #echo "[-] 64-bit ARM architecture detected" +elif [[ $arch == arm ]]; then + arch=armv7l + #echo "[-] 32-bit ARM architecture detected" +elif [[ $arch == ppc64le ]]; then + arch=ppc64le + #echo "[-] IBM POWER architecture detected" +elif [[ $arch == s390x ]]; then + arch=s390x + #echo "[-] IBM LinuxONE architecture detected" +else + Red_Error "[x] Sorry, this architecture is not supported yet!\n[x]Please try to install manually: https://github.com/MCSManager/MCSManager#linux" +fi + +# Define the variable Node installation directory +node_install_path="/opt/node-$node-linux-$arch" + +# Check network connection +echo_cyan "[-] Architecture: $arch" + +# Install related software +echo_cyan_n "[+] Installing dependent software (git, tar, wget)... " +if [[ -x "$(command -v yum)" ]]; then + yum install -y git tar wget +elif [[ -x "$(command -v apt-get)" ]]; then + apt-get install -y git tar wget +elif [[ -x "$(command -v pacman)" ]]; then + pacman -S --noconfirm --needed git tar wget +elif [[ -x "$(command -v zypper)" ]]; then + zypper --non-interactive install git tar wget +else + echo_red "[!] Cannot find your package manager! You may need to install git, tar and wget manually!" +fi + +# Determine whether the relevant software is installed successfully +if [[ -x "$(command -v git)" && -x "$(command -v tar)" && -x "$(command -v wget)" ]]; then + echo_green "Success" +else + Red_Error "[x] Failed to find git, tar and wget, please install them manually!" +fi + +# Install the Node environment +Install_Node + +# Install MCSManager +Install_MCSManager + +# Create MCSManager background service +Create_Service diff --git a/daemon/setup_cn.sh b/daemon/setup_cn.sh new file mode 100644 index 0000000..8726b5c --- /dev/null +++ b/daemon/setup_cn.sh @@ -0,0 +1,219 @@ +#!/bin/bash +# This script file is specifically designed for the Chinese region, and servers in the Chinese region are used to accelerate file downloads. + +mcsmanager_install_path="/opt/mcsmanager" +mcsmanager_download_addr="https://cdn.imlazy.ink:233/files/mcsmanager_linux_release.tar.gz" +package_name="mcsmanager_linux_release.tar.gz" +node="v20.12.2" +arch=$(uname -m) + +if [ "$(id -u)" -ne 0 ]; then + echo "This script must be run as root. Please use \"sudo bash\" instead." + exit 1 +fi + +printf "\033c" + +echo_cyan() { + printf '\033[1;36m%b\033[0m\n' "$@" +} +echo_red() { + printf '\033[1;31m%b\033[0m\n' "$@" +} +echo_green() { + printf '\033[1;32m%b\033[0m\n' "$@" +} +echo_cyan_n() { + printf '\033[1;36m%b\033[0m' "$@" +} +echo_yellow() { + printf '\033[1;33m%b\033[0m\n' "$@" +} + +# script info +echo_cyan "+---------------------------------------------------------------------- +| MCSManager 安装脚本 (MCSManager Installer) ++---------------------------------------------------------------------- +" + +Red_Error() { + echo '=================================================' + printf '\033[1;31;40m%b\033[0m\n' "$@" + echo '=================================================' + exit 1 +} + +Install_Node() { + echo_cyan_n "[+] Install Node.JS environment...\n" + + rm -irf "$node_install_path" + + cd /opt || Red_Error "[x] Failed to enter /opt" + + rm -rf "node-$node-linux-$arch.tar.gz" + + # wget "https://nodejs.org/dist/$node/node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to download node release" + wget "https://registry.npmmirror.com/-/binary/node/$node/node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to download node release" + + tar -zxf "node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to untar node" + + rm -rf "node-$node-linux-$arch.tar.gz" + + if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then + echo_green "Success" + else + Red_Error "[x] Node installation failed!" + fi + + echo + echo_yellow "=============== Node.JS Version ===============" + echo_yellow " node: $("$node_install_path"/bin/node -v)" + echo_yellow " npm: v$(env "$node_install_path"/bin/node "$node_install_path"/bin/npm -v)" + echo_yellow "=============== Node.JS Version ===============" + echo + + sleep 3 +} + +Install_MCSManager() { + echo_cyan "[+] Install MCSManager..." + + # stop service + systemctl disable --now mcsm-{web,daemon} + + # delete service + rm -rf /etc/systemd/system/mcsm-{daemon,web}.service + systemctl daemon-reload + + mkdir -p "${mcsmanager_install_path}" || Red_Error "[x] Failed to create ${mcsmanager_install_path}" + + # cd /opt/mcsmanager + cd "${mcsmanager_install_path}" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}" + + # download MCSManager release + wget "${mcsmanager_download_addr}" -O "${package_name}" || Red_Error "[x] Failed to download MCSManager" + tar -zxf ${package_name} -o || Red_Error "[x] Failed to untar ${package_name}" + rm -rf "${mcsmanager_install_path}/${package_name}" + + # compatible with tar.gz packages of different formats + if [ -d "/opt/mcsmanager/mcsmanager" ]; then + cp -rf /opt/mcsmanager/mcsmanager/* /opt/mcsmanager/ + rm -rf /opt/mcsmanager/mcsmanager + fi + + rm -rf "${mcsmanager_install_path}/web" + + # echo "[→] cd daemon" + cd "${mcsmanager_install_path}/daemon" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/daemon" + + echo_cyan "[+] Install MCSManager-Daemon dependencies..." + env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --registry=https://registry.npmmirror.com --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${mcsmanager_install_path}/daemon" + + echo + echo_yellow "=============== MCSManager ===============" + echo_green "Daemon: ${mcsmanager_install_path}/daemon" + echo_yellow "=============== MCSManager ===============" + echo + echo_green "[+] MCSManager installation success!" + + chmod -R 755 "$mcsmanager_install_path" + + sleep 3 +} + +Create_Service() { + echo_cyan "[+] Create MCSManager service..." + + echo "[Unit] +Description=MCSManager-Daemon + +[Service] +WorkingDirectory=${mcsmanager_install_path}/daemon +ExecStart=${node_install_path}/bin/node app.js +ExecReload=/bin/kill -s QUIT \$MAINPID +ExecStop=/bin/kill -s QUIT \$MAINPID +Environment=\"PATH=${PATH}\" + +[Install] +WantedBy=multi-user.target +" >/etc/systemd/system/mcsm-daemon.service + + systemctl daemon-reload + systemctl enable --now mcsm-daemon.service + echo_green "Registered!" + + sleep 2 + + printf "\n\n\n\n" + + echo_yellow "==================================================================" + echo_green "安装完成,欢迎使用 MCSManager !" + echo_yellow " " + echo_cyan_n "被控守护进程地址: " + echo_yellow "ws://:24444 (Cluster)" + echo_red "默认情况下,你必须开放 24444 端口才能确保面板工作正常!" + echo_yellow " " + echo_cyan "面板开关指令:" + echo_cyan "systemctl start mcsm-daemon.service" + echo_cyan "systemctl stop mcsm-daemon.service" + echo_cyan "systemctl restart mcsm-daemon.service" + echo_yellow " " + echo_green "官方文档: https://docs.mcsmanager.com/" + echo_yellow "==================================================================" +} + +# Environmental inspection +if [[ "$arch" == x86_64 ]]; then + arch=x64 + #echo "[-] x64 architecture detected" +elif [[ $arch == aarch64 ]]; then + arch=arm64 + #echo "[-] 64-bit ARM architecture detected" +elif [[ $arch == arm ]]; then + arch=armv7l + #echo "[-] 32-bit ARM architecture detected" +elif [[ $arch == ppc64le ]]; then + arch=ppc64le + #echo "[-] IBM POWER architecture detected" +elif [[ $arch == s390x ]]; then + arch=s390x + #echo "[-] IBM LinuxONE architecture detected" +else + Red_Error "[x] Sorry, this architecture is not supported yet!\n[x]Please try to install manually: https://github.com/MCSManager/MCSManager#linux" +fi + +# Define the variable Node installation directory +node_install_path="/opt/node-$node-linux-$arch" + +# Check network connection +echo_cyan "[-] Architecture: $arch" + +# Install related software +echo_cyan_n "[+] Installing dependent software (git, tar, wget)... " +if [[ -x "$(command -v yum)" ]]; then + yum install -y git tar wget +elif [[ -x "$(command -v apt-get)" ]]; then + apt-get install -y git tar wget +elif [[ -x "$(command -v pacman)" ]]; then + pacman -S --noconfirm --needed git tar wget +elif [[ -x "$(command -v zypper)" ]]; then + zypper --non-interactive install git tar wget +else + echo_red "[!] Cannot find your package manager! You may need to install git, tar and wget manually!" +fi + +# Determine whether the relevant software is installed successfully +if [[ -x "$(command -v git)" && -x "$(command -v tar)" && -x "$(command -v wget)" ]]; then + echo_green "Success" +else + Red_Error "[x] Failed to find git, tar and wget, please install them manually!" +fi + +# Install the Node environment +Install_Node + +# Install MCSManager +Install_MCSManager + +# Create MCSManager background service +Create_Service diff --git a/setup.sh b/setup.sh index f7abe1f..c2af0eb 100644 --- a/setup.sh +++ b/setup.sh @@ -2,12 +2,12 @@ # Official installation script. mcsmanager_install_path="/opt/mcsmanager" -mcsmanager_download_addr="https://github.com/MCSManager/MCSManager/releases/latest/download/mcsmanager_linux_release.tar.gz" +mcsmanager_download_addr=$(curl -s https://api.github.com/repos/MCSManager/MCSManager/releases/latest | grep -o 'https://.*linux.*\.tar\.gz') package_name="mcsmanager_linux_release.tar.gz" node="v20.12.2" arch=$(uname -m) -if [ "$(id -u)" -ne 0]; then +if [ "$(id -u)" -ne 0 ]; then echo "This script must be run as root. Please use \"sudo bash\" instead." exit 1 fi diff --git a/setup_cn.sh b/setup_cn.sh index d9a7083..2566d51 100755 --- a/setup_cn.sh +++ b/setup_cn.sh @@ -4,10 +4,10 @@ mcsmanager_install_path="/opt/mcsmanager" mcsmanager_download_addr="https://cdn.imlazy.ink:233/files/mcsmanager_linux_release.tar.gz" package_name="mcsmanager_linux_release.tar.gz" -node="v16.20.2" +node="v20.12.2" arch=$(uname -m) -if [ "$(id -u)" -ne 0]; then +if [ "$(id -u)" -ne 0 ]; then echo "This script must be run as root. Please use \"sudo bash\" instead." exit 1 fi diff --git a/update/setup.sh b/update/setup.sh new file mode 100644 index 0000000..bc3c57c --- /dev/null +++ b/update/setup.sh @@ -0,0 +1,311 @@ +#!/bin/bash +# Official installation script. + +mcsmanager_install_path="/opt/mcsmanager" +mcsmanager_download_addr=$(curl -s https://api.github.com/repos/MCSManager/MCSManager/releases/latest | grep -o 'https://.*linux.*\.tar\.gz') +package_name="mcsmanager_linux_release.tar.gz" +node="v20.12.2" +arch=$(uname -m) + +if [ "$(id -u)" -ne 0 ]; then + echo "This script must be run as root. Please use \"sudo bash\" instead." + exit 1 +fi + +printf "\033c" + +echo_cyan() { + printf '\033[1;36m%b\033[0m\n' "$@" +} +echo_red() { + printf '\033[1;31m%b\033[0m\n' "$@" +} +echo_green() { + printf '\033[1;32m%b\033[0m\n' "$@" +} +echo_cyan_n() { + printf '\033[1;36m%b\033[0m' "$@" +} +echo_yellow() { + printf '\033[1;33m%b\033[0m\n' "$@" +} + +# script info +echo_cyan "+---------------------------------------------------------------------- +| MCSManager Update ++---------------------------------------------------------------------- +" + +web_install=true +if [[ -d "${mcsmanager_install_path}" ]] && [[ ! -d "${mcsmanager_install_path}/web" ]]; then + web_install=false +fi + +Red_Error() { + echo '=================================================' + printf '\033[1;31;40m%b\033[0m\n' "$@" + echo '=================================================' + exit 1 +} + +Update_Node() { + if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then + echo_green "Node.js version is up-to-date, skipping installation." + return + else + echo_red "Node not find, start to install node.js" + fi + + echo_cyan_n "[+] Install Node.JS environment...\n" + + rm -irf "$node_install_path" + + cd /opt || Red_Error "[x] Failed to enter /opt" + + rm -rf "node-$node-linux-$arch.tar.gz" + + wget "https://nodejs.org/dist/$node/node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to download node release" + + tar -zxf "node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to untar node" + + rm -rf "node-$node-linux-$arch.tar.gz" + + if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then + echo_green "Success" + else + Red_Error "[x] Node installation failed!" + fi + + echo + echo_yellow "=============== Node.JS Version ===============" + echo_yellow " node: $("$node_install_path"/bin/node -v)" + echo_yellow " npm: v$(env "$node_install_path"/bin/node "$node_install_path"/bin/npm -v)" + echo_yellow "=============== Node.JS Version ===============" + echo + + sleep 3 +} + +Update_MCSManager() { + echo_cyan "[+] Update MCSManager..." + + if [ "$web_install" = false ]; then + echo_yellow "[-] will not update web... (The web folder was not found)" + fi + + # stop service + systemctl disable --now mcsm-{web,daemon} + + # delete service + rm -rf /etc/systemd/system/mcsm-{daemon,web}.service + systemctl daemon-reload + + mkdir -p "${mcsmanager_install_path}" || Red_Error "[x] Failed to create ${mcsmanager_install_path}" + + # cd /opt/mcsmanager + cd "${mcsmanager_install_path}" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}" + + # backup data + if [ -d "${mcsmanager_install_path}/daemon/data" ]; then + mkdir -p "$mcsmanager_install_path/temp/daemon" + cp -rf $mcsmanager_install_path/daemon/data/* $mcsmanager_install_path/temp/daemon + fi + + if [ -d "${mcsmanager_install_path}/web/data" ]; then + mkdir -p "$mcsmanager_install_path/temp/web" + cp -rf $mcsmanager_install_path/web/data/* $mcsmanager_install_path/temp/web + fi + + # download MCSManager release + wget "${mcsmanager_download_addr}" -O "${package_name}" || Red_Error "[x] Failed to download MCSManager" + tar -zxf ${package_name} -o || Red_Error "[x] Failed to untar ${package_name}" + rm -rf "${mcsmanager_install_path}/${package_name}" + + # compatible with tar.gz packages of different formats + if [ -d "$mcsmanager_install_path/mcsmanager" ]; then + cp -rf $mcsmanager_install_path/mcsmanager/* $mcsmanager_install_path/ + rm -rf $mcsmanager_install_path/mcsmanager + fi + + if [ -d "${mcsmanager_install_path}/temp/daemon" ]; then + cp -rf $mcsmanager_install_path/temp/daemon/* $mcsmanager_install_path/daemon/data + rm -rf $mcsmanager_install_path/temp/daemon + fi + + if [ -d "${mcsmanager_install_path}/temp/web" ]; then + cp -rf $mcsmanager_install_path/temp/web/* $mcsmanager_install_path/web/data + rm -rf $mcsmanager_install_path/temp/web + fi + + if [ -d "${mcsmanager_install_path}/temp" ]; then + rm -rf $mcsmanager_install_path/temp + fi + + # echo "[→] cd daemon" + cd "${mcsmanager_install_path}/daemon" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/daemon" + + echo_cyan "[+] Update MCSManager-Daemon dependencies..." + env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${mcsmanager_install_path}/daemon" + + if [ "$web_install" = true ]; then + # echo "[←] cd .." + cd "${mcsmanager_install_path}/web" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/web" + + echo_cyan "[+] Update MCSManager-Web dependencies..." + env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${mcsmanager_install_path}/web" + else + rm -rf "${mcsmanager_install_path}/web" + fi + + echo + echo_yellow "=============== MCSManager ===============" + echo_green "Daemon: ${mcsmanager_install_path}/daemon" + if [ "$web_install" = true ]; then + echo_green "Web: ${mcsmanager_install_path}/web" + fi + echo_yellow "=============== MCSManager ===============" + echo + echo_green "[+] MCSManager installation success!" + + chmod -R 755 "$mcsmanager_install_path" + + sleep 3 +} + +Create_Service() { + echo_cyan "[+] Create MCSManager service..." + + echo "[Unit] +Description=MCSManager-Daemon + +[Service] +WorkingDirectory=${mcsmanager_install_path}/daemon +ExecStart=${node_install_path}/bin/node app.js +ExecReload=/bin/kill -s QUIT \$MAINPID +ExecStop=/bin/kill -s QUIT \$MAINPID +Environment=\"PATH=${PATH}\" + +[Install] +WantedBy=multi-user.target +" >/etc/systemd/system/mcsm-daemon.service + + if [ "$web_install" = true ]; then + echo "[Unit] +Description=MCSManager-Web + +[Service] +WorkingDirectory=${mcsmanager_install_path}/web +ExecStart=${node_install_path}/bin/node app.js +ExecReload=/bin/kill -s QUIT \$MAINPID +ExecStop=/bin/kill -s QUIT \$MAINPID +Environment=\"PATH=${PATH}\" + +[Install] +WantedBy=multi-user.target +" >/etc/systemd/system/mcsm-web.service + fi + + systemctl daemon-reload + if [ "$web_install" = true ]; then + systemctl enable --now mcsm-{daemon,web}.service + else + systemctl enable --now mcsm-daemon.service + fi + echo_green "Registered!" + + sleep 2 + + printf "\n\n\n\n" + + echo_yellow "==================================================================" + echo_green "Installation is complete! Welcome to the MCSManager!!!" + echo_yellow " " + if [ "$web_install" = true ]; then + echo_cyan_n "HTTP Web Service: " + echo_yellow "http://:23333 (Browser)" + fi + + echo_cyan_n "Daemon Address: " + echo_yellow "ws://:24444 (Cluster)" + echo_red "You must expose ports " + + if [ "$web_install" = true ]; then + echo_yellow "23333" + echo_red " and " + fi + + echo_yellow "24444" + echo_red " to use the service properly on the Internet." + echo_yellow " " + echo_cyan "Usage:" + + if [ "$web_install" = true ]; then + echo_cyan "systemctl start mcsm-{daemon,web}.service" + echo_cyan "systemctl stop mcsm-{daemon,web}.service" + echo_cyan "systemctl restart mcsm-{daemon,web}.service" + else + echo_cyan "systemctl start mcsm-daemon.service" + echo_cyan "systemctl stop mcsm-daemon.service" + echo_cyan "systemctl restart mcsm-daemon.service" + fi + + echo_yellow " " + echo_green "Official Document: https://docs.mcsmanager.com/" + echo_yellow "==================================================================" +} + +# Environmental inspection +if [[ "$arch" == x86_64 ]]; then + arch=x64 + #echo "[-] x64 architecture detected" +elif [[ $arch == aarch64 ]]; then + arch=arm64 + #echo "[-] 64-bit ARM architecture detected" +elif [[ $arch == arm ]]; then + arch=armv7l + #echo "[-] 32-bit ARM architecture detected" +elif [[ $arch == ppc64le ]]; then + arch=ppc64le + #echo "[-] IBM POWER architecture detected" +elif [[ $arch == s390x ]]; then + arch=s390x + #echo "[-] IBM LinuxONE architecture detected" +else + Red_Error "[x] Sorry, this architecture is not supported yet!\n[x]Please try to install manually: https://github.com/MCSManager/MCSManager#linux" +fi + +# Define the variable Node installation directory +node_install_path="/opt/node-$node-linux-$arch" + +# Check network connection +echo_cyan "[-] Architecture: $arch" + +# Install related software +echo_cyan_n "[+] Installing dependent software (git, tar, wget)... " +if [[ -x "$(command -v yum)" ]]; then + yum install -y git tar wget +elif [[ -x "$(command -v apt-get)" ]]; then + apt-get install -y git tar wget +elif [[ -x "$(command -v pacman)" ]]; then + pacman -S --noconfirm --needed git tar wget +elif [[ -x "$(command -v zypper)" ]]; then + zypper --non-interactive install git tar wget +else + echo_red "[!] Cannot find your package manager! You may need to install git, tar and wget manually!" +fi + +# Determine whether the relevant software is installed successfully +if [[ -x "$(command -v git)" && -x "$(command -v tar)" && -x "$(command -v wget)" ]]; then + echo_green "Success" +else + Red_Error "[x] Failed to find git, tar and wget, please install them manually!" +fi + +# Install the Node environment +Update_Node + +# Install MCSManager +Update_MCSManager + +# Create MCSManager background service +Create_Service diff --git a/update/setup_cn.sh b/update/setup_cn.sh new file mode 100644 index 0000000..c7d1a6c --- /dev/null +++ b/update/setup_cn.sh @@ -0,0 +1,308 @@ +#!/bin/bash +# This script file is specifically designed for the Chinese region, and servers in the Chinese region are used to accelerate file downloads. + +mcsmanager_install_path="/opt/mcsmanager" +mcsmanager_download_addr="https://cdn.imlazy.ink:233/files/mcsmanager_linux_release.tar.gz" +package_name="mcsmanager_linux_release.tar.gz" +node="v20.12.2" +arch=$(uname -m) + +if [ "$(id -u)" -ne 0 ]; then + echo "This script must be run as root. Please use \"sudo bash\" instead." + exit 1 +fi + +printf "\033c" + +echo_cyan() { + printf '\033[1;36m%b\033[0m\n' "$@" +} +echo_red() { + printf '\033[1;31m%b\033[0m\n' "$@" +} +echo_green() { + printf '\033[1;32m%b\033[0m\n' "$@" +} +echo_cyan_n() { + printf '\033[1;36m%b\033[0m' "$@" +} +echo_yellow() { + printf '\033[1;33m%b\033[0m\n' "$@" +} + +# script info +echo_cyan "+---------------------------------------------------------------------- +| MCSManager 更新脚本 (MCSManager Update) ++---------------------------------------------------------------------- +" + +web_install=true +if [[ -d "${mcsmanager_install_path}" ]] && [[ ! -d "${mcsmanager_install_path}/web" ]]; then + web_install=false +fi + +Red_Error() { + echo '=================================================' + printf '\033[1;31;40m%b\033[0m\n' "$@" + echo '=================================================' + exit 1 +} + +Update_Node() { + if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then + echo_green "Node.js version is up-to-date, skipping installation." + return + else + echo_red "Node not find, start to install node.js" + fi + + echo_cyan_n "[+] Install Node.JS environment...\n" + + rm -irf "$node_install_path" + + cd /opt || Red_Error "[x] Failed to enter /opt" + + rm -rf "node-$node-linux-$arch.tar.gz" + +# wget "https://nodejs.org/dist/$node/node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to download node release" + wget "https://registry.npmmirror.com/-/binary/node/$node/node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to download node release" + + tar -zxf "node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to untar node" + + rm -rf "node-$node-linux-$arch.tar.gz" + + if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then + echo_green "Success" + else + Red_Error "[x] Node installation failed!" + fi + + echo + echo_yellow "=============== Node.JS Version ===============" + echo_yellow " node: $("$node_install_path"/bin/node -v)" + echo_yellow " npm: v$(env "$node_install_path"/bin/node "$node_install_path"/bin/npm -v)" + echo_yellow "=============== Node.JS Version ===============" + echo + + sleep 3 +} + +Update_MCSManager() { + echo_cyan "[+] Update MCSManager..." + + if [ "$web_install" = false ]; then + echo_yellow "[-] will not update web... (The web folder was not found)" + fi + + # stop service + systemctl disable --now mcsm-{web,daemon} + + # delete service + rm -rf /etc/systemd/system/mcsm-{daemon,web}.service + systemctl daemon-reload + + mkdir -p "${mcsmanager_install_path}" || Red_Error "[x] Failed to create ${mcsmanager_install_path}" + + # cd /opt/mcsmanager + cd "${mcsmanager_install_path}" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}" + + # backup data + if [ -d "${mcsmanager_install_path}/daemon/data" ]; then + mkdir -p "$mcsmanager_install_path/temp/daemon" + cp -rf $mcsmanager_install_path/daemon/data/* $mcsmanager_install_path/temp/daemon + fi + + if [ -d "${mcsmanager_install_path}/web/data" ]; then + mkdir -p "$mcsmanager_install_path/temp/web" + cp -rf $mcsmanager_install_path/web/data/* $mcsmanager_install_path/temp/web + fi + + # download MCSManager release + wget "${mcsmanager_download_addr}" -O "${package_name}" || Red_Error "[x] Failed to download MCSManager" + tar -zxf ${package_name} -o || Red_Error "[x] Failed to untar ${package_name}" + rm -rf "${mcsmanager_install_path}/${package_name}" + + # compatible with tar.gz packages of different formats + if [ -d "$mcsmanager_install_path/mcsmanager" ]; then + cp -rf $mcsmanager_install_path/mcsmanager/* $mcsmanager_install_path/ + rm -rf $mcsmanager_install_path/mcsmanager + fi + + if [ -d "${mcsmanager_install_path}/temp/daemon" ]; then + cp -rf $mcsmanager_install_path/temp/daemon/* $mcsmanager_install_path/daemon/data + rm -rf $mcsmanager_install_path/temp/daemon + fi + + if [ -d "${mcsmanager_install_path}/temp/web" ]; then + cp -rf $mcsmanager_install_path/temp/web/* $mcsmanager_install_path/web/data + rm -rf $mcsmanager_install_path/temp/web + fi + + if [ -d "${mcsmanager_install_path}/temp" ]; then + rm -rf $mcsmanager_install_path/temp + fi + + # echo "[→] cd daemon" + cd "${mcsmanager_install_path}/daemon" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/daemon" + + echo_cyan "[+] Update MCSManager-Daemon dependencies..." + env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --registry=https://registry.npmmirror.com --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${mcsmanager_install_path}/daemon" + + if [ "$web_install" = true ]; then + # echo "[←] cd .." + cd "${mcsmanager_install_path}/web" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/web" + + echo_cyan "[+] Update MCSManager-Web dependencies..." + env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${mcsmanager_install_path}/web" + else + rm -rf "${mcsmanager_install_path}/web" + fi + + echo + echo_yellow "=============== MCSManager ===============" + echo_green "Daemon: ${mcsmanager_install_path}/daemon" + if [ "$web_install" = true ]; then + echo_green "Web: ${mcsmanager_install_path}/web" + fi + echo_yellow "=============== MCSManager ===============" + echo + echo_green "[+] MCSManager installation success!" + + chmod -R 755 "$mcsmanager_install_path" + + sleep 3 +} + +Create_Service() { + echo_cyan "[+] Create MCSManager service..." + + echo "[Unit] +Description=MCSManager-Daemon + +[Service] +WorkingDirectory=${mcsmanager_install_path}/daemon +ExecStart=${node_install_path}/bin/node app.js +ExecReload=/bin/kill -s QUIT \$MAINPID +ExecStop=/bin/kill -s QUIT \$MAINPID +Environment=\"PATH=${PATH}\" + +[Install] +WantedBy=multi-user.target +" >/etc/systemd/system/mcsm-daemon.service + + if [ "$web_install" = true ]; then + echo "[Unit] +Description=MCSManager-Web + +[Service] +WorkingDirectory=${mcsmanager_install_path}/web +ExecStart=${node_install_path}/bin/node app.js +ExecReload=/bin/kill -s QUIT \$MAINPID +ExecStop=/bin/kill -s QUIT \$MAINPID +Environment=\"PATH=${PATH}\" + +[Install] +WantedBy=multi-user.target +" >/etc/systemd/system/mcsm-web.service + fi + + systemctl daemon-reload + if [ "$web_install" = true ]; then + systemctl enable --now mcsm-{daemon,web}.service + else + systemctl enable --now mcsm-daemon.service + fi + echo_green "Registered!" + + sleep 2 + + printf "\n\n\n\n" + + echo_yellow "==================================================================" + echo_green "更新完成,欢迎使用 MCSManager !" + echo_yellow " " + if [ "$web_install" = true ]; then + echo_cyan_n "主控网页访问地址: " + echo_yellow "http://:23333 (Browser)" + fi + + echo_cyan_n "被控守护进程地址: " + echo_yellow "ws://:24444 (Cluster)" + + if [ "$web_install" = true ]; then + echo_red "默认情况下,你必须开放\033[1;33m 23333 和 24444 \033[1;31m端口才能确保面板工作正常!" + else + echo_red "默认情况下,你必须开放\033[1;33m 24444 \033[1;31m端口才能确保面板工作正常!" + fi + + echo_yellow " " + echo_cyan "面板开关指令:" + if [ "$web_install" = true ]; then + echo_cyan "systemctl start mcsm-{daemon,web}.service" + echo_cyan "systemctl stop mcsm-{daemon,web}.service" + echo_cyan "systemctl restart mcsm-{daemon,web}.service" + else + echo_cyan "systemctl start mcsm-daemon.service" + echo_cyan "systemctl stop mcsm-daemon.service" + echo_cyan "systemctl restart mcsm-daemon.service" + fi + echo_yellow " " + echo_green "官方文档: https://docs.mcsmanager.com/" + echo_yellow "==================================================================" +} + +# Environmental inspection +if [[ "$arch" == x86_64 ]]; then + arch=x64 + #echo "[-] x64 architecture detected" +elif [[ $arch == aarch64 ]]; then + arch=arm64 + #echo "[-] 64-bit ARM architecture detected" +elif [[ $arch == arm ]]; then + arch=armv7l + #echo "[-] 32-bit ARM architecture detected" +elif [[ $arch == ppc64le ]]; then + arch=ppc64le + #echo "[-] IBM POWER architecture detected" +elif [[ $arch == s390x ]]; then + arch=s390x + #echo "[-] IBM LinuxONE architecture detected" +else + Red_Error "[x] Sorry, this architecture is not supported yet!\n[x]Please try to install manually: https://github.com/MCSManager/MCSManager#linux" +fi + +# Define the variable Node installation directory +node_install_path="/opt/node-$node-linux-$arch" + +# Check network connection +echo_cyan "[-] Architecture: $arch" + +# Install related software +echo_cyan_n "[+] Installing dependent software (git, tar, wget)... " +if [[ -x "$(command -v yum)" ]]; then + yum install -y git tar wget +elif [[ -x "$(command -v apt-get)" ]]; then + apt-get install -y git tar wget +elif [[ -x "$(command -v pacman)" ]]; then + pacman -S --noconfirm --needed git tar wget +elif [[ -x "$(command -v zypper)" ]]; then + zypper --non-interactive install git tar wget +else + echo_red "[!] Cannot find your package manager! You may need to install git, tar and wget manually!" +fi + +# Determine whether the relevant software is installed successfully +if [[ -x "$(command -v git)" && -x "$(command -v tar)" && -x "$(command -v wget)" ]]; then + echo_green "Success" +else + Red_Error "[x] Failed to find git, tar and wget, please install them manually!" +fi + +# Install the Node environment +Update_Node + +# Install MCSManager +Update_MCSManager + +# Create MCSManager background service +Create_Service From d0646922f47c4631a644277b8e141c03866e40bf Mon Sep 17 00:00:00 2001 From: shane0411 Date: Sun, 18 May 2025 17:12:02 +0800 Subject: [PATCH 178/338] =?UTF-8?q?feat:=20=E5=B0=87=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E8=85=B3=E6=9C=AC=E8=88=87=E5=AE=89=E8=A3=9D=E8=85=B3=E6=9C=AC?= =?UTF-8?q?=E5=90=88=E4=BD=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.sh | 116 +++++++++++++---- setup_cn.sh | 118 +++++++++++++---- update/setup.sh | 311 --------------------------------------------- update/setup_cn.sh | 308 -------------------------------------------- 4 files changed, 185 insertions(+), 668 deletions(-) delete mode 100644 update/setup.sh delete mode 100644 update/setup_cn.sh diff --git a/setup.sh b/setup.sh index c2af0eb..bc3c57c 100644 --- a/setup.sh +++ b/setup.sh @@ -32,10 +32,15 @@ echo_yellow() { # script info echo_cyan "+---------------------------------------------------------------------- -| MCSManager Installer +| MCSManager Update +---------------------------------------------------------------------- " +web_install=true +if [[ -d "${mcsmanager_install_path}" ]] && [[ ! -d "${mcsmanager_install_path}/web" ]]; then + web_install=false +fi + Red_Error() { echo '=================================================' printf '\033[1;31;40m%b\033[0m\n' "$@" @@ -43,7 +48,14 @@ Red_Error() { exit 1 } -Install_Node() { +Update_Node() { + if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then + echo_green "Node.js version is up-to-date, skipping installation." + return + else + echo_red "Node not find, start to install node.js" + fi + echo_cyan_n "[+] Install Node.JS environment...\n" rm -irf "$node_install_path" @@ -74,8 +86,12 @@ Install_Node() { sleep 3 } -Install_MCSManager() { - echo_cyan "[+] Install MCSManager..." +Update_MCSManager() { + echo_cyan "[+] Update MCSManager..." + + if [ "$web_install" = false ]; then + echo_yellow "[-] will not update web... (The web folder was not found)" + fi # stop service systemctl disable --now mcsm-{web,daemon} @@ -89,33 +105,64 @@ Install_MCSManager() { # cd /opt/mcsmanager cd "${mcsmanager_install_path}" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}" + # backup data + if [ -d "${mcsmanager_install_path}/daemon/data" ]; then + mkdir -p "$mcsmanager_install_path/temp/daemon" + cp -rf $mcsmanager_install_path/daemon/data/* $mcsmanager_install_path/temp/daemon + fi + + if [ -d "${mcsmanager_install_path}/web/data" ]; then + mkdir -p "$mcsmanager_install_path/temp/web" + cp -rf $mcsmanager_install_path/web/data/* $mcsmanager_install_path/temp/web + fi + # download MCSManager release wget "${mcsmanager_download_addr}" -O "${package_name}" || Red_Error "[x] Failed to download MCSManager" tar -zxf ${package_name} -o || Red_Error "[x] Failed to untar ${package_name}" rm -rf "${mcsmanager_install_path}/${package_name}" # compatible with tar.gz packages of different formats - if [ -d "/opt/mcsmanager/mcsmanager" ]; then - cp -rf /opt/mcsmanager/mcsmanager/* /opt/mcsmanager/ - rm -rf /opt/mcsmanager/mcsmanager + if [ -d "$mcsmanager_install_path/mcsmanager" ]; then + cp -rf $mcsmanager_install_path/mcsmanager/* $mcsmanager_install_path/ + rm -rf $mcsmanager_install_path/mcsmanager + fi + + if [ -d "${mcsmanager_install_path}/temp/daemon" ]; then + cp -rf $mcsmanager_install_path/temp/daemon/* $mcsmanager_install_path/daemon/data + rm -rf $mcsmanager_install_path/temp/daemon + fi + + if [ -d "${mcsmanager_install_path}/temp/web" ]; then + cp -rf $mcsmanager_install_path/temp/web/* $mcsmanager_install_path/web/data + rm -rf $mcsmanager_install_path/temp/web + fi + + if [ -d "${mcsmanager_install_path}/temp" ]; then + rm -rf $mcsmanager_install_path/temp fi # echo "[→] cd daemon" cd "${mcsmanager_install_path}/daemon" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/daemon" - echo_cyan "[+] Install MCSManager-Daemon dependencies..." + echo_cyan "[+] Update MCSManager-Daemon dependencies..." env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${mcsmanager_install_path}/daemon" - # echo "[←] cd .." - cd "${mcsmanager_install_path}/web" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/web" + if [ "$web_install" = true ]; then + # echo "[←] cd .." + cd "${mcsmanager_install_path}/web" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/web" - echo_cyan "[+] Install MCSManager-Web dependencies..." - env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${mcsmanager_install_path}/web" + echo_cyan "[+] Update MCSManager-Web dependencies..." + env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${mcsmanager_install_path}/web" + else + rm -rf "${mcsmanager_install_path}/web" + fi echo echo_yellow "=============== MCSManager ===============" echo_green "Daemon: ${mcsmanager_install_path}/daemon" - echo_green "Web: ${mcsmanager_install_path}/web" + if [ "$web_install" = true ]; then + echo_green "Web: ${mcsmanager_install_path}/web" + fi echo_yellow "=============== MCSManager ===============" echo echo_green "[+] MCSManager installation success!" @@ -142,7 +189,8 @@ Environment=\"PATH=${PATH}\" WantedBy=multi-user.target " >/etc/systemd/system/mcsm-daemon.service - echo "[Unit] + if [ "$web_install" = true ]; then + echo "[Unit] Description=MCSManager-Web [Service] @@ -155,9 +203,14 @@ Environment=\"PATH=${PATH}\" [Install] WantedBy=multi-user.target " >/etc/systemd/system/mcsm-web.service + fi systemctl daemon-reload - systemctl enable --now mcsm-{daemon,web}.service + if [ "$web_install" = true ]; then + systemctl enable --now mcsm-{daemon,web}.service + else + systemctl enable --now mcsm-daemon.service + fi echo_green "Registered!" sleep 2 @@ -167,20 +220,35 @@ WantedBy=multi-user.target echo_yellow "==================================================================" echo_green "Installation is complete! Welcome to the MCSManager!!!" echo_yellow " " - echo_cyan_n "HTTP Web Service: " - echo_yellow "http://:23333 (Browser)" + if [ "$web_install" = true ]; then + echo_cyan_n "HTTP Web Service: " + echo_yellow "http://:23333 (Browser)" + fi + echo_cyan_n "Daemon Address: " echo_yellow "ws://:24444 (Cluster)" echo_red "You must expose ports " - echo_yellow "23333" - echo_red " and " + + if [ "$web_install" = true ]; then + echo_yellow "23333" + echo_red " and " + fi + echo_yellow "24444" echo_red " to use the service properly on the Internet." echo_yellow " " echo_cyan "Usage:" - echo_cyan "systemctl start mcsm-{daemon,web}.service" - echo_cyan "systemctl stop mcsm-{daemon,web}.service" - echo_cyan "systemctl restart mcsm-{daemon,web}.service" + + if [ "$web_install" = true ]; then + echo_cyan "systemctl start mcsm-{daemon,web}.service" + echo_cyan "systemctl stop mcsm-{daemon,web}.service" + echo_cyan "systemctl restart mcsm-{daemon,web}.service" + else + echo_cyan "systemctl start mcsm-daemon.service" + echo_cyan "systemctl stop mcsm-daemon.service" + echo_cyan "systemctl restart mcsm-daemon.service" + fi + echo_yellow " " echo_green "Official Document: https://docs.mcsmanager.com/" echo_yellow "==================================================================" @@ -234,10 +302,10 @@ else fi # Install the Node environment -Install_Node +Update_Node # Install MCSManager -Install_MCSManager +Update_MCSManager # Create MCSManager background service Create_Service diff --git a/setup_cn.sh b/setup_cn.sh index 2566d51..c7d1a6c 100755 --- a/setup_cn.sh +++ b/setup_cn.sh @@ -32,10 +32,15 @@ echo_yellow() { # script info echo_cyan "+---------------------------------------------------------------------- -| MCSManager 安装脚本 (MCSManager Installer) +| MCSManager 更新脚本 (MCSManager Update) +---------------------------------------------------------------------- " +web_install=true +if [[ -d "${mcsmanager_install_path}" ]] && [[ ! -d "${mcsmanager_install_path}/web" ]]; then + web_install=false +fi + Red_Error() { echo '=================================================' printf '\033[1;31;40m%b\033[0m\n' "$@" @@ -43,7 +48,14 @@ Red_Error() { exit 1 } -Install_Node() { +Update_Node() { + if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then + echo_green "Node.js version is up-to-date, skipping installation." + return + else + echo_red "Node not find, start to install node.js" + fi + echo_cyan_n "[+] Install Node.JS environment...\n" rm -irf "$node_install_path" @@ -52,7 +64,7 @@ Install_Node() { rm -rf "node-$node-linux-$arch.tar.gz" - # wget "https://nodejs.org/dist/$node/node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to download node release" +# wget "https://nodejs.org/dist/$node/node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to download node release" wget "https://registry.npmmirror.com/-/binary/node/$node/node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to download node release" tar -zxf "node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to untar node" @@ -75,8 +87,12 @@ Install_Node() { sleep 3 } -Install_MCSManager() { - echo_cyan "[+] Install MCSManager..." +Update_MCSManager() { + echo_cyan "[+] Update MCSManager..." + + if [ "$web_install" = false ]; then + echo_yellow "[-] will not update web... (The web folder was not found)" + fi # stop service systemctl disable --now mcsm-{web,daemon} @@ -90,33 +106,64 @@ Install_MCSManager() { # cd /opt/mcsmanager cd "${mcsmanager_install_path}" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}" + # backup data + if [ -d "${mcsmanager_install_path}/daemon/data" ]; then + mkdir -p "$mcsmanager_install_path/temp/daemon" + cp -rf $mcsmanager_install_path/daemon/data/* $mcsmanager_install_path/temp/daemon + fi + + if [ -d "${mcsmanager_install_path}/web/data" ]; then + mkdir -p "$mcsmanager_install_path/temp/web" + cp -rf $mcsmanager_install_path/web/data/* $mcsmanager_install_path/temp/web + fi + # download MCSManager release wget "${mcsmanager_download_addr}" -O "${package_name}" || Red_Error "[x] Failed to download MCSManager" tar -zxf ${package_name} -o || Red_Error "[x] Failed to untar ${package_name}" rm -rf "${mcsmanager_install_path}/${package_name}" # compatible with tar.gz packages of different formats - if [ -d "/opt/mcsmanager/mcsmanager" ]; then - cp -rf /opt/mcsmanager/mcsmanager/* /opt/mcsmanager/ - rm -rf /opt/mcsmanager/mcsmanager + if [ -d "$mcsmanager_install_path/mcsmanager" ]; then + cp -rf $mcsmanager_install_path/mcsmanager/* $mcsmanager_install_path/ + rm -rf $mcsmanager_install_path/mcsmanager + fi + + if [ -d "${mcsmanager_install_path}/temp/daemon" ]; then + cp -rf $mcsmanager_install_path/temp/daemon/* $mcsmanager_install_path/daemon/data + rm -rf $mcsmanager_install_path/temp/daemon + fi + + if [ -d "${mcsmanager_install_path}/temp/web" ]; then + cp -rf $mcsmanager_install_path/temp/web/* $mcsmanager_install_path/web/data + rm -rf $mcsmanager_install_path/temp/web + fi + + if [ -d "${mcsmanager_install_path}/temp" ]; then + rm -rf $mcsmanager_install_path/temp fi # echo "[→] cd daemon" cd "${mcsmanager_install_path}/daemon" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/daemon" - echo_cyan "[+] Install MCSManager-Daemon dependencies..." + echo_cyan "[+] Update MCSManager-Daemon dependencies..." env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --registry=https://registry.npmmirror.com --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${mcsmanager_install_path}/daemon" - # echo "[←] cd .." - cd "${mcsmanager_install_path}/web" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/web" + if [ "$web_install" = true ]; then + # echo "[←] cd .." + cd "${mcsmanager_install_path}/web" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/web" - echo_cyan "[+] Install MCSManager-Web dependencies..." - env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --registry=https://registry.npmmirror.com --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${mcsmanager_install_path}/web" + echo_cyan "[+] Update MCSManager-Web dependencies..." + env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${mcsmanager_install_path}/web" + else + rm -rf "${mcsmanager_install_path}/web" + fi echo echo_yellow "=============== MCSManager ===============" echo_green "Daemon: ${mcsmanager_install_path}/daemon" - echo_green "Web: ${mcsmanager_install_path}/web" + if [ "$web_install" = true ]; then + echo_green "Web: ${mcsmanager_install_path}/web" + fi echo_yellow "=============== MCSManager ===============" echo echo_green "[+] MCSManager installation success!" @@ -143,7 +190,8 @@ Environment=\"PATH=${PATH}\" WantedBy=multi-user.target " >/etc/systemd/system/mcsm-daemon.service - echo "[Unit] + if [ "$web_install" = true ]; then + echo "[Unit] Description=MCSManager-Web [Service] @@ -156,9 +204,14 @@ Environment=\"PATH=${PATH}\" [Install] WantedBy=multi-user.target " >/etc/systemd/system/mcsm-web.service + fi systemctl daemon-reload - systemctl enable --now mcsm-{daemon,web}.service + if [ "$web_install" = true ]; then + systemctl enable --now mcsm-{daemon,web}.service + else + systemctl enable --now mcsm-daemon.service + fi echo_green "Registered!" sleep 2 @@ -166,18 +219,33 @@ WantedBy=multi-user.target printf "\n\n\n\n" echo_yellow "==================================================================" - echo_green "安装完成,欢迎使用 MCSManager !" + echo_green "更新完成,欢迎使用 MCSManager !" echo_yellow " " - echo_cyan_n "主控网页访问地址: " - echo_yellow "http://:23333 (Browser)" + if [ "$web_install" = true ]; then + echo_cyan_n "主控网页访问地址: " + echo_yellow "http://:23333 (Browser)" + fi + echo_cyan_n "被控守护进程地址: " echo_yellow "ws://:24444 (Cluster)" - echo_red "默认情况下,你必须开放 23333 和 24444 端口才能确保面板工作正常!" + + if [ "$web_install" = true ]; then + echo_red "默认情况下,你必须开放\033[1;33m 23333 和 24444 \033[1;31m端口才能确保面板工作正常!" + else + echo_red "默认情况下,你必须开放\033[1;33m 24444 \033[1;31m端口才能确保面板工作正常!" + fi + echo_yellow " " echo_cyan "面板开关指令:" - echo_cyan "systemctl start mcsm-{daemon,web}.service" - echo_cyan "systemctl stop mcsm-{daemon,web}.service" - echo_cyan "systemctl restart mcsm-{daemon,web}.service" + if [ "$web_install" = true ]; then + echo_cyan "systemctl start mcsm-{daemon,web}.service" + echo_cyan "systemctl stop mcsm-{daemon,web}.service" + echo_cyan "systemctl restart mcsm-{daemon,web}.service" + else + echo_cyan "systemctl start mcsm-daemon.service" + echo_cyan "systemctl stop mcsm-daemon.service" + echo_cyan "systemctl restart mcsm-daemon.service" + fi echo_yellow " " echo_green "官方文档: https://docs.mcsmanager.com/" echo_yellow "==================================================================" @@ -231,10 +299,10 @@ else fi # Install the Node environment -Install_Node +Update_Node # Install MCSManager -Install_MCSManager +Update_MCSManager # Create MCSManager background service Create_Service diff --git a/update/setup.sh b/update/setup.sh deleted file mode 100644 index bc3c57c..0000000 --- a/update/setup.sh +++ /dev/null @@ -1,311 +0,0 @@ -#!/bin/bash -# Official installation script. - -mcsmanager_install_path="/opt/mcsmanager" -mcsmanager_download_addr=$(curl -s https://api.github.com/repos/MCSManager/MCSManager/releases/latest | grep -o 'https://.*linux.*\.tar\.gz') -package_name="mcsmanager_linux_release.tar.gz" -node="v20.12.2" -arch=$(uname -m) - -if [ "$(id -u)" -ne 0 ]; then - echo "This script must be run as root. Please use \"sudo bash\" instead." - exit 1 -fi - -printf "\033c" - -echo_cyan() { - printf '\033[1;36m%b\033[0m\n' "$@" -} -echo_red() { - printf '\033[1;31m%b\033[0m\n' "$@" -} -echo_green() { - printf '\033[1;32m%b\033[0m\n' "$@" -} -echo_cyan_n() { - printf '\033[1;36m%b\033[0m' "$@" -} -echo_yellow() { - printf '\033[1;33m%b\033[0m\n' "$@" -} - -# script info -echo_cyan "+---------------------------------------------------------------------- -| MCSManager Update -+---------------------------------------------------------------------- -" - -web_install=true -if [[ -d "${mcsmanager_install_path}" ]] && [[ ! -d "${mcsmanager_install_path}/web" ]]; then - web_install=false -fi - -Red_Error() { - echo '=================================================' - printf '\033[1;31;40m%b\033[0m\n' "$@" - echo '=================================================' - exit 1 -} - -Update_Node() { - if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then - echo_green "Node.js version is up-to-date, skipping installation." - return - else - echo_red "Node not find, start to install node.js" - fi - - echo_cyan_n "[+] Install Node.JS environment...\n" - - rm -irf "$node_install_path" - - cd /opt || Red_Error "[x] Failed to enter /opt" - - rm -rf "node-$node-linux-$arch.tar.gz" - - wget "https://nodejs.org/dist/$node/node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to download node release" - - tar -zxf "node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to untar node" - - rm -rf "node-$node-linux-$arch.tar.gz" - - if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then - echo_green "Success" - else - Red_Error "[x] Node installation failed!" - fi - - echo - echo_yellow "=============== Node.JS Version ===============" - echo_yellow " node: $("$node_install_path"/bin/node -v)" - echo_yellow " npm: v$(env "$node_install_path"/bin/node "$node_install_path"/bin/npm -v)" - echo_yellow "=============== Node.JS Version ===============" - echo - - sleep 3 -} - -Update_MCSManager() { - echo_cyan "[+] Update MCSManager..." - - if [ "$web_install" = false ]; then - echo_yellow "[-] will not update web... (The web folder was not found)" - fi - - # stop service - systemctl disable --now mcsm-{web,daemon} - - # delete service - rm -rf /etc/systemd/system/mcsm-{daemon,web}.service - systemctl daemon-reload - - mkdir -p "${mcsmanager_install_path}" || Red_Error "[x] Failed to create ${mcsmanager_install_path}" - - # cd /opt/mcsmanager - cd "${mcsmanager_install_path}" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}" - - # backup data - if [ -d "${mcsmanager_install_path}/daemon/data" ]; then - mkdir -p "$mcsmanager_install_path/temp/daemon" - cp -rf $mcsmanager_install_path/daemon/data/* $mcsmanager_install_path/temp/daemon - fi - - if [ -d "${mcsmanager_install_path}/web/data" ]; then - mkdir -p "$mcsmanager_install_path/temp/web" - cp -rf $mcsmanager_install_path/web/data/* $mcsmanager_install_path/temp/web - fi - - # download MCSManager release - wget "${mcsmanager_download_addr}" -O "${package_name}" || Red_Error "[x] Failed to download MCSManager" - tar -zxf ${package_name} -o || Red_Error "[x] Failed to untar ${package_name}" - rm -rf "${mcsmanager_install_path}/${package_name}" - - # compatible with tar.gz packages of different formats - if [ -d "$mcsmanager_install_path/mcsmanager" ]; then - cp -rf $mcsmanager_install_path/mcsmanager/* $mcsmanager_install_path/ - rm -rf $mcsmanager_install_path/mcsmanager - fi - - if [ -d "${mcsmanager_install_path}/temp/daemon" ]; then - cp -rf $mcsmanager_install_path/temp/daemon/* $mcsmanager_install_path/daemon/data - rm -rf $mcsmanager_install_path/temp/daemon - fi - - if [ -d "${mcsmanager_install_path}/temp/web" ]; then - cp -rf $mcsmanager_install_path/temp/web/* $mcsmanager_install_path/web/data - rm -rf $mcsmanager_install_path/temp/web - fi - - if [ -d "${mcsmanager_install_path}/temp" ]; then - rm -rf $mcsmanager_install_path/temp - fi - - # echo "[→] cd daemon" - cd "${mcsmanager_install_path}/daemon" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/daemon" - - echo_cyan "[+] Update MCSManager-Daemon dependencies..." - env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${mcsmanager_install_path}/daemon" - - if [ "$web_install" = true ]; then - # echo "[←] cd .." - cd "${mcsmanager_install_path}/web" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/web" - - echo_cyan "[+] Update MCSManager-Web dependencies..." - env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${mcsmanager_install_path}/web" - else - rm -rf "${mcsmanager_install_path}/web" - fi - - echo - echo_yellow "=============== MCSManager ===============" - echo_green "Daemon: ${mcsmanager_install_path}/daemon" - if [ "$web_install" = true ]; then - echo_green "Web: ${mcsmanager_install_path}/web" - fi - echo_yellow "=============== MCSManager ===============" - echo - echo_green "[+] MCSManager installation success!" - - chmod -R 755 "$mcsmanager_install_path" - - sleep 3 -} - -Create_Service() { - echo_cyan "[+] Create MCSManager service..." - - echo "[Unit] -Description=MCSManager-Daemon - -[Service] -WorkingDirectory=${mcsmanager_install_path}/daemon -ExecStart=${node_install_path}/bin/node app.js -ExecReload=/bin/kill -s QUIT \$MAINPID -ExecStop=/bin/kill -s QUIT \$MAINPID -Environment=\"PATH=${PATH}\" - -[Install] -WantedBy=multi-user.target -" >/etc/systemd/system/mcsm-daemon.service - - if [ "$web_install" = true ]; then - echo "[Unit] -Description=MCSManager-Web - -[Service] -WorkingDirectory=${mcsmanager_install_path}/web -ExecStart=${node_install_path}/bin/node app.js -ExecReload=/bin/kill -s QUIT \$MAINPID -ExecStop=/bin/kill -s QUIT \$MAINPID -Environment=\"PATH=${PATH}\" - -[Install] -WantedBy=multi-user.target -" >/etc/systemd/system/mcsm-web.service - fi - - systemctl daemon-reload - if [ "$web_install" = true ]; then - systemctl enable --now mcsm-{daemon,web}.service - else - systemctl enable --now mcsm-daemon.service - fi - echo_green "Registered!" - - sleep 2 - - printf "\n\n\n\n" - - echo_yellow "==================================================================" - echo_green "Installation is complete! Welcome to the MCSManager!!!" - echo_yellow " " - if [ "$web_install" = true ]; then - echo_cyan_n "HTTP Web Service: " - echo_yellow "http://:23333 (Browser)" - fi - - echo_cyan_n "Daemon Address: " - echo_yellow "ws://:24444 (Cluster)" - echo_red "You must expose ports " - - if [ "$web_install" = true ]; then - echo_yellow "23333" - echo_red " and " - fi - - echo_yellow "24444" - echo_red " to use the service properly on the Internet." - echo_yellow " " - echo_cyan "Usage:" - - if [ "$web_install" = true ]; then - echo_cyan "systemctl start mcsm-{daemon,web}.service" - echo_cyan "systemctl stop mcsm-{daemon,web}.service" - echo_cyan "systemctl restart mcsm-{daemon,web}.service" - else - echo_cyan "systemctl start mcsm-daemon.service" - echo_cyan "systemctl stop mcsm-daemon.service" - echo_cyan "systemctl restart mcsm-daemon.service" - fi - - echo_yellow " " - echo_green "Official Document: https://docs.mcsmanager.com/" - echo_yellow "==================================================================" -} - -# Environmental inspection -if [[ "$arch" == x86_64 ]]; then - arch=x64 - #echo "[-] x64 architecture detected" -elif [[ $arch == aarch64 ]]; then - arch=arm64 - #echo "[-] 64-bit ARM architecture detected" -elif [[ $arch == arm ]]; then - arch=armv7l - #echo "[-] 32-bit ARM architecture detected" -elif [[ $arch == ppc64le ]]; then - arch=ppc64le - #echo "[-] IBM POWER architecture detected" -elif [[ $arch == s390x ]]; then - arch=s390x - #echo "[-] IBM LinuxONE architecture detected" -else - Red_Error "[x] Sorry, this architecture is not supported yet!\n[x]Please try to install manually: https://github.com/MCSManager/MCSManager#linux" -fi - -# Define the variable Node installation directory -node_install_path="/opt/node-$node-linux-$arch" - -# Check network connection -echo_cyan "[-] Architecture: $arch" - -# Install related software -echo_cyan_n "[+] Installing dependent software (git, tar, wget)... " -if [[ -x "$(command -v yum)" ]]; then - yum install -y git tar wget -elif [[ -x "$(command -v apt-get)" ]]; then - apt-get install -y git tar wget -elif [[ -x "$(command -v pacman)" ]]; then - pacman -S --noconfirm --needed git tar wget -elif [[ -x "$(command -v zypper)" ]]; then - zypper --non-interactive install git tar wget -else - echo_red "[!] Cannot find your package manager! You may need to install git, tar and wget manually!" -fi - -# Determine whether the relevant software is installed successfully -if [[ -x "$(command -v git)" && -x "$(command -v tar)" && -x "$(command -v wget)" ]]; then - echo_green "Success" -else - Red_Error "[x] Failed to find git, tar and wget, please install them manually!" -fi - -# Install the Node environment -Update_Node - -# Install MCSManager -Update_MCSManager - -# Create MCSManager background service -Create_Service diff --git a/update/setup_cn.sh b/update/setup_cn.sh deleted file mode 100644 index c7d1a6c..0000000 --- a/update/setup_cn.sh +++ /dev/null @@ -1,308 +0,0 @@ -#!/bin/bash -# This script file is specifically designed for the Chinese region, and servers in the Chinese region are used to accelerate file downloads. - -mcsmanager_install_path="/opt/mcsmanager" -mcsmanager_download_addr="https://cdn.imlazy.ink:233/files/mcsmanager_linux_release.tar.gz" -package_name="mcsmanager_linux_release.tar.gz" -node="v20.12.2" -arch=$(uname -m) - -if [ "$(id -u)" -ne 0 ]; then - echo "This script must be run as root. Please use \"sudo bash\" instead." - exit 1 -fi - -printf "\033c" - -echo_cyan() { - printf '\033[1;36m%b\033[0m\n' "$@" -} -echo_red() { - printf '\033[1;31m%b\033[0m\n' "$@" -} -echo_green() { - printf '\033[1;32m%b\033[0m\n' "$@" -} -echo_cyan_n() { - printf '\033[1;36m%b\033[0m' "$@" -} -echo_yellow() { - printf '\033[1;33m%b\033[0m\n' "$@" -} - -# script info -echo_cyan "+---------------------------------------------------------------------- -| MCSManager 更新脚本 (MCSManager Update) -+---------------------------------------------------------------------- -" - -web_install=true -if [[ -d "${mcsmanager_install_path}" ]] && [[ ! -d "${mcsmanager_install_path}/web" ]]; then - web_install=false -fi - -Red_Error() { - echo '=================================================' - printf '\033[1;31;40m%b\033[0m\n' "$@" - echo '=================================================' - exit 1 -} - -Update_Node() { - if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then - echo_green "Node.js version is up-to-date, skipping installation." - return - else - echo_red "Node not find, start to install node.js" - fi - - echo_cyan_n "[+] Install Node.JS environment...\n" - - rm -irf "$node_install_path" - - cd /opt || Red_Error "[x] Failed to enter /opt" - - rm -rf "node-$node-linux-$arch.tar.gz" - -# wget "https://nodejs.org/dist/$node/node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to download node release" - wget "https://registry.npmmirror.com/-/binary/node/$node/node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to download node release" - - tar -zxf "node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to untar node" - - rm -rf "node-$node-linux-$arch.tar.gz" - - if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then - echo_green "Success" - else - Red_Error "[x] Node installation failed!" - fi - - echo - echo_yellow "=============== Node.JS Version ===============" - echo_yellow " node: $("$node_install_path"/bin/node -v)" - echo_yellow " npm: v$(env "$node_install_path"/bin/node "$node_install_path"/bin/npm -v)" - echo_yellow "=============== Node.JS Version ===============" - echo - - sleep 3 -} - -Update_MCSManager() { - echo_cyan "[+] Update MCSManager..." - - if [ "$web_install" = false ]; then - echo_yellow "[-] will not update web... (The web folder was not found)" - fi - - # stop service - systemctl disable --now mcsm-{web,daemon} - - # delete service - rm -rf /etc/systemd/system/mcsm-{daemon,web}.service - systemctl daemon-reload - - mkdir -p "${mcsmanager_install_path}" || Red_Error "[x] Failed to create ${mcsmanager_install_path}" - - # cd /opt/mcsmanager - cd "${mcsmanager_install_path}" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}" - - # backup data - if [ -d "${mcsmanager_install_path}/daemon/data" ]; then - mkdir -p "$mcsmanager_install_path/temp/daemon" - cp -rf $mcsmanager_install_path/daemon/data/* $mcsmanager_install_path/temp/daemon - fi - - if [ -d "${mcsmanager_install_path}/web/data" ]; then - mkdir -p "$mcsmanager_install_path/temp/web" - cp -rf $mcsmanager_install_path/web/data/* $mcsmanager_install_path/temp/web - fi - - # download MCSManager release - wget "${mcsmanager_download_addr}" -O "${package_name}" || Red_Error "[x] Failed to download MCSManager" - tar -zxf ${package_name} -o || Red_Error "[x] Failed to untar ${package_name}" - rm -rf "${mcsmanager_install_path}/${package_name}" - - # compatible with tar.gz packages of different formats - if [ -d "$mcsmanager_install_path/mcsmanager" ]; then - cp -rf $mcsmanager_install_path/mcsmanager/* $mcsmanager_install_path/ - rm -rf $mcsmanager_install_path/mcsmanager - fi - - if [ -d "${mcsmanager_install_path}/temp/daemon" ]; then - cp -rf $mcsmanager_install_path/temp/daemon/* $mcsmanager_install_path/daemon/data - rm -rf $mcsmanager_install_path/temp/daemon - fi - - if [ -d "${mcsmanager_install_path}/temp/web" ]; then - cp -rf $mcsmanager_install_path/temp/web/* $mcsmanager_install_path/web/data - rm -rf $mcsmanager_install_path/temp/web - fi - - if [ -d "${mcsmanager_install_path}/temp" ]; then - rm -rf $mcsmanager_install_path/temp - fi - - # echo "[→] cd daemon" - cd "${mcsmanager_install_path}/daemon" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/daemon" - - echo_cyan "[+] Update MCSManager-Daemon dependencies..." - env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --registry=https://registry.npmmirror.com --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${mcsmanager_install_path}/daemon" - - if [ "$web_install" = true ]; then - # echo "[←] cd .." - cd "${mcsmanager_install_path}/web" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/web" - - echo_cyan "[+] Update MCSManager-Web dependencies..." - env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${mcsmanager_install_path}/web" - else - rm -rf "${mcsmanager_install_path}/web" - fi - - echo - echo_yellow "=============== MCSManager ===============" - echo_green "Daemon: ${mcsmanager_install_path}/daemon" - if [ "$web_install" = true ]; then - echo_green "Web: ${mcsmanager_install_path}/web" - fi - echo_yellow "=============== MCSManager ===============" - echo - echo_green "[+] MCSManager installation success!" - - chmod -R 755 "$mcsmanager_install_path" - - sleep 3 -} - -Create_Service() { - echo_cyan "[+] Create MCSManager service..." - - echo "[Unit] -Description=MCSManager-Daemon - -[Service] -WorkingDirectory=${mcsmanager_install_path}/daemon -ExecStart=${node_install_path}/bin/node app.js -ExecReload=/bin/kill -s QUIT \$MAINPID -ExecStop=/bin/kill -s QUIT \$MAINPID -Environment=\"PATH=${PATH}\" - -[Install] -WantedBy=multi-user.target -" >/etc/systemd/system/mcsm-daemon.service - - if [ "$web_install" = true ]; then - echo "[Unit] -Description=MCSManager-Web - -[Service] -WorkingDirectory=${mcsmanager_install_path}/web -ExecStart=${node_install_path}/bin/node app.js -ExecReload=/bin/kill -s QUIT \$MAINPID -ExecStop=/bin/kill -s QUIT \$MAINPID -Environment=\"PATH=${PATH}\" - -[Install] -WantedBy=multi-user.target -" >/etc/systemd/system/mcsm-web.service - fi - - systemctl daemon-reload - if [ "$web_install" = true ]; then - systemctl enable --now mcsm-{daemon,web}.service - else - systemctl enable --now mcsm-daemon.service - fi - echo_green "Registered!" - - sleep 2 - - printf "\n\n\n\n" - - echo_yellow "==================================================================" - echo_green "更新完成,欢迎使用 MCSManager !" - echo_yellow " " - if [ "$web_install" = true ]; then - echo_cyan_n "主控网页访问地址: " - echo_yellow "http://:23333 (Browser)" - fi - - echo_cyan_n "被控守护进程地址: " - echo_yellow "ws://:24444 (Cluster)" - - if [ "$web_install" = true ]; then - echo_red "默认情况下,你必须开放\033[1;33m 23333 和 24444 \033[1;31m端口才能确保面板工作正常!" - else - echo_red "默认情况下,你必须开放\033[1;33m 24444 \033[1;31m端口才能确保面板工作正常!" - fi - - echo_yellow " " - echo_cyan "面板开关指令:" - if [ "$web_install" = true ]; then - echo_cyan "systemctl start mcsm-{daemon,web}.service" - echo_cyan "systemctl stop mcsm-{daemon,web}.service" - echo_cyan "systemctl restart mcsm-{daemon,web}.service" - else - echo_cyan "systemctl start mcsm-daemon.service" - echo_cyan "systemctl stop mcsm-daemon.service" - echo_cyan "systemctl restart mcsm-daemon.service" - fi - echo_yellow " " - echo_green "官方文档: https://docs.mcsmanager.com/" - echo_yellow "==================================================================" -} - -# Environmental inspection -if [[ "$arch" == x86_64 ]]; then - arch=x64 - #echo "[-] x64 architecture detected" -elif [[ $arch == aarch64 ]]; then - arch=arm64 - #echo "[-] 64-bit ARM architecture detected" -elif [[ $arch == arm ]]; then - arch=armv7l - #echo "[-] 32-bit ARM architecture detected" -elif [[ $arch == ppc64le ]]; then - arch=ppc64le - #echo "[-] IBM POWER architecture detected" -elif [[ $arch == s390x ]]; then - arch=s390x - #echo "[-] IBM LinuxONE architecture detected" -else - Red_Error "[x] Sorry, this architecture is not supported yet!\n[x]Please try to install manually: https://github.com/MCSManager/MCSManager#linux" -fi - -# Define the variable Node installation directory -node_install_path="/opt/node-$node-linux-$arch" - -# Check network connection -echo_cyan "[-] Architecture: $arch" - -# Install related software -echo_cyan_n "[+] Installing dependent software (git, tar, wget)... " -if [[ -x "$(command -v yum)" ]]; then - yum install -y git tar wget -elif [[ -x "$(command -v apt-get)" ]]; then - apt-get install -y git tar wget -elif [[ -x "$(command -v pacman)" ]]; then - pacman -S --noconfirm --needed git tar wget -elif [[ -x "$(command -v zypper)" ]]; then - zypper --non-interactive install git tar wget -else - echo_red "[!] Cannot find your package manager! You may need to install git, tar and wget manually!" -fi - -# Determine whether the relevant software is installed successfully -if [[ -x "$(command -v git)" && -x "$(command -v tar)" && -x "$(command -v wget)" ]]; then - echo_green "Success" -else - Red_Error "[x] Failed to find git, tar and wget, please install them manually!" -fi - -# Install the Node environment -Update_Node - -# Install MCSManager -Update_MCSManager - -# Create MCSManager background service -Create_Service From c1bd8e0447cc0833bd71b2a8ad0f2bc1a25127af Mon Sep 17 00:00:00 2001 From: shane0411 Date: Sun, 18 May 2025 17:50:32 +0800 Subject: [PATCH 179/338] =?UTF-8?q?style:=20=E6=8A=8Aupdate=E6=94=B9?= =?UTF-8?q?=E7=82=BAinstall?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.sh | 22 ++++++++++------------ setup_cn.sh | 24 +++++++++++------------- 2 files changed, 21 insertions(+), 25 deletions(-) diff --git a/setup.sh b/setup.sh index bc3c57c..aa0854a 100644 --- a/setup.sh +++ b/setup.sh @@ -32,7 +32,7 @@ echo_yellow() { # script info echo_cyan "+---------------------------------------------------------------------- -| MCSManager Update +| MCSManager Installer +---------------------------------------------------------------------- " @@ -48,15 +48,13 @@ Red_Error() { exit 1 } -Update_Node() { +Install_Node() { if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then echo_green "Node.js version is up-to-date, skipping installation." return - else - echo_red "Node not find, start to install node.js" fi - echo_cyan_n "[+] Install Node.JS environment...\n" + echo_cyan "[+] Install Node.JS environment..." rm -irf "$node_install_path" @@ -86,11 +84,11 @@ Update_Node() { sleep 3 } -Update_MCSManager() { - echo_cyan "[+] Update MCSManager..." +Install_MCSManager() { + echo_cyan "[+] Install MCSManager..." if [ "$web_install" = false ]; then - echo_yellow "[-] will not update web... (The web folder was not found)" + echo_yellow "[-] will not install web... (The web folder was not found)" fi # stop service @@ -144,14 +142,14 @@ Update_MCSManager() { # echo "[→] cd daemon" cd "${mcsmanager_install_path}/daemon" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/daemon" - echo_cyan "[+] Update MCSManager-Daemon dependencies..." + echo_cyan "[+] Install MCSManager-Daemon dependencies..." env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${mcsmanager_install_path}/daemon" if [ "$web_install" = true ]; then # echo "[←] cd .." cd "${mcsmanager_install_path}/web" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/web" - echo_cyan "[+] Update MCSManager-Web dependencies..." + echo_cyan "[+] Install MCSManager-Web dependencies..." env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${mcsmanager_install_path}/web" else rm -rf "${mcsmanager_install_path}/web" @@ -302,10 +300,10 @@ else fi # Install the Node environment -Update_Node +Install_Node # Install MCSManager -Update_MCSManager +Install_MCSManager # Create MCSManager background service Create_Service diff --git a/setup_cn.sh b/setup_cn.sh index c7d1a6c..c2714ca 100755 --- a/setup_cn.sh +++ b/setup_cn.sh @@ -32,7 +32,7 @@ echo_yellow() { # script info echo_cyan "+---------------------------------------------------------------------- -| MCSManager 更新脚本 (MCSManager Update) +| MCSManager 安裝脚本 (MCSManager Installer) +---------------------------------------------------------------------- " @@ -48,15 +48,13 @@ Red_Error() { exit 1 } -Update_Node() { +Install_Node() { if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then echo_green "Node.js version is up-to-date, skipping installation." return - else - echo_red "Node not find, start to install node.js" fi - echo_cyan_n "[+] Install Node.JS environment...\n" + echo_cyan "[+] Install Node.JS environment..." rm -irf "$node_install_path" @@ -87,11 +85,11 @@ Update_Node() { sleep 3 } -Update_MCSManager() { - echo_cyan "[+] Update MCSManager..." +Install_MCSManager() { + echo_cyan "[+] Install MCSManager..." if [ "$web_install" = false ]; then - echo_yellow "[-] will not update web... (The web folder was not found)" + echo_yellow "[-] will not install web... (The web folder was not found)" fi # stop service @@ -145,14 +143,14 @@ Update_MCSManager() { # echo "[→] cd daemon" cd "${mcsmanager_install_path}/daemon" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/daemon" - echo_cyan "[+] Update MCSManager-Daemon dependencies..." + echo_cyan "[+] Install MCSManager-Daemon dependencies..." env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --registry=https://registry.npmmirror.com --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${mcsmanager_install_path}/daemon" if [ "$web_install" = true ]; then # echo "[←] cd .." cd "${mcsmanager_install_path}/web" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/web" - echo_cyan "[+] Update MCSManager-Web dependencies..." + echo_cyan "[+] Install MCSManager-Web dependencies..." env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${mcsmanager_install_path}/web" else rm -rf "${mcsmanager_install_path}/web" @@ -219,7 +217,7 @@ WantedBy=multi-user.target printf "\n\n\n\n" echo_yellow "==================================================================" - echo_green "更新完成,欢迎使用 MCSManager !" + echo_green "安装完成,欢迎使用 MCSManager !" echo_yellow " " if [ "$web_install" = true ]; then echo_cyan_n "主控网页访问地址: " @@ -299,10 +297,10 @@ else fi # Install the Node environment -Update_Node +Install_Node # Install MCSManager -Update_MCSManager +Install_MCSManager # Create MCSManager background service Create_Service From d8c893fbae6b9d261a240ed251f268b4b9f51ff3 Mon Sep 17 00:00:00 2001 From: shane0411 Date: Wed, 21 May 2025 23:07:49 +0800 Subject: [PATCH 180/338] =?UTF-8?q?feat:=20=E5=B0=87setup=E5=BE=A9?= =?UTF-8?q?=E5=8E=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/MCSManager/Script/pull/53#issuecomment-2897056688 --- daemon/setup.sh | 2 +- setup.sh | 97 +++++++++---------------------------------------- setup_cn.sh | 97 +++++++++---------------------------------------- 3 files changed, 37 insertions(+), 159 deletions(-) diff --git a/daemon/setup.sh b/daemon/setup.sh index aa1a6c2..3456253 100644 --- a/daemon/setup.sh +++ b/daemon/setup.sh @@ -2,7 +2,7 @@ # Official installation script. mcsmanager_install_path="/opt/mcsmanager" -mcsmanager_download_addr=$(curl -s https://api.github.com/repos/MCSManager/MCSManager/releases/latest | grep -o 'https://.*linux.*\.tar\.gz') +mcsmanager_download_addr="https://github.com/MCSManager/MCSManager/releases/latest/download/mcsmanager_linux_release.tar.gz" package_name="mcsmanager_linux_release.tar.gz" node="v20.12.2" arch=$(uname -m) diff --git a/setup.sh b/setup.sh index aa0854a..6af7a4c 100644 --- a/setup.sh +++ b/setup.sh @@ -2,7 +2,7 @@ # Official installation script. mcsmanager_install_path="/opt/mcsmanager" -mcsmanager_download_addr=$(curl -s https://api.github.com/repos/MCSManager/MCSManager/releases/latest | grep -o 'https://.*linux.*\.tar\.gz') +mcsmanager_download_addr="https://github.com/MCSManager/MCSManager/releases/latest/download/mcsmanager_linux_release.tar.gz" package_name="mcsmanager_linux_release.tar.gz" node="v20.12.2" arch=$(uname -m) @@ -36,11 +36,6 @@ echo_cyan "+-------------------------------------------------------------------- +---------------------------------------------------------------------- " -web_install=true -if [[ -d "${mcsmanager_install_path}" ]] && [[ ! -d "${mcsmanager_install_path}/web" ]]; then - web_install=false -fi - Red_Error() { echo '=================================================' printf '\033[1;31;40m%b\033[0m\n' "$@" @@ -87,10 +82,6 @@ Install_Node() { Install_MCSManager() { echo_cyan "[+] Install MCSManager..." - if [ "$web_install" = false ]; then - echo_yellow "[-] will not install web... (The web folder was not found)" - fi - # stop service systemctl disable --now mcsm-{web,daemon} @@ -103,40 +94,15 @@ Install_MCSManager() { # cd /opt/mcsmanager cd "${mcsmanager_install_path}" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}" - # backup data - if [ -d "${mcsmanager_install_path}/daemon/data" ]; then - mkdir -p "$mcsmanager_install_path/temp/daemon" - cp -rf $mcsmanager_install_path/daemon/data/* $mcsmanager_install_path/temp/daemon - fi - - if [ -d "${mcsmanager_install_path}/web/data" ]; then - mkdir -p "$mcsmanager_install_path/temp/web" - cp -rf $mcsmanager_install_path/web/data/* $mcsmanager_install_path/temp/web - fi - # download MCSManager release wget "${mcsmanager_download_addr}" -O "${package_name}" || Red_Error "[x] Failed to download MCSManager" tar -zxf ${package_name} -o || Red_Error "[x] Failed to untar ${package_name}" rm -rf "${mcsmanager_install_path}/${package_name}" # compatible with tar.gz packages of different formats - if [ -d "$mcsmanager_install_path/mcsmanager" ]; then - cp -rf $mcsmanager_install_path/mcsmanager/* $mcsmanager_install_path/ - rm -rf $mcsmanager_install_path/mcsmanager - fi - - if [ -d "${mcsmanager_install_path}/temp/daemon" ]; then - cp -rf $mcsmanager_install_path/temp/daemon/* $mcsmanager_install_path/daemon/data - rm -rf $mcsmanager_install_path/temp/daemon - fi - - if [ -d "${mcsmanager_install_path}/temp/web" ]; then - cp -rf $mcsmanager_install_path/temp/web/* $mcsmanager_install_path/web/data - rm -rf $mcsmanager_install_path/temp/web - fi - - if [ -d "${mcsmanager_install_path}/temp" ]; then - rm -rf $mcsmanager_install_path/temp + if [ -d "/opt/mcsmanager/mcsmanager" ]; then + cp -rf /opt/mcsmanager/mcsmanager/* /opt/mcsmanager/ + rm -rf /opt/mcsmanager/mcsmanager fi # echo "[→] cd daemon" @@ -145,22 +111,16 @@ Install_MCSManager() { echo_cyan "[+] Install MCSManager-Daemon dependencies..." env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${mcsmanager_install_path}/daemon" - if [ "$web_install" = true ]; then - # echo "[←] cd .." - cd "${mcsmanager_install_path}/web" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/web" + # echo "[←] cd .." + cd "${mcsmanager_install_path}/web" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/web" - echo_cyan "[+] Install MCSManager-Web dependencies..." - env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${mcsmanager_install_path}/web" - else - rm -rf "${mcsmanager_install_path}/web" - fi + echo_cyan "[+] Install MCSManager-Web dependencies..." + env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${mcsmanager_install_path}/web" echo echo_yellow "=============== MCSManager ===============" echo_green "Daemon: ${mcsmanager_install_path}/daemon" - if [ "$web_install" = true ]; then - echo_green "Web: ${mcsmanager_install_path}/web" - fi + echo_green "Web: ${mcsmanager_install_path}/web" echo_yellow "=============== MCSManager ===============" echo echo_green "[+] MCSManager installation success!" @@ -187,8 +147,7 @@ Environment=\"PATH=${PATH}\" WantedBy=multi-user.target " >/etc/systemd/system/mcsm-daemon.service - if [ "$web_install" = true ]; then - echo "[Unit] + echo "[Unit] Description=MCSManager-Web [Service] @@ -201,14 +160,9 @@ Environment=\"PATH=${PATH}\" [Install] WantedBy=multi-user.target " >/etc/systemd/system/mcsm-web.service - fi systemctl daemon-reload - if [ "$web_install" = true ]; then - systemctl enable --now mcsm-{daemon,web}.service - else - systemctl enable --now mcsm-daemon.service - fi + systemctl enable --now mcsm-{daemon,web}.service echo_green "Registered!" sleep 2 @@ -218,35 +172,20 @@ WantedBy=multi-user.target echo_yellow "==================================================================" echo_green "Installation is complete! Welcome to the MCSManager!!!" echo_yellow " " - if [ "$web_install" = true ]; then - echo_cyan_n "HTTP Web Service: " - echo_yellow "http://:23333 (Browser)" - fi - + echo_cyan_n "HTTP Web Service: " + echo_yellow "http://:23333 (Browser)" echo_cyan_n "Daemon Address: " echo_yellow "ws://:24444 (Cluster)" echo_red "You must expose ports " - - if [ "$web_install" = true ]; then - echo_yellow "23333" - echo_red " and " - fi - + echo_yellow "23333" + echo_red " and " echo_yellow "24444" echo_red " to use the service properly on the Internet." echo_yellow " " echo_cyan "Usage:" - - if [ "$web_install" = true ]; then - echo_cyan "systemctl start mcsm-{daemon,web}.service" - echo_cyan "systemctl stop mcsm-{daemon,web}.service" - echo_cyan "systemctl restart mcsm-{daemon,web}.service" - else - echo_cyan "systemctl start mcsm-daemon.service" - echo_cyan "systemctl stop mcsm-daemon.service" - echo_cyan "systemctl restart mcsm-daemon.service" - fi - + echo_cyan "systemctl start mcsm-{daemon,web}.service" + echo_cyan "systemctl stop mcsm-{daemon,web}.service" + echo_cyan "systemctl restart mcsm-{daemon,web}.service" echo_yellow " " echo_green "Official Document: https://docs.mcsmanager.com/" echo_yellow "==================================================================" diff --git a/setup_cn.sh b/setup_cn.sh index c2714ca..97e9b8c 100755 --- a/setup_cn.sh +++ b/setup_cn.sh @@ -32,15 +32,10 @@ echo_yellow() { # script info echo_cyan "+---------------------------------------------------------------------- -| MCSManager 安裝脚本 (MCSManager Installer) +| MCSManager 安装脚本 (MCSManager Installer) +---------------------------------------------------------------------- " -web_install=true -if [[ -d "${mcsmanager_install_path}" ]] && [[ ! -d "${mcsmanager_install_path}/web" ]]; then - web_install=false -fi - Red_Error() { echo '=================================================' printf '\033[1;31;40m%b\033[0m\n' "$@" @@ -62,7 +57,7 @@ Install_Node() { rm -rf "node-$node-linux-$arch.tar.gz" -# wget "https://nodejs.org/dist/$node/node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to download node release" + # wget "https://nodejs.org/dist/$node/node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to download node release" wget "https://registry.npmmirror.com/-/binary/node/$node/node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to download node release" tar -zxf "node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to untar node" @@ -88,10 +83,6 @@ Install_Node() { Install_MCSManager() { echo_cyan "[+] Install MCSManager..." - if [ "$web_install" = false ]; then - echo_yellow "[-] will not install web... (The web folder was not found)" - fi - # stop service systemctl disable --now mcsm-{web,daemon} @@ -104,40 +95,15 @@ Install_MCSManager() { # cd /opt/mcsmanager cd "${mcsmanager_install_path}" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}" - # backup data - if [ -d "${mcsmanager_install_path}/daemon/data" ]; then - mkdir -p "$mcsmanager_install_path/temp/daemon" - cp -rf $mcsmanager_install_path/daemon/data/* $mcsmanager_install_path/temp/daemon - fi - - if [ -d "${mcsmanager_install_path}/web/data" ]; then - mkdir -p "$mcsmanager_install_path/temp/web" - cp -rf $mcsmanager_install_path/web/data/* $mcsmanager_install_path/temp/web - fi - # download MCSManager release wget "${mcsmanager_download_addr}" -O "${package_name}" || Red_Error "[x] Failed to download MCSManager" tar -zxf ${package_name} -o || Red_Error "[x] Failed to untar ${package_name}" rm -rf "${mcsmanager_install_path}/${package_name}" # compatible with tar.gz packages of different formats - if [ -d "$mcsmanager_install_path/mcsmanager" ]; then - cp -rf $mcsmanager_install_path/mcsmanager/* $mcsmanager_install_path/ - rm -rf $mcsmanager_install_path/mcsmanager - fi - - if [ -d "${mcsmanager_install_path}/temp/daemon" ]; then - cp -rf $mcsmanager_install_path/temp/daemon/* $mcsmanager_install_path/daemon/data - rm -rf $mcsmanager_install_path/temp/daemon - fi - - if [ -d "${mcsmanager_install_path}/temp/web" ]; then - cp -rf $mcsmanager_install_path/temp/web/* $mcsmanager_install_path/web/data - rm -rf $mcsmanager_install_path/temp/web - fi - - if [ -d "${mcsmanager_install_path}/temp" ]; then - rm -rf $mcsmanager_install_path/temp + if [ -d "/opt/mcsmanager/mcsmanager" ]; then + cp -rf /opt/mcsmanager/mcsmanager/* /opt/mcsmanager/ + rm -rf /opt/mcsmanager/mcsmanager fi # echo "[→] cd daemon" @@ -146,22 +112,16 @@ Install_MCSManager() { echo_cyan "[+] Install MCSManager-Daemon dependencies..." env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --registry=https://registry.npmmirror.com --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${mcsmanager_install_path}/daemon" - if [ "$web_install" = true ]; then - # echo "[←] cd .." - cd "${mcsmanager_install_path}/web" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/web" + # echo "[←] cd .." + cd "${mcsmanager_install_path}/web" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/web" - echo_cyan "[+] Install MCSManager-Web dependencies..." - env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${mcsmanager_install_path}/web" - else - rm -rf "${mcsmanager_install_path}/web" - fi + echo_cyan "[+] Install MCSManager-Web dependencies..." + env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --registry=https://registry.npmmirror.com --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${mcsmanager_install_path}/web" echo echo_yellow "=============== MCSManager ===============" echo_green "Daemon: ${mcsmanager_install_path}/daemon" - if [ "$web_install" = true ]; then - echo_green "Web: ${mcsmanager_install_path}/web" - fi + echo_green "Web: ${mcsmanager_install_path}/web" echo_yellow "=============== MCSManager ===============" echo echo_green "[+] MCSManager installation success!" @@ -188,8 +148,7 @@ Environment=\"PATH=${PATH}\" WantedBy=multi-user.target " >/etc/systemd/system/mcsm-daemon.service - if [ "$web_install" = true ]; then - echo "[Unit] + echo "[Unit] Description=MCSManager-Web [Service] @@ -202,14 +161,9 @@ Environment=\"PATH=${PATH}\" [Install] WantedBy=multi-user.target " >/etc/systemd/system/mcsm-web.service - fi systemctl daemon-reload - if [ "$web_install" = true ]; then - systemctl enable --now mcsm-{daemon,web}.service - else - systemctl enable --now mcsm-daemon.service - fi + systemctl enable --now mcsm-{daemon,web}.service echo_green "Registered!" sleep 2 @@ -219,31 +173,16 @@ WantedBy=multi-user.target echo_yellow "==================================================================" echo_green "安装完成,欢迎使用 MCSManager !" echo_yellow " " - if [ "$web_install" = true ]; then - echo_cyan_n "主控网页访问地址: " - echo_yellow "http://:23333 (Browser)" - fi - + echo_cyan_n "主控网页访问地址: " + echo_yellow "http://:23333 (Browser)" echo_cyan_n "被控守护进程地址: " echo_yellow "ws://:24444 (Cluster)" - - if [ "$web_install" = true ]; then - echo_red "默认情况下,你必须开放\033[1;33m 23333 和 24444 \033[1;31m端口才能确保面板工作正常!" - else - echo_red "默认情况下,你必须开放\033[1;33m 24444 \033[1;31m端口才能确保面板工作正常!" - fi - + echo_red "默认情况下,你必须开放 23333 和 24444 端口才能确保面板工作正常!" echo_yellow " " echo_cyan "面板开关指令:" - if [ "$web_install" = true ]; then - echo_cyan "systemctl start mcsm-{daemon,web}.service" - echo_cyan "systemctl stop mcsm-{daemon,web}.service" - echo_cyan "systemctl restart mcsm-{daemon,web}.service" - else - echo_cyan "systemctl start mcsm-daemon.service" - echo_cyan "systemctl stop mcsm-daemon.service" - echo_cyan "systemctl restart mcsm-daemon.service" - fi + echo_cyan "systemctl start mcsm-{daemon,web}.service" + echo_cyan "systemctl stop mcsm-{daemon,web}.service" + echo_cyan "systemctl restart mcsm-{daemon,web}.service" echo_yellow " " echo_green "官方文档: https://docs.mcsmanager.com/" echo_yellow "==================================================================" From fdf5ef723476e6494bd45565835e1e5c4e217059 Mon Sep 17 00:00:00 2001 From: KevinLu Date: Thu, 22 May 2025 02:37:36 -0400 Subject: [PATCH 181/338] minor syntax fix --- setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index a1d236e..a183e19 100644 --- a/setup.sh +++ b/setup.sh @@ -1164,7 +1164,7 @@ print_install_result() { echo "__ /|_/ /_ / _____ \__ /|_/ /_ __ \`/_ __ \ __ \`/_ __ \`/ _ \_ ___/" echo "_ / / / / /___ ____/ /_ / / / / /_/ /_ / / / /_/ /_ /_/ // __/ /" echo "/_/ /_/ \____/ /____/ /_/ /_/ \__,_/ /_/ /_/\__,_/ _\__, / \___//_/" - echo " + echo "" # status summary echo "Installed/Updated Components:" if [[ "$install_daemon" == true && -n "$daemon_key" && -n "$daemon_port" ]]; then From 7ec8cfd5534499fc5fe479c052acbd46017ea215 Mon Sep 17 00:00:00 2001 From: KevinLu Date: Thu, 22 May 2025 02:48:23 -0400 Subject: [PATCH 182/338] fix node path when installed --- setup.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/setup.sh b/setup.sh index a183e19..afe8740 100644 --- a/setup.sh +++ b/setup.sh @@ -632,16 +632,17 @@ resolve_node_arch() { # This function check Node.js version + NPM (if Node.js valid) verify_node_at_path() { local node_path="$1" - local bin_node="$node_path/bin/node" - local bin_npm="$node_path/bin/npm" + # Assign value to vlobal variables when verifying + node_bin_path="$node_path/bin/node" + npm_bin_path="$node_path/bin/npm" # Node binary missing - if [ ! -x "$bin_node" ]; then + if [ ! -x "$node_bin_path" ]; then return 1 fi local installed_ver - installed_ver="$("$bin_node" -v 2>/dev/null | sed 's/^v//')" + installed_ver="$("$node_bin_path" -v 2>/dev/null | sed 's/^v//')" # Node exists but version not returned if [[ -z "$installed_ver" ]]; then @@ -663,7 +664,7 @@ verify_node_at_path() { fi # node cmd valid, but npm is missing or broken. - if [ ! -x "$bin_npm" ] || ! "$bin_npm" --version >/dev/null 2>&1; then + if [ ! -x "$npm_bin_path" ] || ! "$npm_bin_path" --version >/dev/null 2>&1; then return 4 fi From 58b6ee43b9ee1aa21e28658c8e2bd6091c80010a Mon Sep 17 00:00:00 2001 From: KevinLu Date: Thu, 22 May 2025 02:55:59 -0400 Subject: [PATCH 183/338] add cleanup when error --- setup.sh | 37 ++++++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/setup.sh b/setup.sh index afe8740..a6d4a5d 100644 --- a/setup.sh +++ b/setup.sh @@ -72,7 +72,7 @@ systemd_file="/etc/systemd/system/mcsm-" install_source_path="" # temp path for extracted file(s) -install_tmp_dir="" +install_tmp_dir="/opt/mcsmanager/mcsm_abcd" # dir name for data dir backup # e.g. /opt/mcsmanager/daemon/data -> /opt/mcsmanager/data_bak_data @@ -926,6 +926,7 @@ mcsm_install_prepare() { cprint cyan "Changing ownership of $install_tmp_dir to user '$install_user'..." chown -R "$install_user":"$install_user" "$install_tmp_dir" || { cprint red bold "Failed to change ownership of $install_tmp_dir" + cleanup_install_tmp exit 1 } @@ -952,13 +953,15 @@ mcsm_install_prepare() { if [[ -d "$data_dir" ]]; then if [[ -e "$backup_path" ]]; then cprint red bold "Backup destination already exists: $backup_path" - cprint red " Please resolve this conflict manually before continuing." + cprint red "Please resolve this conflict manually before continuing." + cleanup_install_tmp exit 1 fi cprint cyan "Backing up data directory for $component..." mv "$data_dir" "$backup_path" || { cprint red bold "Failed to move $data_dir to $backup_path" + cleanup_install_tmp exit 1 } cprint green "Moved $data_dir → $backup_path" @@ -969,6 +972,7 @@ mcsm_install_prepare() { cprint cyan "Removing old component directory: $component_path" rm -rf "$component_path" || { cprint red bold "Failed to remove old component directory: $component_path" + cleanup_install_tmp exit 1 } fi @@ -990,17 +994,20 @@ install_component() { # Step 1: Move new component to install_dir if [[ ! -d "$source_path" ]]; then cprint red bold "Source directory not found: $source_path" + cleanup_install_tmp exit 1 fi if [[ -e "$target_path" ]]; then cprint red bold "Target path already exists: $target_path" cprint red " This should not happen — possible permission error or unclean install." + cleanup_install_tmp exit 1 fi mv "$source_path" "$target_path" || { cprint red bold "Failed to move $source_path → $target_path" + cleanup_install_tmp exit 1 } @@ -1015,6 +1022,7 @@ install_component() { rm -rf "$target_data_path" # Ensure no conflict mv "$backup_data_path" "$target_data_path" || { cprint red bold "Failed to restore data directory to $target_data_path" + cleanup_install_tmp exit 1 } @@ -1026,18 +1034,21 @@ install_component() { # Step 3: Install NPM dependencies if [[ ! -x "$npm_bin_path" ]]; then cprint red bold "npm binary not found or not executable: $npm_bin_path" + cleanup_install_tmp exit 1 fi cprint cyan "Installing dependencies for $component using npm..." pushd "$target_path" >/dev/null || { cprint red bold "Failed to change directory to $target_path" + cleanup_install_tmp exit 1 } if ! "$npm_bin_path" install --no-audit --no-fund --loglevel=warn; then cprint red bold "NPM dependency installation failed for $component" popd >/dev/null + cleanup_install_tmp exit 1 fi @@ -1055,6 +1066,7 @@ create_systemd_service() { if [[ ! -d "$working_dir" ]]; then cprint red bold "Component directory not found: $working_dir" + cleanup_install_tmp return 1 fi @@ -1082,6 +1094,7 @@ EOF if [[ $? -ne 0 ]]; then cprint red bold "Failed to write service file: $service_path" + cleanup_install_tmp return 1 fi @@ -1155,6 +1168,16 @@ extract_component_info() { fi } +cleanup_install_tmp() { + if [[ -n "$install_tmp_dir" && -d "$install_tmp_dir" ]]; then + if rm -rf "$install_tmp_dir"; then + cprint green "Cleaned up temporary install folder: $install_tmp_dir" + else + cprint red "Failed to remove temporary folder: $install_tmp_dir" + fi + fi +} + print_install_result() { # Clear the screen clear &>/dev/null || true @@ -1274,18 +1297,14 @@ install_mcsm() { cprint green "Enabled service: $svc" else cprint red bold "Failed to enable service: $svc" + cleanup_install_tmp exit 1 fi done fi - # Clear temp dir - if rm -rf "$install_tmp_dir"; then - cprint green "Cleaned up temporary install folder: $install_tmp_dir" - else - cprint red "Failed to remove temporary folder: $install_tmp_dir" - fi - + # Clean tmp dir + cleanup_install_tmp # Extract installed component info safe_run extract_component_info "Failed to extract runtime info from installed services" safe_rul print_install_result "Failed to print installation result" From 63a859592c583ccd133bdd3d73d6a8278acc2d02 Mon Sep 17 00:00:00 2001 From: KevinLu Date: Thu, 22 May 2025 03:11:53 -0400 Subject: [PATCH 184/338] fix component detection logic --- setup.sh | 75 ++++++++++++++++++++++++++++++++------------------------ 1 file changed, 43 insertions(+), 32 deletions(-) diff --git a/setup.sh b/setup.sh index a6d4a5d..34ecac2 100644 --- a/setup.sh +++ b/setup.sh @@ -287,8 +287,9 @@ check_component_permission() { -# Parse cmd arguments. parse_args() { + local explicit_install_flag=false + while [[ $# -gt 0 ]]; do case "$1" in --install-dir) @@ -310,23 +311,28 @@ parse_args() { fi ;; --install) - if [[ -n "$2" ]]; then + explicit_install_flag=true + if [[ -n "$2" && "$2" != --* ]]; then case "$2" in daemon) install_daemon=true - check_component_permission "daemon" + is_component_installed "daemon" install_web=false + check_component_permission "daemon" ;; web) install_daemon=false + is_component_installed "web" install_web=true - check_component_permission "web" + check_component_permission "web" ;; all) install_daemon=true - check_component_permission "daemon" install_web=true - check_component_permission "web" + is_component_installed "daemon" + is_component_installed "web" + check_component_permission "daemon" + check_component_permission "web" ;; *) echo "Error: Invalid value for --install. Expected 'daemon', 'web', or 'all'." @@ -336,32 +342,9 @@ parse_args() { esac shift 2 else - # No argument passed with --install, detect based on installed components - daemon_installed=false - web_installed=false - - if is_component_installed "daemon"; then - daemon_installed=true - check_component_permission "daemon" - fi - if is_component_installed "web"; then - web_installed=true - check_component_permission "web" - fi - - if [[ "$daemon_installed" == true && "$web_installed" == false ]]; then - install_daemon=true - install_web=false - elif [[ "$daemon_installed" == false && "$web_installed" == true ]]; then - install_daemon=false - install_web=true - else - # None or both installed perform fresh install or update both - install_daemon=true - install_web=true - fi - - shift 1 + echo "Error: --install flag provided but no value. Please specify: daemon, web, or all." + echo "Usage: --install daemon|web|all" + exit 1 fi ;; --user) @@ -400,8 +383,36 @@ parse_args() { ;; esac done + + # Auto-detect branch: only run if --install was not explicitly passed + if [[ "$explicit_install_flag" == false ]]; then + daemon_installed=false + web_installed=false + + if is_component_installed "daemon"; then + daemon_installed=true + check_component_permission "daemon" + fi + if is_component_installed "web"; then + web_installed=true + check_component_permission "web" + fi + + # When only one component installed, we wanted to process that one only. + if [[ "$daemon_installed" == true && "$web_installed" == false ]]; then + install_daemon=true + install_web=false + elif [[ "$daemon_installed" == false && "$web_installed" == true ]]; then + install_daemon=false + install_web=true + else + install_daemon=true + install_web=true + fi + fi } + # Get Distribution & Architecture Info detect_os_info() { distro="Unknown" From baf3b67899f2e823389c101cf657f1f1fccb6eb7 Mon Sep 17 00:00:00 2001 From: KevinLu Date: Thu, 22 May 2025 03:12:20 -0400 Subject: [PATCH 185/338] minor language fix --- setup.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/setup.sh b/setup.sh index 34ecac2..bfcc2c6 100644 --- a/setup.sh +++ b/setup.sh @@ -574,17 +574,17 @@ permission_barrier() { # Step 0: Ensure installed user is detected if [[ -z "$installed_user" ]]; then cprint red bold "Detected that '$component' is installed but could not determine the user from its systemd service file." - cprint red " This may indicate a custom or unsupported service file setup." - cprint red " Refusing to proceed to avoid potential conflicts." + cprint red "This may indicate a custom or unsupported service file setup." + cprint red "Refusing to proceed to avoid potential conflicts." exit 1 fi # Step 1: User match check if [[ "$installed_user" != "$install_user" ]]; then cprint red bold "Permission mismatch for '$component':" - cprint red " Installed as user: $installed_user" - cprint red " Current install target user: $install_user" - cprint red " Unable to proceed due to ownership conflict." + cprint red "Installed as user: $installed_user" + cprint red "Current install target user: $install_user" + cprint red "Unable to proceed due to ownership conflict." exit 1 fi fi From 7fb10a4653a91e27a3a5a25078aca8f853e48ee0 Mon Sep 17 00:00:00 2001 From: KevinLu Date: Thu, 22 May 2025 03:17:46 -0400 Subject: [PATCH 186/338] minor fix --- setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index bfcc2c6..8a99b87 100644 --- a/setup.sh +++ b/setup.sh @@ -1318,7 +1318,7 @@ install_mcsm() { cleanup_install_tmp # Extract installed component info safe_run extract_component_info "Failed to extract runtime info from installed services" - safe_rul print_install_result "Failed to print installation result" + safe_run print_install_result "Failed to print installation result" } From 7f1e7d904af1fb6921be9535aeb1abf1f3f2c6a0 Mon Sep 17 00:00:00 2001 From: KevinLu Date: Thu, 22 May 2025 03:18:45 -0400 Subject: [PATCH 187/338] fixed web port extraction --- setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index 8a99b87..cd1d6aa 100644 --- a/setup.sh +++ b/setup.sh @@ -1164,7 +1164,7 @@ extract_component_info() { sleep 1 # Allow time to populate config if [[ -f "$web_config_path" ]]; then - web_port=$(grep -oP '"httpPort"\s*:\s*"\K[^"]+' "$web_config_path") + web_port=$(grep -oP '"httpPort"\s*:\s*\K[0-9]+' "$web_config_path") if [[ -n "$web_port" ]]; then cprint green "Extracted web port: $web_port" else From 9abf86a1ccbe98f72f8a0a221d2c4d3f9a115212 Mon Sep 17 00:00:00 2001 From: KevinLu Date: Thu, 22 May 2025 03:29:54 -0400 Subject: [PATCH 188/338] added timestamp to each output --- setup.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/setup.sh b/setup.sh index cd1d6aa..643472f 100644 --- a/setup.sh +++ b/setup.sh @@ -103,6 +103,7 @@ required_commands=( stat useradd usermod + date ) # Node.js related sections @@ -531,7 +532,7 @@ cprint() { local color="" local text="" local styles="" - + while [[ $# -gt 1 ]]; do case "$1" in black|red|green|yellow|blue|magenta|cyan|white) @@ -546,6 +547,12 @@ cprint() { text="$1" + # Build the prefix timestamp and script label in white, always + local timestamp="[$(date +%H:%M:%S)]" + local label="[MCSM Installer]" + local fixed_prefix="${FG_COLORS[white]}$timestamp $label${RESET} " + + # Apply color and style to the message content only local prefix="" if [[ -n "$color" && "$SUPPORTS_COLOR" = true ]]; then prefix+="${FG_COLORS[$color]}" @@ -554,9 +561,10 @@ cprint() { prefix="$styles$prefix" fi - printf "%b%s%b\n" "$prefix" "$text" "$RESET" + printf "%b%b%s%b\n" "$fixed_prefix" "$prefix" "$text" "$RESET" } + # Permission check before proceed with installation permission_barrier() { if [[ "$web_installed" == false && "$daemon_installed" == false ]]; then From 8e797e6aa46f32dc8c32e90ba89cdf4cddb73aa2 Mon Sep 17 00:00:00 2001 From: KevinLu Date: Thu, 22 May 2025 03:32:35 -0400 Subject: [PATCH 189/338] added timestamp exception --- setup.sh | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/setup.sh b/setup.sh index 643472f..98fefa6 100644 --- a/setup.sh +++ b/setup.sh @@ -532,6 +532,7 @@ cprint() { local color="" local text="" local styles="" + local disable_prefix=false while [[ $# -gt 1 ]]; do case "$1" in @@ -541,30 +542,35 @@ cprint() { bold|underline|italic|clear_line|strikethrough) styles+="${STYLES[$1]}" ;; + noprefix) + disable_prefix=true + ;; esac shift done text="$1" - # Build the prefix timestamp and script label in white, always - local timestamp="[$(date +%H:%M:%S)]" - local label="[MCSM Installer]" - local fixed_prefix="${FG_COLORS[white]}$timestamp $label${RESET} " + local prefix_text="" + if [[ "$disable_prefix" != true ]]; then + local timestamp="[$(date +%H:%M:%S)]" + local label="[MCSM Installer]" + prefix_text="${FG_COLORS[white]}$timestamp $label${RESET} " + fi - # Apply color and style to the message content only local prefix="" if [[ -n "$color" && "$SUPPORTS_COLOR" = true ]]; then prefix+="${FG_COLORS[$color]}" fi - if [ "$SUPPORTS_STYLE" = true ] || [[ "$styles" == *"${STYLES[clear_line]}"* ]]; then + if [[ "$SUPPORTS_STYLE" = true || "$styles" == *"${STYLES[clear_line]}"* ]]; then prefix="$styles$prefix" fi - printf "%b%b%s%b\n" "$fixed_prefix" "$prefix" "$text" "$RESET" + printf "%b%b%s%b\n" "$prefix_text" "$prefix" "$text" "$RESET" } + # Permission check before proceed with installation permission_barrier() { if [[ "$web_installed" == false && "$daemon_installed" == false ]]; then From 1c674063edb8c6a2fb51c8d36c734fa1561e2cd1 Mon Sep 17 00:00:00 2001 From: KevinLu Date: Thu, 22 May 2025 03:38:26 -0400 Subject: [PATCH 190/338] allows printing without newline --- setup.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/setup.sh b/setup.sh index 98fefa6..f64b745 100644 --- a/setup.sh +++ b/setup.sh @@ -533,6 +533,7 @@ cprint() { local text="" local styles="" local disable_prefix=false + local disable_newline=false while [[ $# -gt 1 ]]; do case "$1" in @@ -545,6 +546,9 @@ cprint() { noprefix) disable_prefix=true ;; + nonl) + disable_newline=true + ;; esac shift done @@ -566,11 +570,16 @@ cprint() { prefix="$styles$prefix" fi - printf "%b%b%s%b\n" "$prefix_text" "$prefix" "$text" "$RESET" + if [[ "$disable_newline" == true ]]; then + printf "%b%b%s%b" "$prefix_text" "$prefix" "$text" "$RESET" + else + printf "%b%b%s%b\n" "$prefix_text" "$prefix" "$text" "$RESET" + fi } + # Permission check before proceed with installation permission_barrier() { if [[ "$web_installed" == false && "$daemon_installed" == false ]]; then @@ -897,7 +906,7 @@ download_mcsm() { # Prepare user if needed prepare_user() { if [[ "$install_user" == "root" ]]; then - cprint cyan "✔ install_user is 'root' — skipping user creation." + cprint cyan "install_user is 'root' — skipping user creation." return 0 fi From b6a6d49427edda0493ffe572e3b514d7669e754d Mon Sep 17 00:00:00 2001 From: KevinLu Date: Thu, 22 May 2025 03:50:42 -0400 Subject: [PATCH 191/338] optimize display --- setup.sh | 78 ++++++++++++++++++++++++++++++++------------------------ 1 file changed, 44 insertions(+), 34 deletions(-) diff --git a/setup.sh b/setup.sh index f64b745..e102110 100644 --- a/setup.sh +++ b/setup.sh @@ -1217,24 +1217,26 @@ print_install_result() { clear &>/dev/null || true # Print ASCII banner - echo "______ _______________________ ___" - echo "___ |/ /_ ____/_ ___/__ |/ /_____ _____________ _______ _____________" - echo "__ /|_/ /_ / _____ \__ /|_/ /_ __ \`/_ __ \ __ \`/_ __ \`/ _ \_ ___/" - echo "_ / / / / /___ ____/ /_ / / / / /_/ /_ / / / /_/ /_ /_/ // __/ /" - echo "/_/ /_/ \____/ /____/ /_/ /_/ \__,_/ /_/ /_/\__,_/ _\__, / \___//_/" + cprint green noprefix "______ _______________________ ___" + cprint green noprefix "___ |/ /_ ____/_ ___/__ |/ /_____ _____________ _______ _____________" + cprint green noprefix "__ /|_/ /_ / _____ \__ /|_/ /_ __ \`/_ __ \ __ \`/_ __ \`/ _ \_ ___/" + cprint green noprefix "_ / / / / /___ ____/ /_ / / / / /_/ /_ / / / /_/ /_ /_/ // __/ /" + cprint green noprefix "/_/ /_/ \____/ /____/ /_/ /_/ \__,_/ /_/ /_/\__,_/ _\__, / \___//_/" echo "" # status summary - echo "Installed/Updated Components:" + cprint yellow noprefix "Installed/Updated Components:" if [[ "$install_daemon" == true && -n "$daemon_key" && -n "$daemon_port" ]]; then - echo "Daemon" + cprint cyan noprefix "Daemon" elif [[ "$install_daemon" == true ]]; then - echo "Daemon (partial, config not fully detected)" + cprint cyan noprefix nonl "Daemon " + cprint yellow noprefix "(partial, config not fully detected)" fi if [[ "$install_web" == true && -n "$web_port" ]]; then - echo "Web Interface" + cprint cyan noprefix "Web" elif [[ "$install_web" == true ]]; then - echo "Web Interface (partial, config not fully detected)" + cprint cyan noprefix nonl "Web " + cprint yellow noprefix "(partial, config not fully detected)" fi echo "" @@ -1249,56 +1251,64 @@ print_install_result() { local daemon_address="ws://$ip_address:${daemon_port:-Failed to Retrieve from Config file}" local daemon_key_display="${daemon_key:-Failed to Retrieve from Config file}" - echo "Daemon Address:" - echo " $daemon_address" - echo "Daemon Key:" - echo " $daemon_key_display" + cprint yellow noprefix "Daemon Address:" + cprint cyan noprefix " $daemon_address" + cprint yellow noprefix "Daemon Key:" + cprint cyan noprefix " $daemon_key_display" echo "" fi # Web info if [[ "$install_web" == true ]]; then local web_address="http://$ip_address:${web_port:-Failed to Retrieve from Config file}" - echo "HTTP Web Interface:" - echo " $web_address (open in browser)" + cprint yellow noprefix "HTTP Web Interface:" + cprint cyan noprefix " $web_address (open in browser)" echo "" fi # Port guidance - echo "NOTE:" - echo " Make sure to expose the above ports through your firewall." - echo " If accessing from outside your network, you may need to configure port forwarding on your router." + cprint yellow noprefix "NOTE:" + cprint cyan noprefix " Make sure to expose the above ports through your firewall." + cprint cyan noprefix " If accessing from outside your network, you may need to configure port forwarding on your router." echo "" # Service management help - echo "Service Management Commands:" + cprint yellow noprefix "Service Management Commands:" if [[ "$install_daemon" == true ]]; then - echo " systemctl start mcsm-daemon.service" - echo " systemctl stop mcsm-daemon.service" - echo " systemctl restart mcsm-daemon.service" - echo " systemctl status mcsm-daemon.service" + cprint green noprefix nonl " systemctl start " + cprint cyan noprefix "mcsm-daemon.service" + cprint green noprefix nonl " systemctl stop " + cprint cyan noprefix "mcsm-daemon.service" + cprint green noprefix nonl " systemctl restart " + cprint cyan noprefix "mcsm-daemon.service" + cprint green noprefix nonl " systemctl status " + cprint cyan noprefix "mcsm-daemon.service" fi if [[ "$install_web" == true ]]; then - echo " systemctl start mcsm-web.service" - echo " systemctl stop mcsm-web.service" - echo " systemctl restart mcsm-web.service" - echo " systemctl status mcsm-web.service" + cprint green noprefix nonl " systemctl start " + cprint cyan noprefix "mcsm-web.service" + cprint green noprefix nonl " systemctl stop " + cprint cyan noprefix "mcsm-web.service" + cprint green noprefix nonl " systemctl restart " + cprint cyan noprefix "mcsm-web.service" + cprint green noprefix nonl " systemctl status " + cprint cyan noprefix "mcsm-web.service" fi echo "" # Official doc - echo "Official Documentation:" - echo " https://docs.mcsmanager.com/" + cprint yellow noprefix "Official Documentation:" + cprint cyan noprefix " https://docs.mcsmanager.com/" echo "" # HTTPS support - echo "Need HTTPS?" - echo " To enable secure HTTPS access, configure a reverse proxy:" - echo " https://docs.mcsmanager.com/ops/proxy_https.html" + cprint yellow noprefix "Need HTTPS?" + cprint cyan noprefix " To enable secure HTTPS access, configure a reverse proxy:" + cprint cyan noprefix " https://docs.mcsmanager.com/ops/proxy_https.html" echo "" # Closing message - echo "Installation completed. Enjoy managing your servers with MCSManager!" + cprint green noprefix "Installation completed. Enjoy managing your servers with MCSManager!" echo "" } From a7de08e366f13cf09ea9e0049dd198e3d49d4a19 Mon Sep 17 00:00:00 2001 From: KevinLu Date: Thu, 22 May 2025 03:59:02 -0400 Subject: [PATCH 192/338] optimize display --- setup.sh | 93 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 47 insertions(+), 46 deletions(-) diff --git a/setup.sh b/setup.sh index e102110..0144b56 100644 --- a/setup.sh +++ b/setup.sh @@ -180,13 +180,13 @@ check_root() { # Using Bash's built-in EUID variable if [ -n "$EUID" ]; then if [ "$EUID" -ne 0 ]; then - echo "Error: This script must be run as root. Please use sudo or switch to the root user." + cprint red "Error: This script must be run as root. Please use sudo or switch to the root user." exit 1 fi else # Fallback to using id -u if EUID is unavailable (e.g., non-Bash shell or misconfigured environment) if [ "$(id -u)" -ne 0 ]; then - echo "Error: This script must be run as root. Please use sudo or switch to the root user." + cprint red "Error: This script must be run as root. Please use sudo or switch to the root user." exit 1 fi fi @@ -207,15 +207,15 @@ detect_terminal_capabilities() { fi if [ "$SUPPORTS_COLOR" = true ]; then - echo "[OK] Terminal supports colored output." + cprint green "[OK] Terminal supports colored output." else - echo "Note: Terminal does not support colored output. Continuing without formatting." + cprint yellow "Note: Terminal does not support colored output. Continuing without formatting." fi if [ "$SUPPORTS_STYLE" = true ]; then - echo "[OK] Terminal supports bold and underline formatting." + cprint green "[OK] Terminal supports bold and underline formatting." else - echo "Note: Terminal does not support advanced text styles." + cprint yellow "Note: Terminal does not support advanced text styles." fi } @@ -473,8 +473,8 @@ detect_os_info() { version="unknown" fi - echo "Detected OS: $distro $version_full" - echo "Detected Architecture: $arch" + cprint cyan "Detected OS: $distro $version_full" + cprint cyan "Detected Architecture: $arch" } @@ -493,7 +493,7 @@ check_supported_os() { return 1 fi - echo "OS compatibility check passed." + cprint green "OS compatibility check passed." return 0 } @@ -513,7 +513,7 @@ check_required_commands() { return 1 fi - echo "All required commands are available." + cprint green "All required commands are available." return 0 } @@ -834,7 +834,7 @@ download_mcsm() { local primary_url="${download_base_url}${archive_name}" local fallback="$download_fallback_url" - cprint cyan bold "➡ Downloading MCSManager package..." + cprint cyan bold "Downloading MCSManager package..." # Step 1: Try downloading from primary URL if ! wget --progress=bar:force -O "$archive_path" "$primary_url"; then @@ -1217,26 +1217,26 @@ print_install_result() { clear &>/dev/null || true # Print ASCII banner - cprint green noprefix "______ _______________________ ___" - cprint green noprefix "___ |/ /_ ____/_ ___/__ |/ /_____ _____________ _______ _____________" - cprint green noprefix "__ /|_/ /_ / _____ \__ /|_/ /_ __ \`/_ __ \ __ \`/_ __ \`/ _ \_ ___/" - cprint green noprefix "_ / / / / /___ ____/ /_ / / / / /_/ /_ / / / /_/ /_ /_/ // __/ /" - cprint green noprefix "/_/ /_/ \____/ /____/ /_/ /_/ \__,_/ /_/ /_/\__,_/ _\__, / \___//_/" + cprint white noprefix "______ _______________________ ___" + cprint white noprefix "___ |/ /_ ____/_ ___/__ |/ /_____ _____________ _______ _____________" + cprint white noprefix "__ /|_/ /_ / _____ \__ /|_/ /_ __ \`/_ __ \ __ \`/_ __ \`/ _ \_ ___/" + cprint white noprefix "_ / / / / /___ ____/ /_ / / / / /_/ /_ / / / /_/ /_ /_/ // __/ /" + cprint white noprefix "/_/ /_/ \____/ /____/ /_/ /_/ \__,_/ /_/ /_/\__,_/ _\__, / \___//_/" echo "" # status summary - cprint yellow noprefix "Installed/Updated Components:" + cprint green noprefix "Installed/Updated Components:" if [[ "$install_daemon" == true && -n "$daemon_key" && -n "$daemon_port" ]]; then - cprint cyan noprefix "Daemon" + cprint yellow noprefix "Daemon" elif [[ "$install_daemon" == true ]]; then - cprint cyan noprefix nonl "Daemon " - cprint yellow noprefix "(partial, config not fully detected)" + cprint yellow noprefix nonl "Daemon " + cprint red noprefix "(partial, config not fully detected)" fi if [[ "$install_web" == true && -n "$web_port" ]]; then - cprint cyan noprefix "Web" + cprint yellow noprefix "Web" elif [[ "$install_web" == true ]]; then - cprint cyan noprefix nonl "Web " - cprint yellow noprefix "(partial, config not fully detected)" + cprint yellow noprefix nonl "Web " + cprint red noprefix "(partial, config not fully detected)" fi echo "" @@ -1251,60 +1251,61 @@ print_install_result() { local daemon_address="ws://$ip_address:${daemon_port:-Failed to Retrieve from Config file}" local daemon_key_display="${daemon_key:-Failed to Retrieve from Config file}" - cprint yellow noprefix "Daemon Address:" - cprint cyan noprefix " $daemon_address" - cprint yellow noprefix "Daemon Key:" - cprint cyan noprefix " $daemon_key_display" + cprint green noprefix "Daemon Address:" + cprint white noprefix " $daemon_address" + cprint green noprefix "Daemon Key:" + cprint white noprefix " $daemon_key_display" echo "" fi # Web info if [[ "$install_web" == true ]]; then local web_address="http://$ip_address:${web_port:-Failed to Retrieve from Config file}" - cprint yellow noprefix "HTTP Web Interface:" - cprint cyan noprefix " $web_address (open in browser)" + cprint green noprefix "HTTP Web Interface:" + cprint white noprefix nonl" $web_address " + cprint yellow noprefix"(open in browser)" echo "" fi # Port guidance - cprint yellow noprefix "NOTE:" + cprint green noprefix "NOTE:" cprint cyan noprefix " Make sure to expose the above ports through your firewall." cprint cyan noprefix " If accessing from outside your network, you may need to configure port forwarding on your router." echo "" # Service management help - cprint yellow noprefix "Service Management Commands:" + cprint green noprefix "Service Management Commands:" if [[ "$install_daemon" == true ]]; then cprint green noprefix nonl " systemctl start " - cprint cyan noprefix "mcsm-daemon.service" + cprint yellow noprefix "mcsm-daemon.service" cprint green noprefix nonl " systemctl stop " - cprint cyan noprefix "mcsm-daemon.service" + cprint yellow noprefix "mcsm-daemon.service" cprint green noprefix nonl " systemctl restart " - cprint cyan noprefix "mcsm-daemon.service" + cprint yellow noprefix "mcsm-daemon.service" cprint green noprefix nonl " systemctl status " - cprint cyan noprefix "mcsm-daemon.service" + cprint yellow noprefix "mcsm-daemon.service" fi if [[ "$install_web" == true ]]; then cprint green noprefix nonl " systemctl start " - cprint cyan noprefix "mcsm-web.service" + cprint yellow noprefix "mcsm-web.service" cprint green noprefix nonl " systemctl stop " - cprint cyan noprefix "mcsm-web.service" + cprint yellow noprefix "mcsm-web.service" cprint green noprefix nonl " systemctl restart " - cprint cyan noprefix "mcsm-web.service" + cprint yellow noprefix "mcsm-web.service" cprint green noprefix nonl " systemctl status " - cprint cyan noprefix "mcsm-web.service" + cprint yellow noprefix "mcsm-web.service" fi echo "" # Official doc - cprint yellow noprefix "Official Documentation:" - cprint cyan noprefix " https://docs.mcsmanager.com/" + cprint green noprefix "Official Documentation:" + cprint white noprefix " https://docs.mcsmanager.com/" echo "" # HTTPS support - cprint yellow noprefix "Need HTTPS?" - cprint cyan noprefix " To enable secure HTTPS access, configure a reverse proxy:" - cprint cyan noprefix " https://docs.mcsmanager.com/ops/proxy_https.html" + cprint green noprefix "Need HTTPS?" + cprint yellow noprefix " To enable secure HTTPS access, configure a reverse proxy:" + cprint white noprefix " https://docs.mcsmanager.com/ops/proxy_https.html" echo "" # Closing message @@ -1357,7 +1358,7 @@ install_mcsm() { main() { trap 'echo "Unexpected error occurred."; exit 99' ERR - + safe_run detect_terminal_capabilities "Failed to detect terminal capabilities" safe_run check_root "Script must be run as root" safe_run parse_args "Failed to parse arguments" "$@" safe_run detect_os_info "Failed to detect OS" @@ -1366,7 +1367,7 @@ main() { safe_run resolve_node_arch "Failed to resolve Node.js architecture" safe_run check_required_commands "Missing required system commands" - safe_run detect_terminal_capabilities "Failed to detect terminal capabilities" + safe_run check_node_installed "Failed to detect Node.js or npm at expected path. Node.js will be installed." if [ "$install_node" = true ]; then safe_run install_node "Node.js installation failed" From 035a09b10e6fb2014592af15decd352b0e68402e Mon Sep 17 00:00:00 2001 From: KevinLu Date: Thu, 22 May 2025 04:01:31 -0400 Subject: [PATCH 193/338] optimize printed result --- setup.sh | 56 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/setup.sh b/setup.sh index 0144b56..2eb4df0 100644 --- a/setup.sh +++ b/setup.sh @@ -1224,7 +1224,7 @@ print_install_result() { cprint white noprefix "/_/ /_/ \____/ /____/ /_/ /_/ \__,_/ /_/ /_/\__,_/ _\__, / \___//_/" echo "" # status summary - cprint green noprefix "Installed/Updated Components:" + cprint cyan noprefix "Installed/Updated Components:" if [[ "$install_daemon" == true && -n "$daemon_key" && -n "$daemon_port" ]]; then cprint yellow noprefix "Daemon" elif [[ "$install_daemon" == true ]]; then @@ -1251,9 +1251,9 @@ print_install_result() { local daemon_address="ws://$ip_address:${daemon_port:-Failed to Retrieve from Config file}" local daemon_key_display="${daemon_key:-Failed to Retrieve from Config file}" - cprint green noprefix "Daemon Address:" + cprint cyan noprefix "Daemon Address:" cprint white noprefix " $daemon_address" - cprint green noprefix "Daemon Key:" + cprint cyan noprefix "Daemon Key:" cprint white noprefix " $daemon_key_display" echo "" fi @@ -1261,50 +1261,50 @@ print_install_result() { # Web info if [[ "$install_web" == true ]]; then local web_address="http://$ip_address:${web_port:-Failed to Retrieve from Config file}" - cprint green noprefix "HTTP Web Interface:" + cprint cyan noprefix "HTTP Web Interface:" cprint white noprefix nonl" $web_address " - cprint yellow noprefix"(open in browser)" + cprint yellow noprefix "(open in browser)" echo "" fi # Port guidance - cprint green noprefix "NOTE:" - cprint cyan noprefix " Make sure to expose the above ports through your firewall." - cprint cyan noprefix " If accessing from outside your network, you may need to configure port forwarding on your router." + cprint yellow noprefix "NOTE:" + cprint white noprefix " Make sure to expose the above ports through your firewall." + cprint white noprefix " If accessing from outside your network, you may need to configure port forwarding on your router." echo "" # Service management help - cprint green noprefix "Service Management Commands:" + cprint cyan noprefix "Service Management Commands:" if [[ "$install_daemon" == true ]]; then - cprint green noprefix nonl " systemctl start " - cprint yellow noprefix "mcsm-daemon.service" - cprint green noprefix nonl " systemctl stop " - cprint yellow noprefix "mcsm-daemon.service" - cprint green noprefix nonl " systemctl restart " - cprint yellow noprefix "mcsm-daemon.service" - cprint green noprefix nonl " systemctl status " - cprint yellow noprefix "mcsm-daemon.service" + cprint yellow noprefix nonl " systemctl start " + cprint white noprefix "mcsm-daemon.service" + cprint yellow noprefix nonl " systemctl stop " + cprint white noprefix "mcsm-daemon.service" + cprint yellow noprefix nonl " systemctl restart " + cprint white noprefix "mcsm-daemon.service" + cprint yellow noprefix nonl " systemctl status " + cprint white noprefix "mcsm-daemon.service" fi if [[ "$install_web" == true ]]; then - cprint green noprefix nonl " systemctl start " - cprint yellow noprefix "mcsm-web.service" - cprint green noprefix nonl " systemctl stop " - cprint yellow noprefix "mcsm-web.service" - cprint green noprefix nonl " systemctl restart " - cprint yellow noprefix "mcsm-web.service" - cprint green noprefix nonl " systemctl status " - cprint yellow noprefix "mcsm-web.service" + cprint yellow noprefix nonl " systemctl start " + cprint white noprefix "mcsm-web.service" + cprint yellow noprefix nonl " systemctl stop " + cprint white noprefix "mcsm-web.service" + cprint yellow noprefix nonl " systemctl restart " + cprint white noprefix "mcsm-web.service" + cprint yellow noprefix nonl " systemctl status " + cprint white noprefix "mcsm-web.service" fi echo "" # Official doc - cprint green noprefix "Official Documentation:" + cprint cyan noprefix "Official Documentation:" cprint white noprefix " https://docs.mcsmanager.com/" echo "" # HTTPS support - cprint green noprefix "Need HTTPS?" - cprint yellow noprefix " To enable secure HTTPS access, configure a reverse proxy:" + cprint cyan noprefix "Need HTTPS?" + cprint white noprefix " To enable secure HTTPS access, configure a reverse proxy:" cprint white noprefix " https://docs.mcsmanager.com/ops/proxy_https.html" echo "" From b4dfa7c4aefdab41edbdfbe295d09f1ef672694e Mon Sep 17 00:00:00 2001 From: KevinLu Date: Thu, 22 May 2025 04:04:06 -0400 Subject: [PATCH 194/338] optimize result printed --- setup.sh | 60 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/setup.sh b/setup.sh index 2eb4df0..67a71cf 100644 --- a/setup.sh +++ b/setup.sh @@ -1224,19 +1224,19 @@ print_install_result() { cprint white noprefix "/_/ /_/ \____/ /____/ /_/ /_/ \__,_/ /_/ /_/\__,_/ _\__, / \___//_/" echo "" # status summary - cprint cyan noprefix "Installed/Updated Components:" + cprint yellow noprefix "Installed/Updated Components:" if [[ "$install_daemon" == true && -n "$daemon_key" && -n "$daemon_port" ]]; then - cprint yellow noprefix "Daemon" + cprint white noprefix "Daemon" elif [[ "$install_daemon" == true ]]; then - cprint yellow noprefix nonl "Daemon " - cprint red noprefix "(partial, config not fully detected)" + cprint white noprefix nonl "Daemon " + cprint yellow noprefix "(partial, config not fully detected)" fi if [[ "$install_web" == true && -n "$web_port" ]]; then - cprint yellow noprefix "Web" + cprint white noprefix "Web" elif [[ "$install_web" == true ]]; then - cprint yellow noprefix nonl "Web " - cprint red noprefix "(partial, config not fully detected)" + cprint white noprefix nonl "Web " + cprint yellow noprefix "(partial, config not fully detected)" fi echo "" @@ -1251,9 +1251,9 @@ print_install_result() { local daemon_address="ws://$ip_address:${daemon_port:-Failed to Retrieve from Config file}" local daemon_key_display="${daemon_key:-Failed to Retrieve from Config file}" - cprint cyan noprefix "Daemon Address:" + cprint yellow noprefix "Daemon Address:" cprint white noprefix " $daemon_address" - cprint cyan noprefix "Daemon Key:" + cprint yellow noprefix "Daemon Key:" cprint white noprefix " $daemon_key_display" echo "" fi @@ -1261,8 +1261,8 @@ print_install_result() { # Web info if [[ "$install_web" == true ]]; then local web_address="http://$ip_address:${web_port:-Failed to Retrieve from Config file}" - cprint cyan noprefix "HTTP Web Interface:" - cprint white noprefix nonl" $web_address " + cprint yellow noprefix "HTTP Web Interface:" + cprint white noprefix nonl " $web_address " cprint yellow noprefix "(open in browser)" echo "" fi @@ -1274,36 +1274,36 @@ print_install_result() { echo "" # Service management help - cprint cyan noprefix "Service Management Commands:" + cprint yellow noprefix "Service Management Commands:" if [[ "$install_daemon" == true ]]; then - cprint yellow noprefix nonl " systemctl start " - cprint white noprefix "mcsm-daemon.service" - cprint yellow noprefix nonl " systemctl stop " - cprint white noprefix "mcsm-daemon.service" - cprint yellow noprefix nonl " systemctl restart " - cprint white noprefix "mcsm-daemon.service" - cprint yellow noprefix nonl " systemctl status " - cprint white noprefix "mcsm-daemon.service" + cprint white noprefix nonl " systemctl start " + cprint yellow noprefix "mcsm-daemon.service" + cprint white noprefix nonl " systemctl stop " + cprint yellow noprefix "mcsm-daemon.service" + cprint white noprefix nonl " systemctl restart " + cprint yellow noprefix "mcsm-daemon.service" + cprint white noprefix nonl " systemctl status " + cprint yellow noprefix "mcsm-daemon.service" fi if [[ "$install_web" == true ]]; then - cprint yellow noprefix nonl " systemctl start " - cprint white noprefix "mcsm-web.service" - cprint yellow noprefix nonl " systemctl stop " - cprint white noprefix "mcsm-web.service" - cprint yellow noprefix nonl " systemctl restart " - cprint white noprefix "mcsm-web.service" - cprint yellow noprefix nonl " systemctl status " - cprint white noprefix "mcsm-web.service" + cprint white noprefix nonl " systemctl start " + cprint yellow noprefix "mcsm-web.service" + cprint white noprefix nonl " systemctl stop " + cprint yellow noprefix "mcsm-web.service" + cprint white noprefix nonl " systemctl restart " + cprint yellow noprefix "mcsm-web.service" + cprint white noprefix nonl " systemctl status " + cprint yellow noprefix "mcsm-web.service" fi echo "" # Official doc - cprint cyan noprefix "Official Documentation:" + cprint yellow noprefix "Official Documentation:" cprint white noprefix " https://docs.mcsmanager.com/" echo "" # HTTPS support - cprint cyan noprefix "Need HTTPS?" + cprint yellow noprefix "Need HTTPS?" cprint white noprefix " To enable secure HTTPS access, configure a reverse proxy:" cprint white noprefix " https://docs.mcsmanager.com/ops/proxy_https.html" echo "" From 8923455a6fdbeec2a31fe2fde86a94d19f6eef95 Mon Sep 17 00:00:00 2001 From: KevinLu Date: Thu, 22 May 2025 04:04:34 -0400 Subject: [PATCH 195/338] clear console after install --- setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index 67a71cf..f6157fa 100644 --- a/setup.sh +++ b/setup.sh @@ -1214,7 +1214,7 @@ cleanup_install_tmp() { print_install_result() { # Clear the screen - clear &>/dev/null || true + clear || true # Print ASCII banner cprint white noprefix "______ _______________________ ___" From 80c7102ba47d31bd5b8d5785d713ff1766f65eff Mon Sep 17 00:00:00 2001 From: SkyKing_PX Date: Thu, 22 May 2025 11:17:58 +0000 Subject: [PATCH 196/338] Add Purpur 1.21.5 Build --- templates.json | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/templates.json b/templates.json index a02e914..7efb6be 100644 --- a/templates.json +++ b/templates.json @@ -11,6 +11,25 @@ } ], "packages": [ + { + "language": "en_us", + "description": "[Purpur] Minecraft 1.21.5 Purpur", + "title": "Minecraft 1.21.5", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "55MB", + "remark": "Only Purpur included", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.5-2434.jar", + "author": "purpurmc.org", + "setupInfo": { + "type": "minecraft/java/purpur", + "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.5-2434.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "language": "en_us", "description": "[Purpur] Minecraft 1.21.4 Purpur", From 7661b48184a3a8c85fe70e61f36c154b5f38abca Mon Sep 17 00:00:00 2001 From: SkyKing_PX Date: Thu, 22 May 2025 11:18:57 +0000 Subject: [PATCH 197/338] Update Paper 1.21.4 Build --- templates.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates.json b/templates.json index 7efb6be..63e26e6 100644 --- a/templates.json +++ b/templates.json @@ -228,11 +228,11 @@ "hardware": "RAM 4G+", "size": "50MB", "remark": "Only Paper included", - "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/227/downloads/paper-1.21.4-227.jar", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/231/downloads/paper-1.21.4-231.jar", "author": "papermc.io", "setupInfo": { "type": "minecraft/java/paper", - "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.4-227.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.4-231.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", From fb95f62a082d0d868ad74d0d44d4d4898dac00d5 Mon Sep 17 00:00:00 2001 From: shane0411 Date: Sun, 25 May 2025 18:52:13 +0800 Subject: [PATCH 198/338] =?UTF-8?q?revert:=20=E5=8F=96=E6=B6=88=E5=B0=8Dwe?= =?UTF-8?q?b=E7=9A=84=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- daemon/setup.sh | 4 +--- daemon/setup_cn.sh | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/daemon/setup.sh b/daemon/setup.sh index 3456253..a0ed362 100644 --- a/daemon/setup.sh +++ b/daemon/setup.sh @@ -81,7 +81,7 @@ Install_MCSManager() { systemctl disable --now mcsm-{web,daemon} # delete service - rm -rf /etc/systemd/system/mcsm-{daemon,web}.service + rm -rf /etc/systemd/system/mcsm-daemon.service systemctl daemon-reload mkdir -p "${mcsmanager_install_path}" || Red_Error "[x] Failed to create ${mcsmanager_install_path}" @@ -100,8 +100,6 @@ Install_MCSManager() { rm -rf /opt/mcsmanager/mcsmanager fi - rm -rf "${mcsmanager_install_path}/web" - # echo "[→] cd daemon" cd "${mcsmanager_install_path}/daemon" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/daemon" diff --git a/daemon/setup_cn.sh b/daemon/setup_cn.sh index 8726b5c..aacb7b4 100644 --- a/daemon/setup_cn.sh +++ b/daemon/setup_cn.sh @@ -82,7 +82,7 @@ Install_MCSManager() { systemctl disable --now mcsm-{web,daemon} # delete service - rm -rf /etc/systemd/system/mcsm-{daemon,web}.service + rm -rf /etc/systemd/system/mcsm-daemon.service systemctl daemon-reload mkdir -p "${mcsmanager_install_path}" || Red_Error "[x] Failed to create ${mcsmanager_install_path}" @@ -101,8 +101,6 @@ Install_MCSManager() { rm -rf /opt/mcsmanager/mcsmanager fi - rm -rf "${mcsmanager_install_path}/web" - # echo "[→] cd daemon" cd "${mcsmanager_install_path}/daemon" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/daemon" From 5eaee9f8d1f1b48f169f72523dd844c1cad3b0df Mon Sep 17 00:00:00 2001 From: KUMAKAIHA Date: Sun, 22 Jun 2025 20:08:48 +0800 Subject: [PATCH 199/338] Auto install Brew --- setup_macOS.sh | 17 +++++++++++++++++ setup_macOS_cn.sh | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/setup_macOS.sh b/setup_macOS.sh index f711303..ebbc02f 100644 --- a/setup_macOS.sh +++ b/setup_macOS.sh @@ -15,6 +15,13 @@ echo "Automatically checking and installing required dependencies (brew, node, n if ! command -v brew &> /dev/null; then echo "Homebrew not found, installing Homebrew..." /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + if [ -x "/opt/homebrew/bin/brew" ]; then + eval "$(/opt/homebrew/bin/brew shellenv)" + export PATH="/opt/homebrew/bin:$PATH" + elif [ -x "/usr/local/bin/brew" ]; then + eval "$(/usr/local/bin/brew shellenv)" + export PATH="/usr/local/bin:$PATH" + fi if ! command -v brew &> /dev/null; then echo "Error: Homebrew installation failed." exit 1 @@ -24,6 +31,8 @@ fi if ! command -v node &> /dev/null; then echo "Node.js not found, installing Node.js via Homebrew..." brew install node + export PATH="/opt/homebrew/bin:/usr/local/bin:$PATH" + hash -r if ! command -v node &> /dev/null; then echo "Error: Node.js installation failed." exit 1 @@ -33,6 +42,8 @@ fi if ! command -v npm &> /dev/null; then echo "npm not found, reinstalling Node.js via Homebrew..." brew install node + export PATH="/opt/homebrew/bin:/usr/local/bin:$PATH" + hash -r if ! command -v npm &> /dev/null; then echo "Error: npm installation failed." exit 1 @@ -42,6 +53,8 @@ fi if ! command -v curl &> /dev/null; then echo "curl not found, installing curl via Homebrew..." brew install curl + export PATH="/opt/homebrew/bin:/usr/local/bin:$PATH" + hash -r if ! command -v curl &> /dev/null; then echo "Error: curl installation failed." exit 1 @@ -51,6 +64,8 @@ fi if ! command -v tar &> /dev/null; then echo "tar not found, installing tar via Homebrew..." brew install tar + export PATH="/opt/homebrew/bin:/usr/local/bin:$PATH" + hash -r if ! command -v tar &> /dev/null; then echo "Error: tar installation failed." exit 1 @@ -60,6 +75,8 @@ fi if ! command -v pm2 &> /dev/null; then echo "PM2 not found, installing PM2 globally..." npm install -g pm2 + export PATH="/opt/homebrew/bin:/usr/local/bin:$PATH" + hash -r if ! command -v pm2 &> /dev/null; then echo "Error: PM2 installation failed. Please run 'npm install -g pm2' manually." exit 1 diff --git a/setup_macOS_cn.sh b/setup_macOS_cn.sh index abcc950..3a71b86 100644 --- a/setup_macOS_cn.sh +++ b/setup_macOS_cn.sh @@ -15,6 +15,13 @@ echo "将自动检测并安装所需依赖 (brew, node, npm, curl, tar, pm2)..." if ! command -v brew &> /dev/null; then echo "未检测到 Homebrew,正在自动安装 Homebrew..." /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + if [ -x "/opt/homebrew/bin/brew" ]; then + eval "$(/opt/homebrew/bin/brew shellenv)" + export PATH="/opt/homebrew/bin:$PATH" + elif [ -x "/usr/local/bin/brew" ]; then + eval "$(/usr/local/bin/brew shellenv)" + export PATH="/usr/local/bin:$PATH" + fi if ! command -v brew &> /dev/null; then echo "错误: Homebrew 安装失败。" exit 1 @@ -24,6 +31,8 @@ fi if ! command -v node &> /dev/null; then echo "未检测到 Node.js,正在通过 Homebrew 安装 Node.js..." brew install node + export PATH="/opt/homebrew/bin:/usr/local/bin:$PATH" + hash -r if ! command -v node &> /dev/null; then echo "错误: Node.js 安装失败。" exit 1 @@ -33,6 +42,8 @@ fi if ! command -v npm &> /dev/null; then echo "未检测到 npm,正在通过 Homebrew 重新安装 Node.js..." brew install node + export PATH="/opt/homebrew/bin:/usr/local/bin:$PATH" + hash -r if ! command -v npm &> /dev/null; then echo "错误: npm 安装失败。" exit 1 @@ -42,6 +53,8 @@ fi if ! command -v curl &> /dev/null; then echo "未检测到 curl,正在通过 Homebrew 安装 curl..." brew install curl + export PATH="/opt/homebrew/bin:/usr/local/bin:$PATH" + hash -r if ! command -v curl &> /dev/null; then echo "错误: curl 安装失败。" exit 1 @@ -51,6 +64,8 @@ fi if ! command -v tar &> /dev/null; then echo "未检测到 tar,正在通过 Homebrew 安装 tar..." brew install tar + export PATH="/opt/homebrew/bin:/usr/local/bin:$PATH" + hash -r if ! command -v tar &> /dev/null; then echo "错误: tar 安装失败。" exit 1 @@ -60,6 +75,8 @@ fi if ! command -v pm2 &> /dev/null; then echo "未检测到 PM2,正在全局安装 PM2..." npm install -g pm2 + export PATH="/opt/homebrew/bin:/usr/local/bin:$PATH" + hash -r if ! command -v pm2 &> /dev/null; then echo "错误: PM2 安装失败。请手动运行 'npm install -g pm2'。" exit 1 From 0abdd2afede90938a1b956b656cc2460888ae3b1 Mon Sep 17 00:00:00 2001 From: SkyKingPX Date: Mon, 21 Jul 2025 11:04:51 +0200 Subject: [PATCH 200/338] Update Modloader and Plugin Software --- templates.json | 230 ++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 210 insertions(+), 20 deletions(-) diff --git a/templates.json b/templates.json index 63e26e6..cbfb42b 100644 --- a/templates.json +++ b/templates.json @@ -11,6 +11,44 @@ } ], "packages": [ + { + "language": "en_us", + "description": "[Purpur] Minecraft 1.21.8 Purpur", + "title": "Minecraft 1.21.8", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "55MB", + "remark": "Only Purpur included", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.8-2481.jar", + "author": "purpurmc.org", + "setupInfo": { + "type": "minecraft/java/purpur", + "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.8-2481.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Purpur] Minecraft 1.21.6 Purpur", + "title": "Minecraft 1.21.6", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "55MB", + "remark": "Only Purpur included", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.6-2465.jar", + "author": "purpurmc.org", + "setupInfo": { + "type": "minecraft/java/purpur", + "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.6-2465.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "language": "en_us", "description": "[Purpur] Minecraft 1.21.5 Purpur", @@ -19,11 +57,11 @@ "hardware": "RAM 4G+", "size": "55MB", "remark": "Only Purpur included", - "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.5-2434.jar", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.5-2450.jar", "author": "purpurmc.org", "setupInfo": { "type": "minecraft/java/purpur", - "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.5-2434.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.5-2450.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -220,6 +258,44 @@ "oe": "utf-8" } }, + { + "language": "en_us", + "description": "[Paper] Minecraft 1.21.8 Paper", + "title": "Minecraft 1.21.8", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Paper included", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.8/builds/10/downloads/paper-1.21.8-10.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java/paper", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.8-10.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Paper] Minecraft 1.21.6 Paper", + "title": "Minecraft 1.21.6", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Paper included", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.6/builds/48/downloads/paper-1.21.4-48.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java/paper", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.6-48.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "language": "en_us", "description": "[Paper] Minecraft 1.21.4 Paper", @@ -228,11 +304,11 @@ "hardware": "RAM 4G+", "size": "50MB", "remark": "Only Paper included", - "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/231/downloads/paper-1.21.4-231.jar", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/232/downloads/paper-1.21.4-232.jar", "author": "papermc.io", "setupInfo": { "type": "minecraft/java/paper", - "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.4-231.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.4-232.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -486,6 +562,44 @@ "oe": "utf-8" } }, + { + "language": "en_us", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "title": "NeoForge 1.21.8 (Supports Mods)", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft NeoForge", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.8.4-beta/neoforge-21.8.4-beta-installer.jar", + "author": "neoforged.net", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar neoforge-21.8.4-beta-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "title": "NeoForge 1.21.6 (Supports Mods)", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft NeoForge", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.6.20-beta/neoforge-21.6.20-beta-installer.jar", + "author": "neoforged.net", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar neoforge-21.6.20-beta-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", @@ -494,13 +608,13 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft NeoForge", - "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.5.63-beta/neoforge-21.5.63-beta-installer.jar", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.5.87/neoforge-21.5.87-installer.jar", "author": "neoforged.net", "setupInfo": { "type": "minecraft/java", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar neoforge-21.5.63-beta-installer.jar --installServer", + "updateCommand": "java -jar neoforge-21.5.87-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -513,13 +627,13 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft NeoForge", - "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.4.135/neoforge-21.4.135-installer.jar", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.4.147/neoforge-21.4.147-installer.jar", "author": "neoforged.net", "setupInfo": { "type": "minecraft/java", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar neoforge-21.4.135-installer.jar --installServer", + "updateCommand": "java -jar neoforge-21.4.147-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -532,13 +646,13 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft NeoForge", - "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.1.169/neoforge-21.1.169-installer.jar", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.1.193/neoforge-21.1.193-installer.jar", "author": "neoforged.net", "setupInfo": { "type": "minecraft/java", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar neoforge-21.1.169-installer.jar --installServer", + "updateCommand": "java -jar neoforge-21.1.193-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -551,13 +665,13 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft NeoForge", - "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/20.6.135/neoforge-20.6.135-installer.jar", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/20.6.137/neoforge-20.6.137-installer.jar", "author": "neoforged.net", "setupInfo": { "type": "minecraft/java", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar neoforge-20.6.135-installer.jar --installServer", + "updateCommand": "java -jar neoforge-20.6.137-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -600,6 +714,44 @@ "oe": "utf-8" } }, + { + "language": "en_us", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "title": "Forge 1.21.8 (Supports Mods)", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.8-58.0.0/forge-1.21.8-58.0.0-installer.jar", + "author": "minecraftforge.net", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.21.8-58.0.0-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "title": "Forge 1.21.6 (Supports Mods)", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.6-56.0.9/forge-1.21.6-56.0.9-installer.jar", + "author": "minecraftforge.net", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.21.6-56.0.9-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", @@ -608,13 +760,13 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.5-55.0.9/forge-1.21.5-55.0.9-installer.jar", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.5-55.0.23/forge-1.21.5-55.0.23-installer.jar", "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar forge-1.21.5-55.0.9-installer.jar --installServer", + "updateCommand": "java -jar forge-1.21.5-55.0.23-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -646,13 +798,13 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.1-52.1.0/forge-1.21.1-52.0.53-installer.jar", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.1-52.1.1/forge-1.21.1-52.1.1-installer.jar", "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar forge-1.21.1-52.1.0-installer.jar --installServer", + "updateCommand": "java -jar forge-1.21.1-52.1.1-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -703,13 +855,13 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.1-47.4.0/forge-1.20.1-47.4.0-installer.jar", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.1-47.4.4/forge-1.20.1-47.4.4-installer.jar", "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar forge-1.20.1-47.4.0-installer.jar --installServer", + "updateCommand": "java -jar forge-1.20.1-47.4.4-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -866,6 +1018,44 @@ "oe": "utf-8" } }, + { + "language": "en_us", + "description": "Minecraft 1.21.8 with Fabric Loader", + "title": "Fabric 1.21.8 (Supports Mods)", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "5MB", + "remark": "Minecraft Fabric", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", + "author": "fabricmc.net", + "setupInfo": { + "type": "minecraft/java/fabric", + "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", + "stopCommand": "stop", + "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.21.8 -downloadMinecraft -noprofile", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Minecraft 1.21.6 with Fabric Loader", + "title": "Fabric 1.21.6 (Supports Mods)", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "5MB", + "remark": "Minecraft Fabric", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", + "author": "fabricmc.net", + "setupInfo": { + "type": "minecraft/java/fabric", + "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", + "stopCommand": "stop", + "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.21.6 -downloadMinecraft -noprofile", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "language": "en_us", "description": "Minecraft 1.21.5 with Fabric Loader", @@ -880,7 +1070,7 @@ "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.21.5 -downloadMinecraft -noprofile", + "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.21.5 -downloadMinecraft -noprofile", "ie": "utf-8", "oe": "utf-8" } @@ -899,7 +1089,7 @@ "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.1.jar server -mcversion 1.21.4 -downloadMinecraft -noprofile", + "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.21.4 -downloadMinecraft -noprofile", "ie": "utf-8", "oe": "utf-8" } From 1ad13b29f35cef202dc93a9928f14b7431fde129 Mon Sep 17 00:00:00 2001 From: SkyKingPX Date: Mon, 21 Jul 2025 19:19:53 +0200 Subject: [PATCH 201/338] Update Vanilla Templates --- templates.json | 62 ++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 50 insertions(+), 12 deletions(-) diff --git a/templates.json b/templates.json index cbfb42b..e902033 100644 --- a/templates.json +++ b/templates.json @@ -1303,6 +1303,44 @@ "oe": "utf-8" } }, + { + "language": "en_us", + "description": "[Vanilla] Minecraft 1.21.8", + "title": "Minecraft 1.21.8", + "runtime": "Java 21+", + "hardware": "RAM 2G+", + "size": "55MB", + "remark": "Minecraft Java", + "targetLink": "https://piston-data.mojang.com/v1/objects/6bce4ef400e4efaa63a13d5e6f6b500be969ef81/server.jar", + "author": "Mojang Studios", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Vanilla] Minecraft 1.21.6", + "title": "Minecraft 1.21.6", + "runtime": "Java 21+", + "hardware": "RAM 2G+", + "size": "55MB", + "remark": "Minecraft Java", + "targetLink": "https://piston-data.mojang.com/v1/objects/6e64dcabba3c01a7271b4fa6bd898483b794c59b/server.jar", + "author": "Mojang Studios", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "language": "en_us", "description": "[Vanilla] Minecraft 1.21.5", @@ -1312,7 +1350,7 @@ "size": "55MB", "remark": "Minecraft Java", "targetLink": "https://piston-data.mojang.com/v1/objects/e6ec2f64e6080b9b5d9b471b291c33cc7f509733/server.jar", - "author": "Mojang", + "author": "Mojang Studios", "setupInfo": { "type": "minecraft/java", "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", @@ -1331,7 +1369,7 @@ "size": "55MB", "remark": "Minecraft Java", "targetLink": "https://piston-data.mojang.com/v1/objects/4707d00eb834b446575d89a61a11b5d548d8c001/server.jar", - "author": "Mojang", + "author": "Mojang Studios", "setupInfo": { "type": "minecraft/java", "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", @@ -1350,7 +1388,7 @@ "size": "50MB", "remark": "Minecraft Java", "targetLink": "https://piston-data.mojang.com/v1/objects/59353fb40c36d304f2035d51e7d6e6baa98dc05c/server.jar", - "author": "Mojang", + "author": "Mojang Studios", "setupInfo": { "type": "minecraft/java", "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", @@ -1369,7 +1407,7 @@ "size": "50MB", "remark": "Minecraft Java", "targetLink": "https://piston-data.mojang.com/v1/objects/145ff0858209bcfc164859ba735d4199aafa1eea/server.jar", - "author": "Mojang", + "author": "Mojang Studios", "setupInfo": { "type": "minecraft/java", "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", @@ -1388,7 +1426,7 @@ "size": "50MB", "remark": "Minecraft Java", "targetLink": "https://piston-data.mojang.com/v1/objects/8dd1a28015f51b1803213892b50b7b4fc76e594d/server.jar", - "author": "Mojang", + "author": "Mojang Studios", "setupInfo": { "type": "minecraft/java", "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", @@ -1407,7 +1445,7 @@ "size": "50MB", "remark": "Minecraft Java", "targetLink": "https://piston-data.mojang.com/v1/objects/84194a2f286ef7c14ed7ce0090dba59902951553/server.jar", - "author": "Mojang", + "author": "Mojang Studios", "setupInfo": { "type": "minecraft/java", "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", @@ -1426,7 +1464,7 @@ "size": "50MB", "remark": "Minecraft Java", "targetLink": "https://piston-data.mojang.com/v1/objects/8f3112a1049751cc472ec13e397eade5336ca7ae/server.jar", - "author": "Mojang", + "author": "Mojang Studios", "setupInfo": { "type": "minecraft/java", "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", @@ -1445,7 +1483,7 @@ "size": "45MB", "remark": "Minecraft Java", "targetLink": "https://piston-data.mojang.com/v1/objects/c8f83c5655308435b3dcf03c06d9fe8740a77469/server.jar", - "author": "Mojang", + "author": "Mojang Studios", "setupInfo": { "type": "minecraft/java", "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", @@ -1464,7 +1502,7 @@ "size": "45MB", "remark": "Minecraft Java", "targetLink": "https://piston-data.mojang.com/v1/objects/a16d67e5807f57fc4e550299cf20226194497dc2/server.jar", - "author": "Mojang", + "author": "Mojang Studios", "setupInfo": { "type": "minecraft/java", "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", @@ -1483,7 +1521,7 @@ "size": "45MB", "remark": "Minecraft Java", "targetLink": "https://piston-data.mojang.com/v1/objects/1b557e7b033b583cd9f66746b7a9ab1ec1673ced/server.jar", - "author": "Mojang", + "author": "Mojang Studios", "setupInfo": { "type": "minecraft/java", "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", @@ -1502,7 +1540,7 @@ "size": "30MB", "remark": "Minecraft Java", "targetLink": "https://piston-data.mojang.com/v1/objects/886945bfb2b978778c3a0288fd7fab09d315b25f/server.jar", - "author": "Mojang", + "author": "Mojang Studios", "setupInfo": { "type": "minecraft/java", "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", @@ -1521,7 +1559,7 @@ "size": "10MB", "remark": "Minecraft Java", "targetLink": "https://launcher.mojang.com/v1/objects/b58b2ceb36e01bcd8dbf49c8fb66c55a9f0676cd/server.jar", - "author": "Mojang", + "author": "Mojang Studios", "setupInfo": { "type": "minecraft/java", "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", From 037df45bb1fb6c0542162c641e3b44aa8fc9c274 Mon Sep 17 00:00:00 2001 From: SkyKingPX Date: Fri, 25 Jul 2025 17:37:16 +0200 Subject: [PATCH 202/338] Add Categories --- templates.json | 87 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) diff --git a/templates.json b/templates.json index e902033..788d5de 100644 --- a/templates.json +++ b/templates.json @@ -15,6 +15,7 @@ "language": "en_us", "description": "[Purpur] Minecraft 1.21.8 Purpur", "title": "Minecraft 1.21.8", + "category": "mc-purpur", "runtime": "Java 21+", "hardware": "RAM 4G+", "size": "55MB", @@ -34,6 +35,7 @@ "language": "en_us", "description": "[Purpur] Minecraft 1.21.6 Purpur", "title": "Minecraft 1.21.6", + "category": "mc-purpur", "runtime": "Java 21+", "hardware": "RAM 4G+", "size": "55MB", @@ -53,6 +55,7 @@ "language": "en_us", "description": "[Purpur] Minecraft 1.21.5 Purpur", "title": "Minecraft 1.21.5", + "category": "mc-purpur", "runtime": "Java 21+", "hardware": "RAM 4G+", "size": "55MB", @@ -72,6 +75,7 @@ "language": "en_us", "description": "[Purpur] Minecraft 1.21.4 Purpur", "title": "Minecraft 1.21.4", + "category": "mc-purpur", "runtime": "Java 21+", "hardware": "RAM 4G+", "size": "50MB", @@ -91,6 +95,7 @@ "language": "en_us", "description": "[Purpur] Minecraft 1.21.3 Purpur", "title": "Minecraft 1.21.3", + "category": "mc-purpur", "runtime": "Java 21+", "hardware": "RAM 4G+", "size": "50MB", @@ -110,6 +115,7 @@ "language": "en_us", "description": "[Purpur] Minecraft 1.21.1 Purpur", "title": "Minecraft 1.21.1", + "category": "mc-purpur", "runtime": "Java 21+", "hardware": "RAM 4G+", "size": "50MB", @@ -129,6 +135,7 @@ "language": "en_us", "description": "[Purpur] Minecraft 1.20.6 Purpur", "title": "Minecraft 1.20.6", + "category": "mc-purpur", "runtime": "Java 21+", "hardware": "RAM 4G+", "size": "50MB", @@ -148,6 +155,7 @@ "language": "en_us", "description": "[Purpur] Minecraft 1.20.4 Purpur", "title": "Minecraft 1.20.4", + "category": "mc-purpur", "runtime": "Java 21+", "hardware": "RAM 4G+", "size": "50MB", @@ -167,6 +175,7 @@ "language": "en_us", "description": "[Purpur] Minecraft 1.20.1 Purpur", "title": "Minecraft 1.20.1", + "category": "mc-purpur", "runtime": "Java 17+", "hardware": "RAM 4G+", "size": "50MB", @@ -186,6 +195,7 @@ "language": "en_us", "description": "[Purpur] Minecraft 1.19.2 Purpur", "title": "Minecraft 1.19.2", + "category": "mc-purpur", "runtime": "Java 17+", "hardware": "RAM 4G+", "size": "50MB", @@ -205,6 +215,7 @@ "language": "en_us", "description": "[Purpur] Minecraft 1.18.2 Purpur", "title": "Minecraft 1.18.2", + "category": "mc-purpur", "runtime": "Java 17+", "hardware": "RAM 4G+", "size": "50MB", @@ -224,6 +235,7 @@ "language": "en_us", "description": "[Purpur] Minecraft 1.17.1 Purpur", "title": "Minecraft 1.17.1", + "category": "mc-purpur", "runtime": "Java 16+", "hardware": "RAM 4G+", "size": "50MB", @@ -243,6 +255,7 @@ "language": "en_us", "description": "[Purpur] Minecraft 1.16.5 Purpur", "title": "Minecraft 1.16.5", + "category": "mc-purpur", "runtime": "Java 8+", "hardware": "RAM 4G+", "size": "50MB", @@ -262,6 +275,7 @@ "language": "en_us", "description": "[Paper] Minecraft 1.21.8 Paper", "title": "Minecraft 1.21.8", + "category": "mc-paper", "runtime": "Java 21+", "hardware": "RAM 4G+", "size": "50MB", @@ -281,6 +295,7 @@ "language": "en_us", "description": "[Paper] Minecraft 1.21.6 Paper", "title": "Minecraft 1.21.6", + "category": "mc-paper", "runtime": "Java 21+", "hardware": "RAM 4G+", "size": "50MB", @@ -300,6 +315,7 @@ "language": "en_us", "description": "[Paper] Minecraft 1.21.4 Paper", "title": "Minecraft 1.21.4", + "category": "mc-paper", "runtime": "Java 21+", "hardware": "RAM 4G+", "size": "50MB", @@ -319,6 +335,7 @@ "language": "en_us", "description": "[Paper] Minecraft 1.21.3 Paper", "title": "Minecraft 1.21.3", + "category": "mc-paper", "runtime": "Java 21+", "hardware": "RAM 4G+", "size": "50MB", @@ -338,6 +355,7 @@ "language": "en_us", "description": "[Paper] Minecraft 1.21.1 Paper", "title": "Minecraft 1.21.1", + "category": "mc-paper", "runtime": "Java 21+", "hardware": "RAM 4G+", "size": "50MB", @@ -357,6 +375,7 @@ "language": "en_us", "description": "[Paper] Minecraft 1.20.6 Paper", "title": "Minecraft 1.20.6", + "category": "mc-paper", "runtime": "Java 21+", "hardware": "RAM 4G+", "size": "50MB", @@ -376,6 +395,7 @@ "language": "en_us", "description": "[Paper] Minecraft 1.20.4 Paper", "title": "Minecraft 1.20.4", + "category": "mc-paper", "runtime": "Java 21+", "hardware": "RAM 4G+", "size": "50MB", @@ -395,6 +415,7 @@ "language": "en_us", "description": "[Paper] Minecraft 1.20.2 Paper", "title": "Minecraft 1.20.2", + "category": "mc-paper", "runtime": "Java 17+", "hardware": "RAM 4G+", "size": "150MB", @@ -414,6 +435,7 @@ "language": "en_us", "description": "[Paper] Minecraft 1.20.1 Paper", "title": "Minecraft 1.20.1", + "category": "mc-paper", "runtime": "Java 17+", "hardware": "RAM 4G+", "size": "200MB", @@ -433,6 +455,7 @@ "language": "en_us", "description": "[Paper] Minecraft 1.19.4 Paper", "title": "Minecraft 1.19.4", + "category": "mc-paper", "runtime": "Java 17+", "hardware": "RAM 4G+", "size": "50MB", @@ -452,6 +475,7 @@ "language": "en_us", "description": "[Paper] Minecraft 1.19.2 Paper", "title": "Minecraft 1.19.2", + "category": "mc-paper", "runtime": "Java 17+", "hardware": "RAM 4G+", "size": "50MB", @@ -471,6 +495,7 @@ "language": "en_us", "description": "[Paper] Minecraft 1.18.2 Paper", "title": "Minecraft 1.18.2", + "category": "mc-paper", "runtime": "Java 17+", "hardware": "RAM 4G+", "size": "50MB", @@ -490,6 +515,7 @@ "language": "en_us", "description": "[Paper] Minecraft 1.17.1 Paper", "title": "Minecraft 1.17.1", + "category": "mc-paper", "runtime": "Java 16+", "hardware": "RAM 4G+", "size": "60MB", @@ -509,6 +535,7 @@ "language": "en_us", "description": "[Paper] Minecraft 1.16.5 Paper", "title": "Minecraft 1.16.5", + "category": "mc-paper", "runtime": "Java 8+", "hardware": "RAM 4G+", "size": "50MB", @@ -528,6 +555,7 @@ "language": "en_us", "description": "[Paper] Minecraft 1.12.2 Paper", "title": "Minecraft 1.12.2", + "category": "mc-paper", "runtime": "Java 8+", "hardware": "RAM 4G+", "size": "50MB", @@ -547,6 +575,7 @@ "language": "en_us", "description": "[Paper] Minecraft 1.8.8 Paper", "title": "Minecraft 1.8.8", + "category": "mc-paper", "runtime": "Java 7+", "hardware": "RAM 4G+", "size": "20MB", @@ -566,6 +595,7 @@ "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "NeoForge 1.21.8 (Supports Mods)", + "category": "mc-neoforge", "runtime": "Java 21+", "hardware": "RAM 8G+", "size": "7MB", @@ -585,6 +615,7 @@ "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "NeoForge 1.21.6 (Supports Mods)", + "category": "mc-neoforge", "runtime": "Java 21+", "hardware": "RAM 8G+", "size": "7MB", @@ -604,6 +635,7 @@ "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "NeoForge 1.21.5 (Supports Mods)", + "category": "mc-neoforge", "runtime": "Java 21+", "hardware": "RAM 8G+", "size": "7MB", @@ -623,6 +655,7 @@ "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "NeoForge 1.21.4 (Supports Mods)", + "category": "mc-neoforge", "runtime": "Java 21+", "hardware": "RAM 8G+", "size": "7MB", @@ -642,6 +675,7 @@ "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "NeoForge 1.21.1 (Supports Mods)", + "category": "mc-neoforge", "runtime": "Java 21+", "hardware": "RAM 8G+", "size": "7MB", @@ -661,6 +695,7 @@ "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "NeoForge 1.20.6 (Supports Mods)", + "category": "mc-neoforge", "runtime": "Java 21+", "hardware": "RAM 8G+", "size": "7MB", @@ -680,6 +715,7 @@ "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "NeoForge 1.20.4 (Supports Mods)", + "category": "mc-neoforge", "runtime": "Java 21+", "hardware": "RAM 8G+", "size": "7MB", @@ -699,6 +735,7 @@ "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "NeoForge 1.20.2 (Supports Mods)", + "category": "mc-neoforge", "runtime": "Java 21+", "hardware": "RAM 8G+", "size": "7MB", @@ -718,6 +755,7 @@ "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "Forge 1.21.8 (Supports Mods)", + "category": "mc-forge", "runtime": "Java 21+", "hardware": "RAM 8G+", "size": "7MB", @@ -737,6 +775,7 @@ "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "Forge 1.21.6 (Supports Mods)", + "category": "mc-forge", "runtime": "Java 21+", "hardware": "RAM 8G+", "size": "7MB", @@ -756,6 +795,7 @@ "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "Forge 1.21.5 (Supports Mods)", + "category": "mc-forge", "runtime": "Java 21+", "hardware": "RAM 8G+", "size": "7MB", @@ -775,6 +815,7 @@ "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "Forge 1.21.4 (Supports Mods)", + "category": "mc-forge", "runtime": "Java 21+", "hardware": "RAM 8G+", "size": "7MB", @@ -794,6 +835,7 @@ "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "Forge 1.21.1 (Supports Mods)", + "category": "mc-forge", "runtime": "Java 21+", "hardware": "RAM 8G+", "size": "7MB", @@ -813,6 +855,7 @@ "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "Forge 1.20.6 (Supports Mods)", + "category": "mc-forge", "runtime": "Java 21+", "hardware": "RAM 8G+", "size": "7MB", @@ -832,6 +875,7 @@ "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "Forge 1.20.4 (Supports Mods)", + "category": "mc-forge", "runtime": "Java 21+", "hardware": "RAM 8G+", "size": "7MB", @@ -851,6 +895,7 @@ "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "Forge 1.20.1 (Supports Mods)", + "category": "mc-forge", "runtime": "Java 17+", "hardware": "RAM 8G+", "size": "7MB", @@ -870,6 +915,7 @@ "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "Forge 1.19.4 (Supports Mods)", + "category": "mc-forge", "runtime": "Java 17+", "hardware": "RAM 8G+", "size": "7MB", @@ -889,6 +935,7 @@ "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "Forge 1.19.2 (Supports Mods)", + "category": "mc-forge", "runtime": "Java 17+", "hardware": "RAM 8G+", "size": "7MB", @@ -908,6 +955,7 @@ "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "Forge 1.18.2 (Supports Mods)", + "category": "mc-forge", "runtime": "Java 17+", "hardware": "RAM 8G+", "size": "7MB", @@ -927,6 +975,7 @@ "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "Forge 1.17.1 (Supports Mods)", + "category": "mc-forge", "runtime": "Java 16+", "hardware": "RAM 8G+", "size": "7MB", @@ -946,6 +995,7 @@ "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "Forge 1.16.5 (Supports Mods)", + "category": "mc-forge", "runtime": "Java 8+", "hardware": "RAM 8G+", "size": "7MB", @@ -965,6 +1015,7 @@ "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "Forge 1.12.2 (Supports Mods)", + "category": "mc-forge", "runtime": "Java 8+", "hardware": "RAM 8G+", "size": "5MB", @@ -984,6 +1035,7 @@ "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "Forge 1.8.9 (Supports Mods)", + "category": "mc-forge", "runtime": "Java 7+", "hardware": "RAM 8G+", "size": "5MB", @@ -1003,6 +1055,7 @@ "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "Forge 1.7.10 (Supports Mods)", + "category": "mc-forge", "runtime": "Java 7+", "hardware": "RAM 8G+", "size": "5MB", @@ -1022,6 +1075,7 @@ "language": "en_us", "description": "Minecraft 1.21.8 with Fabric Loader", "title": "Fabric 1.21.8 (Supports Mods)", + "category": "mc-fabric", "runtime": "Java 21+", "hardware": "RAM 4G+", "size": "5MB", @@ -1041,6 +1095,7 @@ "language": "en_us", "description": "Minecraft 1.21.6 with Fabric Loader", "title": "Fabric 1.21.6 (Supports Mods)", + "category": "mc-fabric", "runtime": "Java 21+", "hardware": "RAM 4G+", "size": "5MB", @@ -1060,6 +1115,7 @@ "language": "en_us", "description": "Minecraft 1.21.5 with Fabric Loader", "title": "Fabric 1.21.5 (Supports Mods)", + "category": "mc-fabric", "runtime": "Java 21+", "hardware": "RAM 4G+", "size": "5MB", @@ -1079,6 +1135,7 @@ "language": "en_us", "description": "Minecraft 1.21.4 with Fabric Loader", "title": "Fabric 1.21.4 (Supports Mods)", + "category": "mc-fabric", "runtime": "Java 21+", "hardware": "RAM 4G+", "size": "5MB", @@ -1098,6 +1155,7 @@ "language": "en_us", "description": "Minecraft 1.21.1 with Fabric Loader", "title": "Fabric 1.21.1 (Supports Mods)", + "category": "mc-fabric", "runtime": "Java 21+", "hardware": "RAM 4G+", "size": "5MB", @@ -1117,6 +1175,7 @@ "language": "en_us", "description": "Minecraft 1.20.6 with Fabric Loader", "title": "Fabric 1.20.6 (Supports Mods)", + "category": "mc-fabric", "runtime": "Java 21+", "hardware": "RAM 4G+", "size": "5MB", @@ -1136,6 +1195,7 @@ "language": "en_us", "description": "Minecraft 1.20.4 with Fabric Loader", "title": "Fabric 1.20.4 (Supports Mods)", + "category": "mc-fabric", "runtime": "Java 21+", "hardware": "RAM 4G+", "size": "5MB", @@ -1155,6 +1215,7 @@ "language": "en_us", "description": "Minecraft 1.20.1 with Fabric Loader", "title": "Fabric 1.20.1 (Supports Mods)", + "category": "mc-fabric", "runtime": "Java 17+", "hardware": "RAM 4G+", "size": "5MB", @@ -1174,6 +1235,7 @@ "language": "en_us", "description": "Minecraft 1.19.4 with Fabric Loader", "title": "Fabric 1.19.4 (Supports Mods)", + "category": "mc-fabric", "runtime": "Java 17+", "hardware": "RAM 4G+", "size": "5MB", @@ -1193,6 +1255,7 @@ "language": "en_us", "description": "Minecraft 1.19.2 with Fabric Loader", "title": "Fabric 1.19.2 (Supports Mods)", + "category": "mc-fabric", "runtime": "Java 17+", "hardware": "RAM 4G+", "size": "5MB", @@ -1212,6 +1275,7 @@ "language": "en_us", "description": "Minecraft 1.18.2 with Fabric Loader", "title": "Fabric 1.18.2 (Supports Mods)", + "category": "mc-fabric", "runtime": "Java 17+", "hardware": "RAM 4G+", "size": "5MB", @@ -1231,6 +1295,7 @@ "language": "en_us", "description": "Minecraft 1.17.1 with Fabric Loader", "title": "Fabric 1.17.1 (Supports Mods)", + "category": "mc-fabric", "runtime": "Java 16+", "hardware": "RAM 4G+", "size": "5MB", @@ -1250,6 +1315,7 @@ "language": "en_us", "description": "Minecraft 1.16.5 with Fabric Loader", "title": "Fabric 1.16.5 (Supports Mods)", + "category": "mc-fabric", "runtime": "Java 8+", "hardware": "RAM 4G+", "size": "5MB", @@ -1269,6 +1335,7 @@ "language": "en_us", "description": "Minecraft 1.15.2 with Fabric Loader", "title": "Fabric 1.15.2 (Supports Mods)", + "category": "mc-fabric", "runtime": "Java 8+", "hardware": "RAM 4G+", "size": "5MB", @@ -1288,6 +1355,7 @@ "language": "en_us", "description": "Minecraft 1.14.4 with Fabric Loader", "title": "Fabric 1.14.4 (Supports Mods)", + "category": "mc-fabric", "runtime": "Java 8+", "hardware": "RAM 4G+", "size": "5MB", @@ -1307,6 +1375,7 @@ "language": "en_us", "description": "[Vanilla] Minecraft 1.21.8", "title": "Minecraft 1.21.8", + "category": "mc-vanilla", "runtime": "Java 21+", "hardware": "RAM 2G+", "size": "55MB", @@ -1326,6 +1395,7 @@ "language": "en_us", "description": "[Vanilla] Minecraft 1.21.6", "title": "Minecraft 1.21.6", + "category": "mc-vanilla", "runtime": "Java 21+", "hardware": "RAM 2G+", "size": "55MB", @@ -1345,6 +1415,7 @@ "language": "en_us", "description": "[Vanilla] Minecraft 1.21.5", "title": "Minecraft 1.21.5", + "category": "mc-vanilla", "runtime": "Java 21+", "hardware": "RAM 2G+", "size": "55MB", @@ -1364,6 +1435,7 @@ "language": "en_us", "description": "[Vanilla] Minecraft 1.21.4", "title": "Minecraft 1.21.4", + "category": "mc-vanilla", "runtime": "Java 21+", "hardware": "RAM 2G+", "size": "55MB", @@ -1383,6 +1455,7 @@ "language": "en_us", "description": "[Vanilla] Minecraft 1.21.1", "title": "Minecraft 1.21.1", + "category": "mc-vanilla", "runtime": "Java 21+", "hardware": "RAM 2G+", "size": "50MB", @@ -1402,6 +1475,7 @@ "language": "en_us", "description": "[Vanilla] Minecraft 1.20.6", "title": "Minecraft 1.20.6", + "category": "mc-vanilla", "runtime": "Java 21+", "hardware": "RAM 2G+", "size": "50MB", @@ -1421,6 +1495,7 @@ "language": "en_us", "description": "[Vanilla] Minecraft 1.20.4", "title": "Minecraft 1.20.4", + "category": "mc-vanilla", "runtime": "Java 21+", "hardware": "RAM 2G+", "size": "50MB", @@ -1440,6 +1515,7 @@ "language": "en_us", "description": "[Vanilla] Minecraft 1.20.1", "title": "Minecraft 1.20.1", + "category": "mc-vanilla", "runtime": "Java 17+", "hardware": "RAM 2G+", "size": "50MB", @@ -1459,6 +1535,7 @@ "language": "en_us", "description": "[Vanilla] Minecraft 1.19.4", "title": "Minecraft 1.19.4", + "category": "mc-vanilla", "runtime": "Java 17+", "hardware": "RAM 2G+", "size": "50MB", @@ -1478,6 +1555,7 @@ "language": "en_us", "description": "[Vanilla] Minecraft 1.18.2", "title": "Minecraft 1.18.2", + "category": "mc-vanilla", "runtime": "Java 17+", "hardware": "RAM 2G+", "size": "45MB", @@ -1497,6 +1575,7 @@ "language": "en_us", "description": "[Vanilla] Minecraft 1.17.1", "title": "Minecraft 1.17.1", + "category": "mc-vanilla", "runtime": "Java 16+", "hardware": "RAM 2G+", "size": "45MB", @@ -1516,6 +1595,7 @@ "language": "en_us", "description": "[Vanilla] Minecraft 1.16.5", "title": "Minecraft 1.16.5", + "category": "mc-vanilla", "runtime": "Java 8+", "hardware": "RAM 2G+", "size": "45MB", @@ -1535,6 +1615,7 @@ "language": "en_us", "description": "[Vanilla] Minecraft 1.12.2", "title": "Minecraft 1.12.2", + "category": "mc-vanilla", "runtime": "Java 8+", "hardware": "RAM 2G+", "size": "30MB", @@ -1554,6 +1635,7 @@ "language": "en_us", "description": "[Vanilla] Minecraft 1.8.9", "title": "Minecraft 1.8.9", + "category": "mc-vanilla", "runtime": "Java 7+", "hardware": "RAM 2G+", "size": "10MB", @@ -1573,6 +1655,7 @@ "language": "zh_cn", "description": "[Paper] Minecraft 1.21.1 快速开服", "title": "Minecraft 1.20.1", + "category": "mc-paper", "runtime": "Java 17+", "hardware": "RAM 4G+", "size": "250MB", @@ -1592,6 +1675,7 @@ "language": "zh_cn", "description": "[Paper] 中小型互通服推荐,1.20.4 版本,快速开服,包含ESS、锁箱子、操作回滚、领地商店等基础插件。", "title": "Minecraft 1.20.4 (低配机器推荐)", + "category": "mc-paper", "runtime": "Java 21+", "hardware": "RAM 6G+", "size": "140MB", @@ -1611,6 +1695,7 @@ "language": "zh_cn", "description": "注意:默认的启动命令是 \"sh ./run.sh\",如果需要在 Windows 上运行,请在安装后将命令修改为 \"start.bat\"", "title": "Forge 1.20.1 Java 版 (支持模组)", + "category": "mc-forge", "runtime": "Java 17+", "hardware": "RAM 8G+", "size": "7MB", @@ -1630,6 +1715,7 @@ "language": "zh_cn", "description": "注意:默认的启动命令是 \"sh ./run.sh\",如果需要在 Windows 上运行,请在安装后将命令修改为 \"start.bat\"", "title": "Forge 1.20.6 Java 版 (支持模组)", + "category": "mc-forge", "runtime": "Java 21+", "hardware": "RAM 8G+", "size": "7MB", @@ -1649,6 +1735,7 @@ "language": "zh_cn", "description": "注意:默认的启动命令是 \"sh ./run.sh\",如果需要在 Windows 上运行,请在安装后将命令修改为 \"start.bat\"", "title": "Forge 1.19.2 Java 版 (支持模组)", + "category": "mc-forge", "runtime": "Java 17+", "hardware": "RAM 8G+", "size": "7MB", From e708ab20127e5fd4b59404be6b86db9a9702230e Mon Sep 17 00:00:00 2001 From: yumao233 Date: Mon, 28 Jul 2025 14:38:36 +0800 Subject: [PATCH 203/338] feat: new test file --- templates-test.json | 1898 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1898 insertions(+) create mode 100644 templates-test.json diff --git a/templates-test.json b/templates-test.json new file mode 100644 index 0000000..5d90dc4 --- /dev/null +++ b/templates-test.json @@ -0,0 +1,1898 @@ +{ + "name": "MCSManager Game Server Template Marketplace", + "languages": [ + { + "label": "English", + "value": "en_us" + }, + { + "label": "简体中文", + "value": "zh_cn" + } + ], + "games": [ + { + "label": "Minecraft", + "value": "minecraft", + "language": "" + }, + { + "label": "幻兽帕鲁", + "value": "palworld", + "language": "zh_cn" + } + ], + "packages": [ + { + "language": "en_us", + "description": "[Purpur] Minecraft 1.21.8 Purpur", + "gameType": "minecraft", + "title": "Minecraft 1.21.8", + "category": "mc-purpur", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "55MB", + "remark": "Only Purpur included", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.8-2481.jar", + "author": "purpurmc.org", + "setupInfo": { + "type": "minecraft/java/purpur", + "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.8-2481.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Purpur] Minecraft 1.21.6 Purpur", + "gameType": "minecraft", + "title": "Minecraft 1.21.6", + "category": "mc-purpur", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "55MB", + "remark": "Only Purpur included", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.6-2465.jar", + "author": "purpurmc.org", + "setupInfo": { + "type": "minecraft/java/purpur", + "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.6-2465.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Purpur] Minecraft 1.21.5 Purpur", + "gameType": "minecraft", + "title": "Minecraft 1.21.5", + "category": "mc-purpur", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "55MB", + "remark": "Only Purpur included", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.5-2450.jar", + "author": "purpurmc.org", + "setupInfo": { + "type": "minecraft/java/purpur", + "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.5-2450.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Purpur] Minecraft 1.21.4 Purpur", + "gameType": "minecraft", + "title": "Minecraft 1.21.4", + "category": "mc-purpur", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Purpur included", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.4-2416.jar", + "author": "purpurmc.org", + "setupInfo": { + "type": "minecraft/java/purpur", + "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.4-2416.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Purpur] Minecraft 1.21.3 Purpur", + "gameType": "minecraft", + "title": "Minecraft 1.21.3", + "category": "mc-purpur", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Purpur included", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.3-2358.jar", + "author": "purpurmc.org", + "setupInfo": { + "type": "minecraft/java/purpur", + "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.3-2358.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Purpur] Minecraft 1.21.1 Purpur", + "gameType": "minecraft", + "title": "Minecraft 1.21.1", + "category": "mc-purpur", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Purpur included", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.1-2329.jar", + "author": "purpurmc.org", + "setupInfo": { + "type": "minecraft/java/purpur", + "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.1-2329.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Purpur] Minecraft 1.20.6 Purpur", + "gameType": "minecraft", + "title": "Minecraft 1.20.6", + "category": "mc-purpur", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Purpur included", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.20.6-2233.jar", + "author": "purpurmc.org", + "setupInfo": { + "type": "minecraft/java/purpur", + "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.20.6-2233.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Purpur] Minecraft 1.20.4 Purpur", + "gameType": "minecraft", + "title": "Minecraft 1.20.4", + "category": "mc-purpur", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Purpur included", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.20.4-2176.jar", + "author": "purpurmc.org", + "setupInfo": { + "type": "minecraft/java/purpur", + "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.20.4-2176.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Purpur] Minecraft 1.20.1 Purpur", + "gameType": "minecraft", + "title": "Minecraft 1.20.1", + "category": "mc-purpur", + "runtime": "Java 17+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Purpur included", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.20.1-2062.jar", + "author": "purpurmc.org", + "setupInfo": { + "type": "minecraft/java/purpur", + "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.20.1-2062.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Purpur] Minecraft 1.19.2 Purpur", + "gameType": "minecraft", + "title": "Minecraft 1.19.2", + "category": "mc-purpur", + "runtime": "Java 17+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Purpur included", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.19.2-1858.jar", + "author": "purpurmc.org", + "setupInfo": { + "type": "minecraft/java/purpur", + "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.19.2-1858.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Purpur] Minecraft 1.18.2 Purpur", + "gameType": "minecraft", + "title": "Minecraft 1.18.2", + "category": "mc-purpur", + "runtime": "Java 17+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Purpur included", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.18.2-1632.jar", + "author": "purpurmc.org", + "setupInfo": { + "type": "minecraft/java/purpur", + "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.18.2-1632.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Purpur] Minecraft 1.17.1 Purpur", + "gameType": "minecraft", + "title": "Minecraft 1.17.1", + "category": "mc-purpur", + "runtime": "Java 16+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Purpur included", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.17.1-1428.jar", + "author": "purpurmc.org", + "setupInfo": { + "type": "minecraft/java/purpur", + "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.17.1-1428.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Purpur] Minecraft 1.16.5 Purpur", + "gameType": "minecraft", + "title": "Minecraft 1.16.5", + "category": "mc-purpur", + "runtime": "Java 8+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Purpur included", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.16.5-1171.jar", + "author": "purpurmc.org", + "setupInfo": { + "type": "minecraft/java/purpur", + "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.16.5-1171.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Paper] Minecraft 1.21.8 Paper", + "gameType": "minecraft", + "title": "Minecraft 1.21.8", + "category": "mc-paper", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Paper included", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.8/builds/10/downloads/paper-1.21.8-10.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java/paper", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.8-10.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Paper] Minecraft 1.21.6 Paper", + "gameType": "minecraft", + "title": "Minecraft 1.21.6", + "category": "mc-paper", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Paper included", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.6/builds/48/downloads/paper-1.21.4-48.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java/paper", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.6-48.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Paper] Minecraft 1.21.4 Paper", + "gameType": "minecraft", + "title": "Minecraft 1.21.4", + "category": "mc-paper", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Paper included", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/232/downloads/paper-1.21.4-232.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java/paper", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.4-232.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Paper] Minecraft 1.21.3 Paper", + "gameType": "minecraft", + "title": "Minecraft 1.21.3", + "category": "mc-paper", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Paper included", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.3/builds/82/downloads/paper-1.21.3-82.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java/paper", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.3-82.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Paper] Minecraft 1.21.1 Paper", + "gameType": "minecraft", + "title": "Minecraft 1.21.1", + "category": "mc-paper", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Paper included", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.1/builds/132/downloads/paper-1.21.1-132.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java/paper", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.1-132.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Paper] Minecraft 1.20.6 Paper", + "gameType": "minecraft", + "title": "Minecraft 1.20.6", + "category": "mc-paper", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Paper included", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.20.6/builds/151/downloads/paper-1.20.6-151.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java/paper", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.20.6-151.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Paper] Minecraft 1.20.4 Paper", + "gameType": "minecraft", + "title": "Minecraft 1.20.4", + "category": "mc-paper", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Paper included", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.20.4/builds/499/downloads/paper-1.20.4-499.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java/paper", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.20.4-499.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Paper] Minecraft 1.20.2 Paper", + "gameType": "minecraft", + "title": "Minecraft 1.20.2", + "category": "mc-paper", + "runtime": "Java 17+", + "hardware": "RAM 4G+", + "size": "150MB", + "remark": "Includes some basic plugins", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.20.2/builds/318/downloads/paper-1.20.2-318.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java/paper", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.20.2-318.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Paper] Minecraft 1.20.1 Paper", + "gameType": "minecraft", + "title": "Minecraft 1.20.1", + "category": "mc-paper", + "runtime": "Java 17+", + "hardware": "RAM 4G+", + "size": "200MB", + "remark": "Includes some basic plugins", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.20.1/builds/196/downloads/paper-1.20.1-196.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java/paper", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.20.1-196.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Paper] Minecraft 1.19.4 Paper", + "gameType": "minecraft", + "title": "Minecraft 1.19.4", + "category": "mc-paper", + "runtime": "Java 17+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Paper included", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.19.4/builds/550/downloads/paper-1.19.4-550.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java/paper", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.19.4-550.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Paper] Minecraft 1.19.2 Paper", + "gameType": "minecraft", + "title": "Minecraft 1.19.2", + "category": "mc-paper", + "runtime": "Java 17+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Paper included", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.19.2/builds/307/downloads/paper-1.19.2-307.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java/paper", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.19.2-307.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Paper] Minecraft 1.18.2 Paper", + "gameType": "minecraft", + "title": "Minecraft 1.18.2", + "category": "mc-paper", + "runtime": "Java 17+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Paper included", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.18.2/builds/388/downloads/paper-1.18.2-388.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.18.2-388.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Paper] Minecraft 1.17.1 Paper", + "gameType": "minecraft", + "title": "Minecraft 1.17.1", + "category": "mc-paper", + "runtime": "Java 16+", + "hardware": "RAM 4G+", + "size": "60MB", + "remark": "Only Paper included", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.17.1/builds/411/downloads/paper-1.17.1-411.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java/paper", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.17.1-411.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Paper] Minecraft 1.16.5 Paper", + "gameType": "minecraft", + "title": "Minecraft 1.16.5", + "category": "mc-paper", + "runtime": "Java 8+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Paper included", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.16.5/builds/794/downloads/paper-1.16.5-794.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java/paper", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.16.5-794.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Paper] Minecraft 1.12.2 Paper", + "gameType": "minecraft", + "title": "Minecraft 1.12.2", + "category": "mc-paper", + "runtime": "Java 8+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Paper included", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.12.2/builds/1620/downloads/paper-1.12.2-1620.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java/paper", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.12.2-1620.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Paper] Minecraft 1.8.8 Paper", + "gameType": "minecraft", + "title": "Minecraft 1.8.8", + "category": "mc-paper", + "runtime": "Java 7+", + "hardware": "RAM 4G+", + "size": "20MB", + "remark": "Only Paper included", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.8.8/builds/445/downloads/paper-1.8.8-445.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java/paper", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.8.8-445.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "gameType": "minecraft", + "title": "NeoForge 1.21.8 (Supports Mods)", + "category": "mc-neoforge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft NeoForge", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.8.4-beta/neoforge-21.8.4-beta-installer.jar", + "author": "neoforged.net", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar neoforge-21.8.4-beta-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "gameType": "minecraft", + "title": "NeoForge 1.21.6 (Supports Mods)", + "category": "mc-neoforge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft NeoForge", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.6.20-beta/neoforge-21.6.20-beta-installer.jar", + "author": "neoforged.net", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar neoforge-21.6.20-beta-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "gameType": "minecraft", + "title": "NeoForge 1.21.5 (Supports Mods)", + "category": "mc-neoforge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft NeoForge", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.5.87/neoforge-21.5.87-installer.jar", + "author": "neoforged.net", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar neoforge-21.5.87-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "gameType": "minecraft", + "title": "NeoForge 1.21.4 (Supports Mods)", + "category": "mc-neoforge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft NeoForge", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.4.147/neoforge-21.4.147-installer.jar", + "author": "neoforged.net", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar neoforge-21.4.147-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "gameType": "minecraft", + "title": "NeoForge 1.21.1 (Supports Mods)", + "category": "mc-neoforge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft NeoForge", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.1.193/neoforge-21.1.193-installer.jar", + "author": "neoforged.net", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar neoforge-21.1.193-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "gameType": "minecraft", + "title": "NeoForge 1.20.6 (Supports Mods)", + "category": "mc-neoforge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft NeoForge", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/20.6.137/neoforge-20.6.137-installer.jar", + "author": "neoforged.net", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar neoforge-20.6.137-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "gameType": "minecraft", + "title": "NeoForge 1.20.4 (Supports Mods)", + "category": "mc-neoforge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft NeoForge", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/20.4.248/neoforge-20.4.248-installer.jar", + "author": "neoforged.net", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar neoforge-20.4.248-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "gameType": "minecraft", + "title": "NeoForge 1.20.2 (Supports Mods)", + "category": "mc-neoforge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft NeoForge", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/20.2.93/neoforge-20.2.93-installer.jar", + "author": "neoforged.net", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar neoforge-20.2.93-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "gameType": "minecraft", + "title": "Forge 1.21.8 (Supports Mods)", + "category": "mc-forge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.8-58.0.0/forge-1.21.8-58.0.0-installer.jar", + "author": "minecraftforge.net", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.21.8-58.0.0-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "gameType": "minecraft", + "title": "Forge 1.21.6 (Supports Mods)", + "category": "mc-forge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.6-56.0.9/forge-1.21.6-56.0.9-installer.jar", + "author": "minecraftforge.net", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.21.6-56.0.9-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "gameType": "minecraft", + "title": "Forge 1.21.5 (Supports Mods)", + "category": "mc-forge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.5-55.0.23/forge-1.21.5-55.0.23-installer.jar", + "author": "minecraftforge.net", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.21.5-55.0.23-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "gameType": "minecraft", + "title": "Forge 1.21.4 (Supports Mods)", + "category": "mc-forge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.4-54.1.3/forge-1.21.4-54.1.3-installer.jar", + "author": "minecraftforge.net", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.21.4-54.1.3-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "gameType": "minecraft", + "title": "Forge 1.21.1 (Supports Mods)", + "category": "mc-forge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.1-52.1.1/forge-1.21.1-52.1.1-installer.jar", + "author": "minecraftforge.net", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.21.1-52.1.1-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "gameType": "minecraft", + "title": "Forge 1.20.6 (Supports Mods)", + "category": "mc-forge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.6-50.2.0/forge-1.20.6-50.2.0-installer.jar", + "author": "minecraftforge.net", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.20.6-50.2.0-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "gameType": "minecraft", + "title": "Forge 1.20.4 (Supports Mods)", + "category": "mc-forge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.4-49.2.0/forge-1.20.4-49.2.0-installer.jar", + "author": "minecraftforge.net", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.20.4-49.2.0-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "gameType": "minecraft", + "title": "Forge 1.20.1 (Supports Mods)", + "category": "mc-forge", + "runtime": "Java 17+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.1-47.4.4/forge-1.20.1-47.4.4-installer.jar", + "author": "minecraftforge.net", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.20.1-47.4.4-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "gameType": "minecraft", + "title": "Forge 1.19.4 (Supports Mods)", + "category": "mc-forge", + "runtime": "Java 17+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.19.4-45.4.0/forge-1.19.4-45.4.0-installer.jar", + "author": "minecraftforge.net", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.19.4-45.4.0-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "gameType": "minecraft", + "title": "Forge 1.19.2 (Supports Mods)", + "category": "mc-forge", + "runtime": "Java 17+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.19.2-43.5.0/forge-1.19.2-43.5.0-installer.jar", + "author": "minecraftforge.net", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.19.2-43.5.0-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "gameType": "minecraft", + "title": "Forge 1.18.2 (Supports Mods)", + "category": "mc-forge", + "runtime": "Java 17+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.18.2-40.3.9/forge-1.18.2-40.3.9-installer.jar", + "author": "minecraftforge.net", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.18.2-40.3.9-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "gameType": "minecraft", + "title": "Forge 1.17.1 (Supports Mods)", + "category": "mc-forge", + "runtime": "Java 16+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.17.1-37.1.1/forge-1.17.1-37.1.1-installer.jar", + "author": "minecraftforge.net", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.17.1-37.1.1-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "gameType": "minecraft", + "title": "Forge 1.16.5 (Supports Mods)", + "category": "mc-forge", + "runtime": "Java 8+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.16.5-36.2.42/forge-1.16.5-36.2.42-installer.jar", + "author": "minecraftforge.net", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.16.5-36.2.42-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "gameType": "minecraft", + "title": "Forge 1.12.2 (Supports Mods)", + "category": "mc-forge", + "runtime": "Java 8+", + "hardware": "RAM 8G+", + "size": "5MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.12.2-14.23.5.2860/forge-1.12.2-14.23.5.2860-installer.jar", + "author": "minecraftforge.net", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.12.2-14.23.5.2860-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "gameType": "minecraft", + "title": "Forge 1.8.9 (Supports Mods)", + "category": "mc-forge", + "runtime": "Java 7+", + "hardware": "RAM 8G+", + "size": "5MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.8.9-11.15.1.2318-1.8.9/forge-1.8.9-11.15.1.2318-1.8.9-installer.jar", + "author": "minecraftforge.net", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.8.9-11.15.1.2318-1.8.9-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "gameType": "minecraft", + "title": "Forge 1.7.10 (Supports Mods)", + "category": "mc-forge", + "runtime": "Java 7+", + "hardware": "RAM 8G+", + "size": "5MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.7.10-10.13.4.1614-1.7.10/forge-1.7.10-10.13.4.1614-1.7.10-installer.jar", + "author": "minecraftforge.net", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.7.10-10.13.4.1614-1.7.10-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Minecraft 1.21.8 with Fabric Loader", + "gameType": "minecraft", + "title": "Fabric 1.21.8 (Supports Mods)", + "category": "mc-fabric", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "5MB", + "remark": "Minecraft Fabric", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", + "author": "fabricmc.net", + "setupInfo": { + "type": "minecraft/java/fabric", + "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", + "stopCommand": "stop", + "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.21.8 -downloadMinecraft -noprofile", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Minecraft 1.21.6 with Fabric Loader", + "gameType": "minecraft", + "title": "Fabric 1.21.6 (Supports Mods)", + "category": "mc-fabric", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "5MB", + "remark": "Minecraft Fabric", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", + "author": "fabricmc.net", + "setupInfo": { + "type": "minecraft/java/fabric", + "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", + "stopCommand": "stop", + "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.21.6 -downloadMinecraft -noprofile", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Minecraft 1.21.5 with Fabric Loader", + "gameType": "minecraft", + "title": "Fabric 1.21.5 (Supports Mods)", + "category": "mc-fabric", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "5MB", + "remark": "Minecraft Fabric", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", + "author": "fabricmc.net", + "setupInfo": { + "type": "minecraft/java/fabric", + "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", + "stopCommand": "stop", + "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.21.5 -downloadMinecraft -noprofile", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Minecraft 1.21.4 with Fabric Loader", + "gameType": "minecraft", + "title": "Fabric 1.21.4 (Supports Mods)", + "category": "mc-fabric", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "5MB", + "remark": "Minecraft Fabric", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", + "author": "fabricmc.net", + "setupInfo": { + "type": "minecraft/java/fabric", + "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", + "stopCommand": "stop", + "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.21.4 -downloadMinecraft -noprofile", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Minecraft 1.21.1 with Fabric Loader", + "gameType": "minecraft", + "title": "Fabric 1.21.1 (Supports Mods)", + "category": "mc-fabric", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "5MB", + "remark": "Minecraft Fabric", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", + "author": "fabricmc.net", + "setupInfo": { + "type": "minecraft/java/fabric", + "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", + "stopCommand": "stop", + "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.21.1 -downloadMinecraft -noprofile", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Minecraft 1.20.6 with Fabric Loader", + "gameType": "minecraft", + "title": "Fabric 1.20.6 (Supports Mods)", + "category": "mc-fabric", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "5MB", + "remark": "Minecraft Fabric", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", + "author": "fabricmc.net", + "setupInfo": { + "type": "minecraft/java/fabric", + "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", + "stopCommand": "stop", + "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.20.6 -downloadMinecraft -noprofile", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Minecraft 1.20.4 with Fabric Loader", + "gameType": "minecraft", + "title": "Fabric 1.20.4 (Supports Mods)", + "category": "mc-fabric", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "5MB", + "remark": "Minecraft Fabric", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", + "author": "fabricmc.net", + "setupInfo": { + "type": "minecraft/java/fabric", + "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", + "stopCommand": "stop", + "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.20.4 -downloadMinecraft -noprofile", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Minecraft 1.20.1 with Fabric Loader", + "gameType": "minecraft", + "title": "Fabric 1.20.1 (Supports Mods)", + "category": "mc-fabric", + "runtime": "Java 17+", + "hardware": "RAM 4G+", + "size": "5MB", + "remark": "Minecraft Fabric", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", + "author": "fabricmc.net", + "setupInfo": { + "type": "minecraft/java/fabric", + "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", + "stopCommand": "stop", + "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.20.1 -downloadMinecraft -noprofile", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Minecraft 1.19.4 with Fabric Loader", + "gameType": "minecraft", + "title": "Fabric 1.19.4 (Supports Mods)", + "category": "mc-fabric", + "runtime": "Java 17+", + "hardware": "RAM 4G+", + "size": "5MB", + "remark": "Minecraft Fabric", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", + "author": "fabricmc.net", + "setupInfo": { + "type": "minecraft/java/fabric", + "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", + "stopCommand": "stop", + "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.19.4 -downloadMinecraft -noprofile", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Minecraft 1.19.2 with Fabric Loader", + "gameType": "minecraft", + "title": "Fabric 1.19.2 (Supports Mods)", + "category": "mc-fabric", + "runtime": "Java 17+", + "hardware": "RAM 4G+", + "size": "5MB", + "remark": "Minecraft Fabric", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", + "author": "fabricmc.net", + "setupInfo": { + "type": "minecraft/java/fabric", + "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", + "stopCommand": "stop", + "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.19.2 -downloadMinecraft -noprofile", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Minecraft 1.18.2 with Fabric Loader", + "gameType": "minecraft", + "title": "Fabric 1.18.2 (Supports Mods)", + "category": "mc-fabric", + "runtime": "Java 17+", + "hardware": "RAM 4G+", + "size": "5MB", + "remark": "Minecraft Fabric", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", + "author": "fabricmc.net", + "setupInfo": { + "type": "minecraft/java/fabric", + "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", + "stopCommand": "stop", + "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.18.2 -downloadMinecraft -noprofile", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Minecraft 1.17.1 with Fabric Loader", + "gameType": "minecraft", + "title": "Fabric 1.17.1 (Supports Mods)", + "category": "mc-fabric", + "runtime": "Java 16+", + "hardware": "RAM 4G+", + "size": "5MB", + "remark": "Minecraft Fabric", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", + "author": "fabricmc.net", + "setupInfo": { + "type": "minecraft/java/fabric", + "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", + "stopCommand": "stop", + "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.17.1 -downloadMinecraft -noprofile", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Minecraft 1.16.5 with Fabric Loader", + "gameType": "minecraft", + "title": "Fabric 1.16.5 (Supports Mods)", + "category": "mc-fabric", + "runtime": "Java 8+", + "hardware": "RAM 4G+", + "size": "5MB", + "remark": "Minecraft Fabric", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", + "author": "fabricmc.net", + "setupInfo": { + "type": "minecraft/java/fabric", + "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", + "stopCommand": "stop", + "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.16.5 -downloadMinecraft -noprofile", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Minecraft 1.15.2 with Fabric Loader", + "gameType": "minecraft", + "title": "Fabric 1.15.2 (Supports Mods)", + "category": "mc-fabric", + "runtime": "Java 8+", + "hardware": "RAM 4G+", + "size": "5MB", + "remark": "Minecraft Fabric", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", + "author": "fabricmc.net", + "setupInfo": { + "type": "minecraft/java/fabric", + "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", + "stopCommand": "stop", + "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.15.2 -downloadMinecraft -noprofile", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "Minecraft 1.14.4 with Fabric Loader", + "gameType": "minecraft", + "title": "Fabric 1.14.4 (Supports Mods)", + "category": "mc-fabric", + "runtime": "Java 8+", + "hardware": "RAM 4G+", + "size": "5MB", + "remark": "Minecraft Fabric", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", + "author": "fabricmc.net", + "setupInfo": { + "type": "minecraft/java/fabric", + "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", + "stopCommand": "stop", + "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.14.4 -downloadMinecraft -noprofile", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Vanilla] Minecraft 1.21.8", + "gameType": "minecraft", + "title": "Minecraft 1.21.8", + "category": "mc-vanilla", + "runtime": "Java 21+", + "hardware": "RAM 2G+", + "size": "55MB", + "remark": "Minecraft Java", + "targetLink": "https://piston-data.mojang.com/v1/objects/6bce4ef400e4efaa63a13d5e6f6b500be969ef81/server.jar", + "author": "Mojang Studios", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Vanilla] Minecraft 1.21.6", + "gameType": "minecraft", + "title": "Minecraft 1.21.6", + "category": "mc-vanilla", + "runtime": "Java 21+", + "hardware": "RAM 2G+", + "size": "55MB", + "remark": "Minecraft Java", + "targetLink": "https://piston-data.mojang.com/v1/objects/6e64dcabba3c01a7271b4fa6bd898483b794c59b/server.jar", + "author": "Mojang Studios", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Vanilla] Minecraft 1.21.5", + "gameType": "minecraft", + "title": "Minecraft 1.21.5", + "category": "mc-vanilla", + "runtime": "Java 21+", + "hardware": "RAM 2G+", + "size": "55MB", + "remark": "Minecraft Java", + "targetLink": "https://piston-data.mojang.com/v1/objects/e6ec2f64e6080b9b5d9b471b291c33cc7f509733/server.jar", + "author": "Mojang Studios", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Vanilla] Minecraft 1.21.4", + "gameType": "minecraft", + "title": "Minecraft 1.21.4", + "category": "mc-vanilla", + "runtime": "Java 21+", + "hardware": "RAM 2G+", + "size": "55MB", + "remark": "Minecraft Java", + "targetLink": "https://piston-data.mojang.com/v1/objects/4707d00eb834b446575d89a61a11b5d548d8c001/server.jar", + "author": "Mojang Studios", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Vanilla] Minecraft 1.21.1", + "gameType": "minecraft", + "title": "Minecraft 1.21.1", + "category": "mc-vanilla", + "runtime": "Java 21+", + "hardware": "RAM 2G+", + "size": "50MB", + "remark": "Minecraft Java", + "targetLink": "https://piston-data.mojang.com/v1/objects/59353fb40c36d304f2035d51e7d6e6baa98dc05c/server.jar", + "author": "Mojang Studios", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Vanilla] Minecraft 1.20.6", + "gameType": "minecraft", + "title": "Minecraft 1.20.6", + "category": "mc-vanilla", + "runtime": "Java 21+", + "hardware": "RAM 2G+", + "size": "50MB", + "remark": "Minecraft Java", + "targetLink": "https://piston-data.mojang.com/v1/objects/145ff0858209bcfc164859ba735d4199aafa1eea/server.jar", + "author": "Mojang Studios", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Vanilla] Minecraft 1.20.4", + "gameType": "minecraft", + "title": "Minecraft 1.20.4", + "category": "mc-vanilla", + "runtime": "Java 21+", + "hardware": "RAM 2G+", + "size": "50MB", + "remark": "Minecraft Java", + "targetLink": "https://piston-data.mojang.com/v1/objects/8dd1a28015f51b1803213892b50b7b4fc76e594d/server.jar", + "author": "Mojang Studios", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Vanilla] Minecraft 1.20.1", + "gameType": "minecraft", + "title": "Minecraft 1.20.1", + "category": "mc-vanilla", + "runtime": "Java 17+", + "hardware": "RAM 2G+", + "size": "50MB", + "remark": "Minecraft Java", + "targetLink": "https://piston-data.mojang.com/v1/objects/84194a2f286ef7c14ed7ce0090dba59902951553/server.jar", + "author": "Mojang Studios", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Vanilla] Minecraft 1.19.4", + "gameType": "minecraft", + "title": "Minecraft 1.19.4", + "category": "mc-vanilla", + "runtime": "Java 17+", + "hardware": "RAM 2G+", + "size": "50MB", + "remark": "Minecraft Java", + "targetLink": "https://piston-data.mojang.com/v1/objects/8f3112a1049751cc472ec13e397eade5336ca7ae/server.jar", + "author": "Mojang Studios", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Vanilla] Minecraft 1.18.2", + "gameType": "minecraft", + "title": "Minecraft 1.18.2", + "category": "mc-vanilla", + "runtime": "Java 17+", + "hardware": "RAM 2G+", + "size": "45MB", + "remark": "Minecraft Java", + "targetLink": "https://piston-data.mojang.com/v1/objects/c8f83c5655308435b3dcf03c06d9fe8740a77469/server.jar", + "author": "Mojang Studios", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Vanilla] Minecraft 1.17.1", + "gameType": "minecraft", + "title": "Minecraft 1.17.1", + "category": "mc-vanilla", + "runtime": "Java 16+", + "hardware": "RAM 2G+", + "size": "45MB", + "remark": "Minecraft Java", + "targetLink": "https://piston-data.mojang.com/v1/objects/a16d67e5807f57fc4e550299cf20226194497dc2/server.jar", + "author": "Mojang Studios", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Vanilla] Minecraft 1.16.5", + "gameType": "minecraft", + "title": "Minecraft 1.16.5", + "category": "mc-vanilla", + "runtime": "Java 8+", + "hardware": "RAM 2G+", + "size": "45MB", + "remark": "Minecraft Java", + "targetLink": "https://piston-data.mojang.com/v1/objects/1b557e7b033b583cd9f66746b7a9ab1ec1673ced/server.jar", + "author": "Mojang Studios", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Vanilla] Minecraft 1.12.2", + "gameType": "minecraft", + "title": "Minecraft 1.12.2", + "category": "mc-vanilla", + "runtime": "Java 8+", + "hardware": "RAM 2G+", + "size": "30MB", + "remark": "Minecraft Java", + "targetLink": "https://piston-data.mojang.com/v1/objects/886945bfb2b978778c3a0288fd7fab09d315b25f/server.jar", + "author": "Mojang Studios", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "description": "[Vanilla] Minecraft 1.8.9", + "gameType": "minecraft", + "title": "Minecraft 1.8.9", + "category": "mc-vanilla", + "runtime": "Java 7+", + "hardware": "RAM 2G+", + "size": "10MB", + "remark": "Minecraft Java", + "targetLink": "https://launcher.mojang.com/v1/objects/b58b2ceb36e01bcd8dbf49c8fb66c55a9f0676cd/server.jar", + "author": "Mojang Studios", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "zh_cn", + "description": "[Paper] Minecraft 1.21.1 快速开服", + "gameType": "minecraft", + "title": "Minecraft 1.21.1 快速开服", + "category": "mc-paper", + "runtime": "Java 17+", + "hardware": "RAM 4G+", + "size": "250MB", + "remark": "包含基础插件,萌新快速开服!低配机器专属!", + "targetLink": "https://cloud.alongw.cn/f/DzvHK/Paper-1.21.1-ZH.zip", + "author": "alongw.cn", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -Xms4096M -Xmx4096M -jar server.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "zh_cn", + "description": "[Paper] 中小型互通服推荐,1.20.4 版本,快速开服,包含ESS、锁箱子、操作回滚、领地商店等基础插件。", + "gameType": "minecraft", + "title": "Minecraft 1.20.4", + "category": "mc-paper", + "runtime": "Java 21+", + "hardware": "RAM 6G+", + "size": "140MB", + "remark": "支持插件,最低 8GB 内存要求", + "targetLink": "https://url.alww.top/mcsm/paper1.20.4.zip", + "author": "alongw.cn", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -Xms6144M -Xmx6144M -jar server.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "zh_cn", + "description": "注意:默认的启动命令是 \"sh ./run.sh\",如果需要在 Windows 上运行,请在安装后将命令修改为 \"start.bat\"", + "gameType": "minecraft", + "title": "Forge 1.20.1 Java 版 (支持模组)", + "category": "mc-forge", + "runtime": "Java 17+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.1-47.3.33/forge-1.20.1-47.3.33-installer.jar", + "author": "minecraftforge.net", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.20.1-47.3.33-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "zh_cn", + "description": "注意:默认的启动命令是 \"sh ./run.sh\",如果需要在 Windows 上运行,请在安装后将命令修改为 \"start.bat\"", + "gameType": "minecraft", + "title": "Forge 1.20.6 Java 版 (支持模组)", + "category": "mc-forge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.6-50.1.48/forge-1.20.6-50.1.48-installer.jar", + "author": "minecraftforge.net", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.20.6-50.1.48-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "zh_cn", + "description": "注意:默认的启动命令是 \"sh ./run.sh\",如果需要在 Windows 上运行,请在安装后将命令修改为 \"start.bat\"", + "gameType": "minecraft", + "title": "Forge 1.19.2 Java 版 (支持模组)", + "category": "mc-forge", + "runtime": "Java 17+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.19.2-43.4.20/forge-1.19.2-43.4.20-installer.jar", + "author": "minecraftforge.net", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.19.2-43.4.20-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "zh_cn", + "description": "[幻兽帕鲁](Windows)", + "remark": "适用于 Windows 下的幻兽帕鲁安装包", + "gameType": "other", + "title": "Minecraft 1.21.8", + "category": "mc-purpur", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "55MB", + + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.8-2481.jar", + "author": "purpurmc.org", + "setupInfo": { + "type": "minecraft/java/purpur", + "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.8-2481.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "zh_cn", + "description": "[幻兽帕鲁](Linux Docker)", + "remark": "适用于 Linux Docker 下的幻兽帕鲁安装包", + "gameType": "other", + "title": "Minecraft 1.21.8", + "category": "mc-purpur", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "55MB", + + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.8-2481.jar", + "author": "purpurmc.org", + "setupInfo": { + "type": "minecraft/java/purpur", + "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.8-2481.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + } + ] +} From 7922d738893bc020f1fefcf63400800a76da3d1a Mon Sep 17 00:00:00 2001 From: yumao233 Date: Mon, 28 Jul 2025 15:02:18 +0800 Subject: [PATCH 204/338] fix: category --- templates-test.json | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/templates-test.json b/templates-test.json index 5d90dc4..ce680fe 100644 --- a/templates-test.json +++ b/templates-test.json @@ -10,18 +10,6 @@ "value": "zh_cn" } ], - "games": [ - { - "label": "Minecraft", - "value": "minecraft", - "language": "" - }, - { - "label": "幻兽帕鲁", - "value": "palworld", - "language": "zh_cn" - } - ], "packages": [ { "language": "en_us", @@ -1856,7 +1844,7 @@ "remark": "适用于 Windows 下的幻兽帕鲁安装包", "gameType": "other", "title": "Minecraft 1.21.8", - "category": "mc-purpur", + "category": "Windows", "runtime": "Java 21+", "hardware": "RAM 4G+", "size": "55MB", @@ -1876,9 +1864,9 @@ "language": "zh_cn", "description": "[幻兽帕鲁](Linux Docker)", "remark": "适用于 Linux Docker 下的幻兽帕鲁安装包", - "gameType": "other", + "gameType": "Palworld", "title": "Minecraft 1.21.8", - "category": "mc-purpur", + "category": "Linux", "runtime": "Java 21+", "hardware": "RAM 4G+", "size": "55MB", From a8ec5996b18bcdb4dbe83ba075edc74ca6532175 Mon Sep 17 00:00:00 2001 From: yumao233 Date: Mon, 28 Jul 2025 15:08:59 +0800 Subject: [PATCH 205/338] fix: category --- templates-test.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates-test.json b/templates-test.json index ce680fe..1443294 100644 --- a/templates-test.json +++ b/templates-test.json @@ -1842,7 +1842,7 @@ "language": "zh_cn", "description": "[幻兽帕鲁](Windows)", "remark": "适用于 Windows 下的幻兽帕鲁安装包", - "gameType": "other", + "gameType": "Palworld", "title": "Minecraft 1.21.8", "category": "Windows", "runtime": "Java 21+", From bad89d6aeece9c423c461e99d3d37e5c118d1043 Mon Sep 17 00:00:00 2001 From: yumao233 Date: Mon, 28 Jul 2025 15:19:04 +0800 Subject: [PATCH 206/338] fix: category --- templates-test.json | 174 ++++++++++++++++++++++---------------------- 1 file changed, 87 insertions(+), 87 deletions(-) diff --git a/templates-test.json b/templates-test.json index 1443294..3e0a347 100644 --- a/templates-test.json +++ b/templates-test.json @@ -14,7 +14,7 @@ { "language": "en_us", "description": "[Purpur] Minecraft 1.21.8 Purpur", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Minecraft 1.21.8", "category": "mc-purpur", "runtime": "Java 21+", @@ -35,7 +35,7 @@ { "language": "en_us", "description": "[Purpur] Minecraft 1.21.6 Purpur", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Minecraft 1.21.6", "category": "mc-purpur", "runtime": "Java 21+", @@ -56,7 +56,7 @@ { "language": "en_us", "description": "[Purpur] Minecraft 1.21.5 Purpur", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Minecraft 1.21.5", "category": "mc-purpur", "runtime": "Java 21+", @@ -77,7 +77,7 @@ { "language": "en_us", "description": "[Purpur] Minecraft 1.21.4 Purpur", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Minecraft 1.21.4", "category": "mc-purpur", "runtime": "Java 21+", @@ -98,7 +98,7 @@ { "language": "en_us", "description": "[Purpur] Minecraft 1.21.3 Purpur", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Minecraft 1.21.3", "category": "mc-purpur", "runtime": "Java 21+", @@ -119,7 +119,7 @@ { "language": "en_us", "description": "[Purpur] Minecraft 1.21.1 Purpur", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Minecraft 1.21.1", "category": "mc-purpur", "runtime": "Java 21+", @@ -140,7 +140,7 @@ { "language": "en_us", "description": "[Purpur] Minecraft 1.20.6 Purpur", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Minecraft 1.20.6", "category": "mc-purpur", "runtime": "Java 21+", @@ -161,7 +161,7 @@ { "language": "en_us", "description": "[Purpur] Minecraft 1.20.4 Purpur", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Minecraft 1.20.4", "category": "mc-purpur", "runtime": "Java 21+", @@ -182,7 +182,7 @@ { "language": "en_us", "description": "[Purpur] Minecraft 1.20.1 Purpur", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Minecraft 1.20.1", "category": "mc-purpur", "runtime": "Java 17+", @@ -203,7 +203,7 @@ { "language": "en_us", "description": "[Purpur] Minecraft 1.19.2 Purpur", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Minecraft 1.19.2", "category": "mc-purpur", "runtime": "Java 17+", @@ -224,7 +224,7 @@ { "language": "en_us", "description": "[Purpur] Minecraft 1.18.2 Purpur", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Minecraft 1.18.2", "category": "mc-purpur", "runtime": "Java 17+", @@ -245,7 +245,7 @@ { "language": "en_us", "description": "[Purpur] Minecraft 1.17.1 Purpur", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Minecraft 1.17.1", "category": "mc-purpur", "runtime": "Java 16+", @@ -266,7 +266,7 @@ { "language": "en_us", "description": "[Purpur] Minecraft 1.16.5 Purpur", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Minecraft 1.16.5", "category": "mc-purpur", "runtime": "Java 8+", @@ -287,7 +287,7 @@ { "language": "en_us", "description": "[Paper] Minecraft 1.21.8 Paper", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Minecraft 1.21.8", "category": "mc-paper", "runtime": "Java 21+", @@ -308,7 +308,7 @@ { "language": "en_us", "description": "[Paper] Minecraft 1.21.6 Paper", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Minecraft 1.21.6", "category": "mc-paper", "runtime": "Java 21+", @@ -329,7 +329,7 @@ { "language": "en_us", "description": "[Paper] Minecraft 1.21.4 Paper", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Minecraft 1.21.4", "category": "mc-paper", "runtime": "Java 21+", @@ -350,7 +350,7 @@ { "language": "en_us", "description": "[Paper] Minecraft 1.21.3 Paper", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Minecraft 1.21.3", "category": "mc-paper", "runtime": "Java 21+", @@ -371,7 +371,7 @@ { "language": "en_us", "description": "[Paper] Minecraft 1.21.1 Paper", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Minecraft 1.21.1", "category": "mc-paper", "runtime": "Java 21+", @@ -392,7 +392,7 @@ { "language": "en_us", "description": "[Paper] Minecraft 1.20.6 Paper", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Minecraft 1.20.6", "category": "mc-paper", "runtime": "Java 21+", @@ -413,7 +413,7 @@ { "language": "en_us", "description": "[Paper] Minecraft 1.20.4 Paper", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Minecraft 1.20.4", "category": "mc-paper", "runtime": "Java 21+", @@ -434,7 +434,7 @@ { "language": "en_us", "description": "[Paper] Minecraft 1.20.2 Paper", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Minecraft 1.20.2", "category": "mc-paper", "runtime": "Java 17+", @@ -455,7 +455,7 @@ { "language": "en_us", "description": "[Paper] Minecraft 1.20.1 Paper", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Minecraft 1.20.1", "category": "mc-paper", "runtime": "Java 17+", @@ -476,7 +476,7 @@ { "language": "en_us", "description": "[Paper] Minecraft 1.19.4 Paper", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Minecraft 1.19.4", "category": "mc-paper", "runtime": "Java 17+", @@ -497,7 +497,7 @@ { "language": "en_us", "description": "[Paper] Minecraft 1.19.2 Paper", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Minecraft 1.19.2", "category": "mc-paper", "runtime": "Java 17+", @@ -518,7 +518,7 @@ { "language": "en_us", "description": "[Paper] Minecraft 1.18.2 Paper", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Minecraft 1.18.2", "category": "mc-paper", "runtime": "Java 17+", @@ -539,7 +539,7 @@ { "language": "en_us", "description": "[Paper] Minecraft 1.17.1 Paper", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Minecraft 1.17.1", "category": "mc-paper", "runtime": "Java 16+", @@ -560,7 +560,7 @@ { "language": "en_us", "description": "[Paper] Minecraft 1.16.5 Paper", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Minecraft 1.16.5", "category": "mc-paper", "runtime": "Java 8+", @@ -581,7 +581,7 @@ { "language": "en_us", "description": "[Paper] Minecraft 1.12.2 Paper", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Minecraft 1.12.2", "category": "mc-paper", "runtime": "Java 8+", @@ -602,7 +602,7 @@ { "language": "en_us", "description": "[Paper] Minecraft 1.8.8 Paper", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Minecraft 1.8.8", "category": "mc-paper", "runtime": "Java 7+", @@ -623,7 +623,7 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "NeoForge 1.21.8 (Supports Mods)", "category": "mc-neoforge", "runtime": "Java 21+", @@ -644,7 +644,7 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "NeoForge 1.21.6 (Supports Mods)", "category": "mc-neoforge", "runtime": "Java 21+", @@ -665,7 +665,7 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "NeoForge 1.21.5 (Supports Mods)", "category": "mc-neoforge", "runtime": "Java 21+", @@ -686,7 +686,7 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "NeoForge 1.21.4 (Supports Mods)", "category": "mc-neoforge", "runtime": "Java 21+", @@ -707,7 +707,7 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "NeoForge 1.21.1 (Supports Mods)", "category": "mc-neoforge", "runtime": "Java 21+", @@ -728,7 +728,7 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "NeoForge 1.20.6 (Supports Mods)", "category": "mc-neoforge", "runtime": "Java 21+", @@ -749,7 +749,7 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "NeoForge 1.20.4 (Supports Mods)", "category": "mc-neoforge", "runtime": "Java 21+", @@ -770,7 +770,7 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "NeoForge 1.20.2 (Supports Mods)", "category": "mc-neoforge", "runtime": "Java 21+", @@ -791,7 +791,7 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Forge 1.21.8 (Supports Mods)", "category": "mc-forge", "runtime": "Java 21+", @@ -812,7 +812,7 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Forge 1.21.6 (Supports Mods)", "category": "mc-forge", "runtime": "Java 21+", @@ -833,7 +833,7 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Forge 1.21.5 (Supports Mods)", "category": "mc-forge", "runtime": "Java 21+", @@ -854,7 +854,7 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Forge 1.21.4 (Supports Mods)", "category": "mc-forge", "runtime": "Java 21+", @@ -875,7 +875,7 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Forge 1.21.1 (Supports Mods)", "category": "mc-forge", "runtime": "Java 21+", @@ -896,7 +896,7 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Forge 1.20.6 (Supports Mods)", "category": "mc-forge", "runtime": "Java 21+", @@ -917,7 +917,7 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Forge 1.20.4 (Supports Mods)", "category": "mc-forge", "runtime": "Java 21+", @@ -938,7 +938,7 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Forge 1.20.1 (Supports Mods)", "category": "mc-forge", "runtime": "Java 17+", @@ -959,7 +959,7 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Forge 1.19.4 (Supports Mods)", "category": "mc-forge", "runtime": "Java 17+", @@ -980,7 +980,7 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Forge 1.19.2 (Supports Mods)", "category": "mc-forge", "runtime": "Java 17+", @@ -1001,7 +1001,7 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Forge 1.18.2 (Supports Mods)", "category": "mc-forge", "runtime": "Java 17+", @@ -1022,7 +1022,7 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Forge 1.17.1 (Supports Mods)", "category": "mc-forge", "runtime": "Java 16+", @@ -1043,7 +1043,7 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Forge 1.16.5 (Supports Mods)", "category": "mc-forge", "runtime": "Java 8+", @@ -1064,7 +1064,7 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Forge 1.12.2 (Supports Mods)", "category": "mc-forge", "runtime": "Java 8+", @@ -1085,7 +1085,7 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Forge 1.8.9 (Supports Mods)", "category": "mc-forge", "runtime": "Java 7+", @@ -1106,7 +1106,7 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Forge 1.7.10 (Supports Mods)", "category": "mc-forge", "runtime": "Java 7+", @@ -1127,7 +1127,7 @@ { "language": "en_us", "description": "Minecraft 1.21.8 with Fabric Loader", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Fabric 1.21.8 (Supports Mods)", "category": "mc-fabric", "runtime": "Java 21+", @@ -1148,7 +1148,7 @@ { "language": "en_us", "description": "Minecraft 1.21.6 with Fabric Loader", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Fabric 1.21.6 (Supports Mods)", "category": "mc-fabric", "runtime": "Java 21+", @@ -1169,7 +1169,7 @@ { "language": "en_us", "description": "Minecraft 1.21.5 with Fabric Loader", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Fabric 1.21.5 (Supports Mods)", "category": "mc-fabric", "runtime": "Java 21+", @@ -1190,7 +1190,7 @@ { "language": "en_us", "description": "Minecraft 1.21.4 with Fabric Loader", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Fabric 1.21.4 (Supports Mods)", "category": "mc-fabric", "runtime": "Java 21+", @@ -1211,7 +1211,7 @@ { "language": "en_us", "description": "Minecraft 1.21.1 with Fabric Loader", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Fabric 1.21.1 (Supports Mods)", "category": "mc-fabric", "runtime": "Java 21+", @@ -1232,7 +1232,7 @@ { "language": "en_us", "description": "Minecraft 1.20.6 with Fabric Loader", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Fabric 1.20.6 (Supports Mods)", "category": "mc-fabric", "runtime": "Java 21+", @@ -1253,7 +1253,7 @@ { "language": "en_us", "description": "Minecraft 1.20.4 with Fabric Loader", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Fabric 1.20.4 (Supports Mods)", "category": "mc-fabric", "runtime": "Java 21+", @@ -1274,7 +1274,7 @@ { "language": "en_us", "description": "Minecraft 1.20.1 with Fabric Loader", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Fabric 1.20.1 (Supports Mods)", "category": "mc-fabric", "runtime": "Java 17+", @@ -1295,7 +1295,7 @@ { "language": "en_us", "description": "Minecraft 1.19.4 with Fabric Loader", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Fabric 1.19.4 (Supports Mods)", "category": "mc-fabric", "runtime": "Java 17+", @@ -1316,7 +1316,7 @@ { "language": "en_us", "description": "Minecraft 1.19.2 with Fabric Loader", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Fabric 1.19.2 (Supports Mods)", "category": "mc-fabric", "runtime": "Java 17+", @@ -1337,7 +1337,7 @@ { "language": "en_us", "description": "Minecraft 1.18.2 with Fabric Loader", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Fabric 1.18.2 (Supports Mods)", "category": "mc-fabric", "runtime": "Java 17+", @@ -1358,7 +1358,7 @@ { "language": "en_us", "description": "Minecraft 1.17.1 with Fabric Loader", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Fabric 1.17.1 (Supports Mods)", "category": "mc-fabric", "runtime": "Java 16+", @@ -1379,7 +1379,7 @@ { "language": "en_us", "description": "Minecraft 1.16.5 with Fabric Loader", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Fabric 1.16.5 (Supports Mods)", "category": "mc-fabric", "runtime": "Java 8+", @@ -1400,7 +1400,7 @@ { "language": "en_us", "description": "Minecraft 1.15.2 with Fabric Loader", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Fabric 1.15.2 (Supports Mods)", "category": "mc-fabric", "runtime": "Java 8+", @@ -1421,7 +1421,7 @@ { "language": "en_us", "description": "Minecraft 1.14.4 with Fabric Loader", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Fabric 1.14.4 (Supports Mods)", "category": "mc-fabric", "runtime": "Java 8+", @@ -1442,7 +1442,7 @@ { "language": "en_us", "description": "[Vanilla] Minecraft 1.21.8", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Minecraft 1.21.8", "category": "mc-vanilla", "runtime": "Java 21+", @@ -1463,7 +1463,7 @@ { "language": "en_us", "description": "[Vanilla] Minecraft 1.21.6", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Minecraft 1.21.6", "category": "mc-vanilla", "runtime": "Java 21+", @@ -1484,7 +1484,7 @@ { "language": "en_us", "description": "[Vanilla] Minecraft 1.21.5", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Minecraft 1.21.5", "category": "mc-vanilla", "runtime": "Java 21+", @@ -1505,7 +1505,7 @@ { "language": "en_us", "description": "[Vanilla] Minecraft 1.21.4", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Minecraft 1.21.4", "category": "mc-vanilla", "runtime": "Java 21+", @@ -1526,7 +1526,7 @@ { "language": "en_us", "description": "[Vanilla] Minecraft 1.21.1", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Minecraft 1.21.1", "category": "mc-vanilla", "runtime": "Java 21+", @@ -1547,7 +1547,7 @@ { "language": "en_us", "description": "[Vanilla] Minecraft 1.20.6", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Minecraft 1.20.6", "category": "mc-vanilla", "runtime": "Java 21+", @@ -1568,7 +1568,7 @@ { "language": "en_us", "description": "[Vanilla] Minecraft 1.20.4", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Minecraft 1.20.4", "category": "mc-vanilla", "runtime": "Java 21+", @@ -1589,7 +1589,7 @@ { "language": "en_us", "description": "[Vanilla] Minecraft 1.20.1", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Minecraft 1.20.1", "category": "mc-vanilla", "runtime": "Java 17+", @@ -1610,7 +1610,7 @@ { "language": "en_us", "description": "[Vanilla] Minecraft 1.19.4", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Minecraft 1.19.4", "category": "mc-vanilla", "runtime": "Java 17+", @@ -1631,7 +1631,7 @@ { "language": "en_us", "description": "[Vanilla] Minecraft 1.18.2", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Minecraft 1.18.2", "category": "mc-vanilla", "runtime": "Java 17+", @@ -1652,7 +1652,7 @@ { "language": "en_us", "description": "[Vanilla] Minecraft 1.17.1", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Minecraft 1.17.1", "category": "mc-vanilla", "runtime": "Java 16+", @@ -1673,7 +1673,7 @@ { "language": "en_us", "description": "[Vanilla] Minecraft 1.16.5", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Minecraft 1.16.5", "category": "mc-vanilla", "runtime": "Java 8+", @@ -1694,7 +1694,7 @@ { "language": "en_us", "description": "[Vanilla] Minecraft 1.12.2", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Minecraft 1.12.2", "category": "mc-vanilla", "runtime": "Java 8+", @@ -1715,7 +1715,7 @@ { "language": "en_us", "description": "[Vanilla] Minecraft 1.8.9", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Minecraft 1.8.9", "category": "mc-vanilla", "runtime": "Java 7+", @@ -1736,7 +1736,7 @@ { "language": "zh_cn", "description": "[Paper] Minecraft 1.21.1 快速开服", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Minecraft 1.21.1 快速开服", "category": "mc-paper", "runtime": "Java 17+", @@ -1757,7 +1757,7 @@ { "language": "zh_cn", "description": "[Paper] 中小型互通服推荐,1.20.4 版本,快速开服,包含ESS、锁箱子、操作回滚、领地商店等基础插件。", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Minecraft 1.20.4", "category": "mc-paper", "runtime": "Java 21+", @@ -1778,7 +1778,7 @@ { "language": "zh_cn", "description": "注意:默认的启动命令是 \"sh ./run.sh\",如果需要在 Windows 上运行,请在安装后将命令修改为 \"start.bat\"", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Forge 1.20.1 Java 版 (支持模组)", "category": "mc-forge", "runtime": "Java 17+", @@ -1799,7 +1799,7 @@ { "language": "zh_cn", "description": "注意:默认的启动命令是 \"sh ./run.sh\",如果需要在 Windows 上运行,请在安装后将命令修改为 \"start.bat\"", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Forge 1.20.6 Java 版 (支持模组)", "category": "mc-forge", "runtime": "Java 21+", @@ -1820,7 +1820,7 @@ { "language": "zh_cn", "description": "注意:默认的启动命令是 \"sh ./run.sh\",如果需要在 Windows 上运行,请在安装后将命令修改为 \"start.bat\"", - "gameType": "minecraft", + "gameType": "Minecraft", "title": "Forge 1.19.2 Java 版 (支持模组)", "category": "mc-forge", "runtime": "Java 17+", From 0c6dfac8f646efb449f827627e786dea25285285 Mon Sep 17 00:00:00 2001 From: yumao233 Date: Mon, 28 Jul 2025 15:22:33 +0800 Subject: [PATCH 207/338] fix: category --- templates-test.json | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/templates-test.json b/templates-test.json index 3e0a347..aa5f8af 100644 --- a/templates-test.json +++ b/templates-test.json @@ -1840,15 +1840,14 @@ }, { "language": "zh_cn", - "description": "[幻兽帕鲁](Windows)", - "remark": "适用于 Windows 下的幻兽帕鲁安装包", + "title": "幻兽帕鲁官方服务器(Windows)", + "description": "适用于 Windows 的帕鲁们的最佳服务器!", + "remark": "", "gameType": "Palworld", - "title": "Minecraft 1.21.8", "category": "Windows", - "runtime": "Java 21+", + "runtime": "Windows 10+", "hardware": "RAM 4G+", - "size": "55MB", - + "size": "", "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.8-2481.jar", "author": "purpurmc.org", "setupInfo": { @@ -1862,15 +1861,14 @@ }, { "language": "zh_cn", - "description": "[幻兽帕鲁](Linux Docker)", - "remark": "适用于 Linux Docker 下的幻兽帕鲁安装包", + "title": "幻兽帕鲁官方服务器(Linux + Docker)", + "description": "适用于 Windows 的帕鲁们的最佳服务器!本模板使用 Docker 安装,Linux 服务器必须安装 Docker!", + "remark": "", "gameType": "Palworld", - "title": "Minecraft 1.21.8", "category": "Linux", - "runtime": "Java 21+", + "runtime": "Ubuntu/Centos LTS", "hardware": "RAM 4G+", - "size": "55MB", - + "size": "", "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.8-2481.jar", "author": "purpurmc.org", "setupInfo": { From 3cf9286495c30c9b651e0150988b1fc9c4c1b5e4 Mon Sep 17 00:00:00 2001 From: yumao233 Date: Wed, 30 Jul 2025 14:41:05 +0800 Subject: [PATCH 208/338] feat: new template file --- templates-test.json | 89 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) diff --git a/templates-test.json b/templates-test.json index aa5f8af..77d806a 100644 --- a/templates-test.json +++ b/templates-test.json @@ -14,6 +14,7 @@ { "language": "en_us", "description": "[Purpur] Minecraft 1.21.8 Purpur", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Minecraft 1.21.8", "category": "mc-purpur", @@ -35,6 +36,7 @@ { "language": "en_us", "description": "[Purpur] Minecraft 1.21.6 Purpur", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Minecraft 1.21.6", "category": "mc-purpur", @@ -56,6 +58,7 @@ { "language": "en_us", "description": "[Purpur] Minecraft 1.21.5 Purpur", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Minecraft 1.21.5", "category": "mc-purpur", @@ -77,6 +80,7 @@ { "language": "en_us", "description": "[Purpur] Minecraft 1.21.4 Purpur", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Minecraft 1.21.4", "category": "mc-purpur", @@ -98,6 +102,7 @@ { "language": "en_us", "description": "[Purpur] Minecraft 1.21.3 Purpur", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Minecraft 1.21.3", "category": "mc-purpur", @@ -119,6 +124,7 @@ { "language": "en_us", "description": "[Purpur] Minecraft 1.21.1 Purpur", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Minecraft 1.21.1", "category": "mc-purpur", @@ -140,6 +146,7 @@ { "language": "en_us", "description": "[Purpur] Minecraft 1.20.6 Purpur", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Minecraft 1.20.6", "category": "mc-purpur", @@ -161,6 +168,7 @@ { "language": "en_us", "description": "[Purpur] Minecraft 1.20.4 Purpur", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Minecraft 1.20.4", "category": "mc-purpur", @@ -182,6 +190,7 @@ { "language": "en_us", "description": "[Purpur] Minecraft 1.20.1 Purpur", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Minecraft 1.20.1", "category": "mc-purpur", @@ -203,6 +212,7 @@ { "language": "en_us", "description": "[Purpur] Minecraft 1.19.2 Purpur", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Minecraft 1.19.2", "category": "mc-purpur", @@ -224,6 +234,7 @@ { "language": "en_us", "description": "[Purpur] Minecraft 1.18.2 Purpur", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Minecraft 1.18.2", "category": "mc-purpur", @@ -245,6 +256,7 @@ { "language": "en_us", "description": "[Purpur] Minecraft 1.17.1 Purpur", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Minecraft 1.17.1", "category": "mc-purpur", @@ -266,6 +278,7 @@ { "language": "en_us", "description": "[Purpur] Minecraft 1.16.5 Purpur", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Minecraft 1.16.5", "category": "mc-purpur", @@ -287,6 +300,7 @@ { "language": "en_us", "description": "[Paper] Minecraft 1.21.8 Paper", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Minecraft 1.21.8", "category": "mc-paper", @@ -308,6 +322,7 @@ { "language": "en_us", "description": "[Paper] Minecraft 1.21.6 Paper", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Minecraft 1.21.6", "category": "mc-paper", @@ -329,6 +344,7 @@ { "language": "en_us", "description": "[Paper] Minecraft 1.21.4 Paper", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Minecraft 1.21.4", "category": "mc-paper", @@ -350,6 +366,7 @@ { "language": "en_us", "description": "[Paper] Minecraft 1.21.3 Paper", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Minecraft 1.21.3", "category": "mc-paper", @@ -371,6 +388,7 @@ { "language": "en_us", "description": "[Paper] Minecraft 1.21.1 Paper", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Minecraft 1.21.1", "category": "mc-paper", @@ -392,6 +410,7 @@ { "language": "en_us", "description": "[Paper] Minecraft 1.20.6 Paper", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Minecraft 1.20.6", "category": "mc-paper", @@ -413,6 +432,7 @@ { "language": "en_us", "description": "[Paper] Minecraft 1.20.4 Paper", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Minecraft 1.20.4", "category": "mc-paper", @@ -434,6 +454,7 @@ { "language": "en_us", "description": "[Paper] Minecraft 1.20.2 Paper", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Minecraft 1.20.2", "category": "mc-paper", @@ -455,6 +476,7 @@ { "language": "en_us", "description": "[Paper] Minecraft 1.20.1 Paper", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Minecraft 1.20.1", "category": "mc-paper", @@ -476,6 +498,7 @@ { "language": "en_us", "description": "[Paper] Minecraft 1.19.4 Paper", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Minecraft 1.19.4", "category": "mc-paper", @@ -497,6 +520,7 @@ { "language": "en_us", "description": "[Paper] Minecraft 1.19.2 Paper", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Minecraft 1.19.2", "category": "mc-paper", @@ -518,6 +542,7 @@ { "language": "en_us", "description": "[Paper] Minecraft 1.18.2 Paper", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Minecraft 1.18.2", "category": "mc-paper", @@ -539,6 +564,7 @@ { "language": "en_us", "description": "[Paper] Minecraft 1.17.1 Paper", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Minecraft 1.17.1", "category": "mc-paper", @@ -560,6 +586,7 @@ { "language": "en_us", "description": "[Paper] Minecraft 1.16.5 Paper", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Minecraft 1.16.5", "category": "mc-paper", @@ -581,6 +608,7 @@ { "language": "en_us", "description": "[Paper] Minecraft 1.12.2 Paper", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Minecraft 1.12.2", "category": "mc-paper", @@ -602,6 +630,7 @@ { "language": "en_us", "description": "[Paper] Minecraft 1.8.8 Paper", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Minecraft 1.8.8", "category": "mc-paper", @@ -623,6 +652,7 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "NeoForge 1.21.8 (Supports Mods)", "category": "mc-neoforge", @@ -644,6 +674,7 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "NeoForge 1.21.6 (Supports Mods)", "category": "mc-neoforge", @@ -665,6 +696,7 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "NeoForge 1.21.5 (Supports Mods)", "category": "mc-neoforge", @@ -686,6 +718,7 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "NeoForge 1.21.4 (Supports Mods)", "category": "mc-neoforge", @@ -707,6 +740,7 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "NeoForge 1.21.1 (Supports Mods)", "category": "mc-neoforge", @@ -728,6 +762,7 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "NeoForge 1.20.6 (Supports Mods)", "category": "mc-neoforge", @@ -749,6 +784,7 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "NeoForge 1.20.4 (Supports Mods)", "category": "mc-neoforge", @@ -770,6 +806,7 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "NeoForge 1.20.2 (Supports Mods)", "category": "mc-neoforge", @@ -791,6 +828,7 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Forge 1.21.8 (Supports Mods)", "category": "mc-forge", @@ -812,6 +850,7 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Forge 1.21.6 (Supports Mods)", "category": "mc-forge", @@ -833,6 +872,7 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Forge 1.21.5 (Supports Mods)", "category": "mc-forge", @@ -854,6 +894,7 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Forge 1.21.4 (Supports Mods)", "category": "mc-forge", @@ -875,6 +916,7 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Forge 1.21.1 (Supports Mods)", "category": "mc-forge", @@ -896,6 +938,7 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Forge 1.20.6 (Supports Mods)", "category": "mc-forge", @@ -917,6 +960,7 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Forge 1.20.4 (Supports Mods)", "category": "mc-forge", @@ -938,6 +982,7 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Forge 1.20.1 (Supports Mods)", "category": "mc-forge", @@ -959,6 +1004,7 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Forge 1.19.4 (Supports Mods)", "category": "mc-forge", @@ -980,6 +1026,7 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Forge 1.19.2 (Supports Mods)", "category": "mc-forge", @@ -1001,6 +1048,7 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Forge 1.18.2 (Supports Mods)", "category": "mc-forge", @@ -1022,6 +1070,7 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Forge 1.17.1 (Supports Mods)", "category": "mc-forge", @@ -1043,6 +1092,7 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Forge 1.16.5 (Supports Mods)", "category": "mc-forge", @@ -1064,6 +1114,7 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Forge 1.12.2 (Supports Mods)", "category": "mc-forge", @@ -1085,6 +1136,7 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Forge 1.8.9 (Supports Mods)", "category": "mc-forge", @@ -1106,6 +1158,7 @@ { "language": "en_us", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Forge 1.7.10 (Supports Mods)", "category": "mc-forge", @@ -1127,6 +1180,7 @@ { "language": "en_us", "description": "Minecraft 1.21.8 with Fabric Loader", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Fabric 1.21.8 (Supports Mods)", "category": "mc-fabric", @@ -1148,6 +1202,7 @@ { "language": "en_us", "description": "Minecraft 1.21.6 with Fabric Loader", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Fabric 1.21.6 (Supports Mods)", "category": "mc-fabric", @@ -1169,6 +1224,7 @@ { "language": "en_us", "description": "Minecraft 1.21.5 with Fabric Loader", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Fabric 1.21.5 (Supports Mods)", "category": "mc-fabric", @@ -1190,6 +1246,7 @@ { "language": "en_us", "description": "Minecraft 1.21.4 with Fabric Loader", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Fabric 1.21.4 (Supports Mods)", "category": "mc-fabric", @@ -1211,6 +1268,7 @@ { "language": "en_us", "description": "Minecraft 1.21.1 with Fabric Loader", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Fabric 1.21.1 (Supports Mods)", "category": "mc-fabric", @@ -1232,6 +1290,7 @@ { "language": "en_us", "description": "Minecraft 1.20.6 with Fabric Loader", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Fabric 1.20.6 (Supports Mods)", "category": "mc-fabric", @@ -1253,6 +1312,7 @@ { "language": "en_us", "description": "Minecraft 1.20.4 with Fabric Loader", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Fabric 1.20.4 (Supports Mods)", "category": "mc-fabric", @@ -1274,6 +1334,7 @@ { "language": "en_us", "description": "Minecraft 1.20.1 with Fabric Loader", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Fabric 1.20.1 (Supports Mods)", "category": "mc-fabric", @@ -1295,6 +1356,7 @@ { "language": "en_us", "description": "Minecraft 1.19.4 with Fabric Loader", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Fabric 1.19.4 (Supports Mods)", "category": "mc-fabric", @@ -1316,6 +1378,7 @@ { "language": "en_us", "description": "Minecraft 1.19.2 with Fabric Loader", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Fabric 1.19.2 (Supports Mods)", "category": "mc-fabric", @@ -1337,6 +1400,7 @@ { "language": "en_us", "description": "Minecraft 1.18.2 with Fabric Loader", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Fabric 1.18.2 (Supports Mods)", "category": "mc-fabric", @@ -1358,6 +1422,7 @@ { "language": "en_us", "description": "Minecraft 1.17.1 with Fabric Loader", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Fabric 1.17.1 (Supports Mods)", "category": "mc-fabric", @@ -1379,6 +1444,7 @@ { "language": "en_us", "description": "Minecraft 1.16.5 with Fabric Loader", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Fabric 1.16.5 (Supports Mods)", "category": "mc-fabric", @@ -1400,6 +1466,7 @@ { "language": "en_us", "description": "Minecraft 1.15.2 with Fabric Loader", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Fabric 1.15.2 (Supports Mods)", "category": "mc-fabric", @@ -1421,6 +1488,7 @@ { "language": "en_us", "description": "Minecraft 1.14.4 with Fabric Loader", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Fabric 1.14.4 (Supports Mods)", "category": "mc-fabric", @@ -1442,6 +1510,7 @@ { "language": "en_us", "description": "[Vanilla] Minecraft 1.21.8", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Minecraft 1.21.8", "category": "mc-vanilla", @@ -1463,6 +1532,7 @@ { "language": "en_us", "description": "[Vanilla] Minecraft 1.21.6", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Minecraft 1.21.6", "category": "mc-vanilla", @@ -1484,6 +1554,7 @@ { "language": "en_us", "description": "[Vanilla] Minecraft 1.21.5", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Minecraft 1.21.5", "category": "mc-vanilla", @@ -1505,6 +1576,7 @@ { "language": "en_us", "description": "[Vanilla] Minecraft 1.21.4", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Minecraft 1.21.4", "category": "mc-vanilla", @@ -1526,6 +1598,7 @@ { "language": "en_us", "description": "[Vanilla] Minecraft 1.21.1", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Minecraft 1.21.1", "category": "mc-vanilla", @@ -1547,6 +1620,7 @@ { "language": "en_us", "description": "[Vanilla] Minecraft 1.20.6", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Minecraft 1.20.6", "category": "mc-vanilla", @@ -1568,6 +1642,7 @@ { "language": "en_us", "description": "[Vanilla] Minecraft 1.20.4", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Minecraft 1.20.4", "category": "mc-vanilla", @@ -1589,6 +1664,7 @@ { "language": "en_us", "description": "[Vanilla] Minecraft 1.20.1", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Minecraft 1.20.1", "category": "mc-vanilla", @@ -1610,6 +1686,7 @@ { "language": "en_us", "description": "[Vanilla] Minecraft 1.19.4", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Minecraft 1.19.4", "category": "mc-vanilla", @@ -1631,6 +1708,7 @@ { "language": "en_us", "description": "[Vanilla] Minecraft 1.18.2", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Minecraft 1.18.2", "category": "mc-vanilla", @@ -1652,6 +1730,7 @@ { "language": "en_us", "description": "[Vanilla] Minecraft 1.17.1", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Minecraft 1.17.1", "category": "mc-vanilla", @@ -1673,6 +1752,7 @@ { "language": "en_us", "description": "[Vanilla] Minecraft 1.16.5", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Minecraft 1.16.5", "category": "mc-vanilla", @@ -1694,6 +1774,7 @@ { "language": "en_us", "description": "[Vanilla] Minecraft 1.12.2", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Minecraft 1.12.2", "category": "mc-vanilla", @@ -1715,6 +1796,7 @@ { "language": "en_us", "description": "[Vanilla] Minecraft 1.8.9", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Minecraft 1.8.9", "category": "mc-vanilla", @@ -1736,6 +1818,7 @@ { "language": "zh_cn", "description": "[Paper] Minecraft 1.21.1 快速开服", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Minecraft 1.21.1 快速开服", "category": "mc-paper", @@ -1757,6 +1840,7 @@ { "language": "zh_cn", "description": "[Paper] 中小型互通服推荐,1.20.4 版本,快速开服,包含ESS、锁箱子、操作回滚、领地商店等基础插件。", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Minecraft 1.20.4", "category": "mc-paper", @@ -1778,6 +1862,7 @@ { "language": "zh_cn", "description": "注意:默认的启动命令是 \"sh ./run.sh\",如果需要在 Windows 上运行,请在安装后将命令修改为 \"start.bat\"", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Forge 1.20.1 Java 版 (支持模组)", "category": "mc-forge", @@ -1799,6 +1884,7 @@ { "language": "zh_cn", "description": "注意:默认的启动命令是 \"sh ./run.sh\",如果需要在 Windows 上运行,请在安装后将命令修改为 \"start.bat\"", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Forge 1.20.6 Java 版 (支持模组)", "category": "mc-forge", @@ -1820,6 +1906,7 @@ { "language": "zh_cn", "description": "注意:默认的启动命令是 \"sh ./run.sh\",如果需要在 Windows 上运行,请在安装后将命令修改为 \"start.bat\"", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Forge 1.19.2 Java 版 (支持模组)", "category": "mc-forge", @@ -1842,6 +1929,7 @@ "language": "zh_cn", "title": "幻兽帕鲁官方服务器(Windows)", "description": "适用于 Windows 的帕鲁们的最佳服务器!", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/palworld.webp", "remark": "", "gameType": "Palworld", "category": "Windows", @@ -1863,6 +1951,7 @@ "language": "zh_cn", "title": "幻兽帕鲁官方服务器(Linux + Docker)", "description": "适用于 Windows 的帕鲁们的最佳服务器!本模板使用 Docker 安装,Linux 服务器必须安装 Docker!", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/palworld.webp", "remark": "", "gameType": "Palworld", "category": "Linux", From ba4224bec8515910a9538e1f2c86b68b4e5ff554 Mon Sep 17 00:00:00 2001 From: yumao233 Date: Wed, 30 Jul 2025 14:56:06 +0800 Subject: [PATCH 209/338] feat: new template file --- templates-test.json | 112 +++++++++++++++++++++++++++++++++++--------- 1 file changed, 89 insertions(+), 23 deletions(-) diff --git a/templates-test.json b/templates-test.json index 77d806a..43940aa 100644 --- a/templates-test.json +++ b/templates-test.json @@ -13,6 +13,7 @@ "packages": [ { "language": "en_us", + "platform": "ALL", "description": "[Purpur] Minecraft 1.21.8 Purpur", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -35,6 +36,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "[Purpur] Minecraft 1.21.6 Purpur", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -57,6 +59,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "[Purpur] Minecraft 1.21.5 Purpur", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -79,6 +82,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "[Purpur] Minecraft 1.21.4 Purpur", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -101,6 +105,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "[Purpur] Minecraft 1.21.3 Purpur", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -123,6 +128,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "[Purpur] Minecraft 1.21.1 Purpur", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -145,6 +151,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "[Purpur] Minecraft 1.20.6 Purpur", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -167,6 +174,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "[Purpur] Minecraft 1.20.4 Purpur", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -189,6 +197,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "[Purpur] Minecraft 1.20.1 Purpur", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -211,6 +220,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "[Purpur] Minecraft 1.19.2 Purpur", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -233,6 +243,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "[Purpur] Minecraft 1.18.2 Purpur", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -255,6 +266,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "[Purpur] Minecraft 1.17.1 Purpur", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -277,6 +289,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "[Purpur] Minecraft 1.16.5 Purpur", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -299,6 +312,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "[Paper] Minecraft 1.21.8 Paper", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -321,6 +335,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "[Paper] Minecraft 1.21.6 Paper", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -343,6 +358,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "[Paper] Minecraft 1.21.4 Paper", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -365,6 +381,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "[Paper] Minecraft 1.21.3 Paper", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -387,6 +404,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "[Paper] Minecraft 1.21.1 Paper", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -409,6 +427,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "[Paper] Minecraft 1.20.6 Paper", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -431,6 +450,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "[Paper] Minecraft 1.20.4 Paper", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -453,6 +473,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "[Paper] Minecraft 1.20.2 Paper", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -475,6 +496,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "[Paper] Minecraft 1.20.1 Paper", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -497,6 +519,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "[Paper] Minecraft 1.19.4 Paper", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -519,6 +542,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "[Paper] Minecraft 1.19.2 Paper", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -541,6 +565,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "[Paper] Minecraft 1.18.2 Paper", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -563,6 +588,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "[Paper] Minecraft 1.17.1 Paper", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -585,6 +611,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "[Paper] Minecraft 1.16.5 Paper", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -607,6 +634,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "[Paper] Minecraft 1.12.2 Paper", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -629,28 +657,7 @@ }, { "language": "en_us", - "description": "[Paper] Minecraft 1.8.8 Paper", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Minecraft 1.8.8", - "category": "mc-paper", - "runtime": "Java 7+", - "hardware": "RAM 4G+", - "size": "20MB", - "remark": "Only Paper included", - "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.8.8/builds/445/downloads/paper-1.8.8-445.jar", - "author": "papermc.io", - "setupInfo": { - "type": "minecraft/java/paper", - "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.8.8-445.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", + "platform": "Linux", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -673,6 +680,7 @@ }, { "language": "en_us", + "platform": "Linux", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -695,6 +703,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -717,6 +726,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -739,6 +749,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -761,6 +772,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -783,6 +795,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -805,6 +818,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -827,6 +841,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -849,6 +864,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -871,6 +887,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -893,6 +910,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -915,6 +933,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -937,6 +956,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -959,6 +979,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -981,6 +1002,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -1003,6 +1025,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -1025,6 +1048,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -1047,6 +1071,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -1069,6 +1094,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -1091,6 +1117,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -1113,6 +1140,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -1135,6 +1163,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -1157,6 +1186,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -1179,6 +1209,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "Minecraft 1.21.8 with Fabric Loader", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -1201,6 +1232,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "Minecraft 1.21.6 with Fabric Loader", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -1223,6 +1255,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "Minecraft 1.21.5 with Fabric Loader", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -1245,6 +1278,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "Minecraft 1.21.4 with Fabric Loader", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -1267,6 +1301,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "Minecraft 1.21.1 with Fabric Loader", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -1289,6 +1324,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "Minecraft 1.20.6 with Fabric Loader", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -1311,6 +1347,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "Minecraft 1.20.4 with Fabric Loader", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -1333,6 +1370,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "Minecraft 1.20.1 with Fabric Loader", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -1355,6 +1393,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "Minecraft 1.19.4 with Fabric Loader", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -1377,6 +1416,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "Minecraft 1.19.2 with Fabric Loader", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -1399,6 +1439,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "Minecraft 1.18.2 with Fabric Loader", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -1421,6 +1462,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "Minecraft 1.17.1 with Fabric Loader", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -1443,6 +1485,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "Minecraft 1.16.5 with Fabric Loader", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -1465,6 +1508,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "Minecraft 1.15.2 with Fabric Loader", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -1487,6 +1531,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "Minecraft 1.14.4 with Fabric Loader", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -1509,6 +1554,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "[Vanilla] Minecraft 1.21.8", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -1531,6 +1577,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "[Vanilla] Minecraft 1.21.6", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -1553,6 +1600,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "[Vanilla] Minecraft 1.21.5", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -1575,6 +1623,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "[Vanilla] Minecraft 1.21.4", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -1597,6 +1646,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "[Vanilla] Minecraft 1.21.1", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -1619,6 +1669,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "[Vanilla] Minecraft 1.20.6", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -1641,6 +1692,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "[Vanilla] Minecraft 1.20.4", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -1663,6 +1715,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "[Vanilla] Minecraft 1.20.1", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -1685,6 +1738,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "[Vanilla] Minecraft 1.19.4", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -1707,6 +1761,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "[Vanilla] Minecraft 1.18.2", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -1729,6 +1784,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "[Vanilla] Minecraft 1.17.1", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -1751,6 +1807,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "[Vanilla] Minecraft 1.16.5", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -1773,6 +1830,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "[Vanilla] Minecraft 1.12.2", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -1795,6 +1853,7 @@ }, { "language": "en_us", + "platform": "ALL", "description": "[Vanilla] Minecraft 1.8.9", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -1817,6 +1876,7 @@ }, { "language": "zh_cn", + "platform": "ALL", "description": "[Paper] Minecraft 1.21.1 快速开服", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -1839,6 +1899,7 @@ }, { "language": "zh_cn", + "platform": "ALL", "description": "[Paper] 中小型互通服推荐,1.20.4 版本,快速开服,包含ESS、锁箱子、操作回滚、领地商店等基础插件。", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -1861,6 +1922,7 @@ }, { "language": "zh_cn", + "platform": "ALL", "description": "注意:默认的启动命令是 \"sh ./run.sh\",如果需要在 Windows 上运行,请在安装后将命令修改为 \"start.bat\"", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -1883,6 +1945,7 @@ }, { "language": "zh_cn", + "platform": "ALL", "description": "注意:默认的启动命令是 \"sh ./run.sh\",如果需要在 Windows 上运行,请在安装后将命令修改为 \"start.bat\"", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -1905,6 +1968,7 @@ }, { "language": "zh_cn", + "platform": "ALL", "description": "注意:默认的启动命令是 \"sh ./run.sh\",如果需要在 Windows 上运行,请在安装后将命令修改为 \"start.bat\"", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -1928,6 +1992,7 @@ { "language": "zh_cn", "title": "幻兽帕鲁官方服务器(Windows)", + "platform": "Windows", "description": "适用于 Windows 的帕鲁们的最佳服务器!", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/palworld.webp", "remark": "", @@ -1949,7 +2014,8 @@ }, { "language": "zh_cn", - "title": "幻兽帕鲁官方服务器(Linux + Docker)", + "title": "幻兽帕鲁官方服务器(Docker)", + "platform": "Linux", "description": "适用于 Windows 的帕鲁们的最佳服务器!本模板使用 Docker 安装,Linux 服务器必须安装 Docker!", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/palworld.webp", "remark": "", From de5f01a226262adc76857f1ea88ba8e21fea5668 Mon Sep 17 00:00:00 2001 From: yumao233 Date: Wed, 30 Jul 2025 15:06:36 +0800 Subject: [PATCH 210/338] feat: new template file --- templates-test.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates-test.json b/templates-test.json index 43940aa..ba5d176 100644 --- a/templates-test.json +++ b/templates-test.json @@ -1997,7 +1997,7 @@ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/palworld.webp", "remark": "", "gameType": "Palworld", - "category": "Windows", + "category": "最新版本", "runtime": "Windows 10+", "hardware": "RAM 4G+", "size": "", @@ -2020,7 +2020,7 @@ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/palworld.webp", "remark": "", "gameType": "Palworld", - "category": "Linux", + "category": "最新版本", "runtime": "Ubuntu/Centos LTS", "hardware": "RAM 4G+", "size": "", From 2797b071e5aea82cc3ca0cd4f71370a377ec36ed Mon Sep 17 00:00:00 2001 From: YuMao233 Date: Sun, 3 Aug 2025 15:49:24 +0800 Subject: [PATCH 211/338] feat: test new templates --- templates-test.json | 92 ++++++++++++++++++++++----------------------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/templates-test.json b/templates-test.json index ba5d176..55355ce 100644 --- a/templates-test.json +++ b/templates-test.json @@ -11,6 +11,52 @@ } ], "packages": [ + { + "language": "zh_cn", + "title": "幻兽帕鲁官方服务器(Windows)", + "platform": "Windows", + "description": "适用于 Windows 的帕鲁们的最佳服务器!", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/palworld.webp", + "remark": "", + "gameType": "Palworld", + "category": "最新版本", + "runtime": "Windows 10+", + "hardware": "RAM 4G+", + "size": "", + "targetLink": "", + "author": "MCSManager", + "setupInfo": { + "type": "steam/universal", + "startCommand": "PalServer.exe", + "stopCommand": "exit", + "updateCommand": "{mcsm_steamcmd} steamcmd +login anonymous +force_install_dir \"{mcsm_workspace}\" +app_update 2394010 +quit", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "zh_cn", + "title": "幻兽帕鲁官方服务器(Docker)", + "platform": "Linux", + "description": "适用于 Windows 的帕鲁们的最佳服务器!本模板使用 Docker 安装,Linux 服务器必须安装 Docker!", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/palworld.webp", + "remark": "", + "gameType": "Palworld", + "category": "最新版本", + "runtime": "Ubuntu/Centos LTS", + "hardware": "RAM 4G+", + "size": "", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.8-2481.jar", + "author": "purpurmc.org", + "setupInfo": { + "type": "minecraft/java/purpur", + "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.8-2481.jar nogui", + "stopCommand": "stop", + "updateCommand": "{mcsm_steamcmd} steamcmd +login anonymous +force_install_dir \"{mcsm_workspace}\" +app_update 2394010 +quit", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "language": "en_us", "platform": "ALL", @@ -1988,52 +2034,6 @@ "ie": "utf-8", "oe": "utf-8" } - }, - { - "language": "zh_cn", - "title": "幻兽帕鲁官方服务器(Windows)", - "platform": "Windows", - "description": "适用于 Windows 的帕鲁们的最佳服务器!", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/palworld.webp", - "remark": "", - "gameType": "Palworld", - "category": "最新版本", - "runtime": "Windows 10+", - "hardware": "RAM 4G+", - "size": "", - "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.8-2481.jar", - "author": "purpurmc.org", - "setupInfo": { - "type": "minecraft/java/purpur", - "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.8-2481.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "zh_cn", - "title": "幻兽帕鲁官方服务器(Docker)", - "platform": "Linux", - "description": "适用于 Windows 的帕鲁们的最佳服务器!本模板使用 Docker 安装,Linux 服务器必须安装 Docker!", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/palworld.webp", - "remark": "", - "gameType": "Palworld", - "category": "最新版本", - "runtime": "Ubuntu/Centos LTS", - "hardware": "RAM 4G+", - "size": "", - "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.8-2481.jar", - "author": "purpurmc.org", - "setupInfo": { - "type": "minecraft/java/purpur", - "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.8-2481.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } } ] } From 5aa44ceb512e442c9c279bab2ae3f3a954574a9e Mon Sep 17 00:00:00 2001 From: YuMao233 Date: Sun, 3 Aug 2025 16:13:43 +0800 Subject: [PATCH 212/338] feat: test new templates --- templates-test.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates-test.json b/templates-test.json index 55355ce..6200834 100644 --- a/templates-test.json +++ b/templates-test.json @@ -29,7 +29,7 @@ "type": "steam/universal", "startCommand": "PalServer.exe", "stopCommand": "exit", - "updateCommand": "{mcsm_steamcmd} steamcmd +login anonymous +force_install_dir \"{mcsm_workspace}\" +app_update 2394010 +quit", + "updateCommand": "{mcsm_steamcmd} +login anonymous +force_install_dir \"{mcsm_workspace}\" +app_update 2394010 +quit", "ie": "utf-8", "oe": "utf-8" } From 4d5a3c4aafd1d09de893771b51fd50e302bf894d Mon Sep 17 00:00:00 2001 From: yumao233 Date: Tue, 5 Aug 2025 17:02:52 +0800 Subject: [PATCH 213/338] feat: add gametype --- templates.json | 87 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) diff --git a/templates.json b/templates.json index 788d5de..6bd8682 100644 --- a/templates.json +++ b/templates.json @@ -13,6 +13,7 @@ "packages": [ { "language": "en_us", + "gameType": "Minecraft", "description": "[Purpur] Minecraft 1.21.8 Purpur", "title": "Minecraft 1.21.8", "category": "mc-purpur", @@ -33,6 +34,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "[Purpur] Minecraft 1.21.6 Purpur", "title": "Minecraft 1.21.6", "category": "mc-purpur", @@ -53,6 +55,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "[Purpur] Minecraft 1.21.5 Purpur", "title": "Minecraft 1.21.5", "category": "mc-purpur", @@ -73,6 +76,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "[Purpur] Minecraft 1.21.4 Purpur", "title": "Minecraft 1.21.4", "category": "mc-purpur", @@ -93,6 +97,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "[Purpur] Minecraft 1.21.3 Purpur", "title": "Minecraft 1.21.3", "category": "mc-purpur", @@ -113,6 +118,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "[Purpur] Minecraft 1.21.1 Purpur", "title": "Minecraft 1.21.1", "category": "mc-purpur", @@ -133,6 +139,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "[Purpur] Minecraft 1.20.6 Purpur", "title": "Minecraft 1.20.6", "category": "mc-purpur", @@ -153,6 +160,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "[Purpur] Minecraft 1.20.4 Purpur", "title": "Minecraft 1.20.4", "category": "mc-purpur", @@ -173,6 +181,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "[Purpur] Minecraft 1.20.1 Purpur", "title": "Minecraft 1.20.1", "category": "mc-purpur", @@ -193,6 +202,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "[Purpur] Minecraft 1.19.2 Purpur", "title": "Minecraft 1.19.2", "category": "mc-purpur", @@ -213,6 +223,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "[Purpur] Minecraft 1.18.2 Purpur", "title": "Minecraft 1.18.2", "category": "mc-purpur", @@ -233,6 +244,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "[Purpur] Minecraft 1.17.1 Purpur", "title": "Minecraft 1.17.1", "category": "mc-purpur", @@ -253,6 +265,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "[Purpur] Minecraft 1.16.5 Purpur", "title": "Minecraft 1.16.5", "category": "mc-purpur", @@ -273,6 +286,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "[Paper] Minecraft 1.21.8 Paper", "title": "Minecraft 1.21.8", "category": "mc-paper", @@ -293,6 +307,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "[Paper] Minecraft 1.21.6 Paper", "title": "Minecraft 1.21.6", "category": "mc-paper", @@ -313,6 +328,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "[Paper] Minecraft 1.21.4 Paper", "title": "Minecraft 1.21.4", "category": "mc-paper", @@ -333,6 +349,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "[Paper] Minecraft 1.21.3 Paper", "title": "Minecraft 1.21.3", "category": "mc-paper", @@ -353,6 +370,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "[Paper] Minecraft 1.21.1 Paper", "title": "Minecraft 1.21.1", "category": "mc-paper", @@ -373,6 +391,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "[Paper] Minecraft 1.20.6 Paper", "title": "Minecraft 1.20.6", "category": "mc-paper", @@ -393,6 +412,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "[Paper] Minecraft 1.20.4 Paper", "title": "Minecraft 1.20.4", "category": "mc-paper", @@ -413,6 +433,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "[Paper] Minecraft 1.20.2 Paper", "title": "Minecraft 1.20.2", "category": "mc-paper", @@ -433,6 +454,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "[Paper] Minecraft 1.20.1 Paper", "title": "Minecraft 1.20.1", "category": "mc-paper", @@ -453,6 +475,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "[Paper] Minecraft 1.19.4 Paper", "title": "Minecraft 1.19.4", "category": "mc-paper", @@ -473,6 +496,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "[Paper] Minecraft 1.19.2 Paper", "title": "Minecraft 1.19.2", "category": "mc-paper", @@ -493,6 +517,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "[Paper] Minecraft 1.18.2 Paper", "title": "Minecraft 1.18.2", "category": "mc-paper", @@ -513,6 +538,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "[Paper] Minecraft 1.17.1 Paper", "title": "Minecraft 1.17.1", "category": "mc-paper", @@ -533,6 +559,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "[Paper] Minecraft 1.16.5 Paper", "title": "Minecraft 1.16.5", "category": "mc-paper", @@ -553,6 +580,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "[Paper] Minecraft 1.12.2 Paper", "title": "Minecraft 1.12.2", "category": "mc-paper", @@ -573,6 +601,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "[Paper] Minecraft 1.8.8 Paper", "title": "Minecraft 1.8.8", "category": "mc-paper", @@ -593,6 +622,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "NeoForge 1.21.8 (Supports Mods)", "category": "mc-neoforge", @@ -613,6 +643,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "NeoForge 1.21.6 (Supports Mods)", "category": "mc-neoforge", @@ -633,6 +664,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "NeoForge 1.21.5 (Supports Mods)", "category": "mc-neoforge", @@ -653,6 +685,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "NeoForge 1.21.4 (Supports Mods)", "category": "mc-neoforge", @@ -673,6 +706,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "NeoForge 1.21.1 (Supports Mods)", "category": "mc-neoforge", @@ -693,6 +727,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "NeoForge 1.20.6 (Supports Mods)", "category": "mc-neoforge", @@ -713,6 +748,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "NeoForge 1.20.4 (Supports Mods)", "category": "mc-neoforge", @@ -733,6 +769,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "NeoForge 1.20.2 (Supports Mods)", "category": "mc-neoforge", @@ -753,6 +790,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "Forge 1.21.8 (Supports Mods)", "category": "mc-forge", @@ -773,6 +811,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "Forge 1.21.6 (Supports Mods)", "category": "mc-forge", @@ -793,6 +832,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "Forge 1.21.5 (Supports Mods)", "category": "mc-forge", @@ -813,6 +853,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "Forge 1.21.4 (Supports Mods)", "category": "mc-forge", @@ -833,6 +874,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "Forge 1.21.1 (Supports Mods)", "category": "mc-forge", @@ -853,6 +895,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "Forge 1.20.6 (Supports Mods)", "category": "mc-forge", @@ -873,6 +916,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "Forge 1.20.4 (Supports Mods)", "category": "mc-forge", @@ -893,6 +937,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "Forge 1.20.1 (Supports Mods)", "category": "mc-forge", @@ -913,6 +958,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "Forge 1.19.4 (Supports Mods)", "category": "mc-forge", @@ -933,6 +979,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "Forge 1.19.2 (Supports Mods)", "category": "mc-forge", @@ -953,6 +1000,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "Forge 1.18.2 (Supports Mods)", "category": "mc-forge", @@ -973,6 +1021,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "Forge 1.17.1 (Supports Mods)", "category": "mc-forge", @@ -993,6 +1042,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "Forge 1.16.5 (Supports Mods)", "category": "mc-forge", @@ -1013,6 +1063,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "Forge 1.12.2 (Supports Mods)", "category": "mc-forge", @@ -1033,6 +1084,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "Forge 1.8.9 (Supports Mods)", "category": "mc-forge", @@ -1053,6 +1105,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", "title": "Forge 1.7.10 (Supports Mods)", "category": "mc-forge", @@ -1073,6 +1126,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "Minecraft 1.21.8 with Fabric Loader", "title": "Fabric 1.21.8 (Supports Mods)", "category": "mc-fabric", @@ -1093,6 +1147,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "Minecraft 1.21.6 with Fabric Loader", "title": "Fabric 1.21.6 (Supports Mods)", "category": "mc-fabric", @@ -1113,6 +1168,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "Minecraft 1.21.5 with Fabric Loader", "title": "Fabric 1.21.5 (Supports Mods)", "category": "mc-fabric", @@ -1133,6 +1189,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "Minecraft 1.21.4 with Fabric Loader", "title": "Fabric 1.21.4 (Supports Mods)", "category": "mc-fabric", @@ -1153,6 +1210,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "Minecraft 1.21.1 with Fabric Loader", "title": "Fabric 1.21.1 (Supports Mods)", "category": "mc-fabric", @@ -1173,6 +1231,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "Minecraft 1.20.6 with Fabric Loader", "title": "Fabric 1.20.6 (Supports Mods)", "category": "mc-fabric", @@ -1193,6 +1252,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "Minecraft 1.20.4 with Fabric Loader", "title": "Fabric 1.20.4 (Supports Mods)", "category": "mc-fabric", @@ -1213,6 +1273,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "Minecraft 1.20.1 with Fabric Loader", "title": "Fabric 1.20.1 (Supports Mods)", "category": "mc-fabric", @@ -1233,6 +1294,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "Minecraft 1.19.4 with Fabric Loader", "title": "Fabric 1.19.4 (Supports Mods)", "category": "mc-fabric", @@ -1253,6 +1315,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "Minecraft 1.19.2 with Fabric Loader", "title": "Fabric 1.19.2 (Supports Mods)", "category": "mc-fabric", @@ -1273,6 +1336,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "Minecraft 1.18.2 with Fabric Loader", "title": "Fabric 1.18.2 (Supports Mods)", "category": "mc-fabric", @@ -1293,6 +1357,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "Minecraft 1.17.1 with Fabric Loader", "title": "Fabric 1.17.1 (Supports Mods)", "category": "mc-fabric", @@ -1313,6 +1378,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "Minecraft 1.16.5 with Fabric Loader", "title": "Fabric 1.16.5 (Supports Mods)", "category": "mc-fabric", @@ -1333,6 +1399,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "Minecraft 1.15.2 with Fabric Loader", "title": "Fabric 1.15.2 (Supports Mods)", "category": "mc-fabric", @@ -1353,6 +1420,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "Minecraft 1.14.4 with Fabric Loader", "title": "Fabric 1.14.4 (Supports Mods)", "category": "mc-fabric", @@ -1373,6 +1441,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "[Vanilla] Minecraft 1.21.8", "title": "Minecraft 1.21.8", "category": "mc-vanilla", @@ -1393,6 +1462,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "[Vanilla] Minecraft 1.21.6", "title": "Minecraft 1.21.6", "category": "mc-vanilla", @@ -1413,6 +1483,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "[Vanilla] Minecraft 1.21.5", "title": "Minecraft 1.21.5", "category": "mc-vanilla", @@ -1433,6 +1504,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "[Vanilla] Minecraft 1.21.4", "title": "Minecraft 1.21.4", "category": "mc-vanilla", @@ -1453,6 +1525,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "[Vanilla] Minecraft 1.21.1", "title": "Minecraft 1.21.1", "category": "mc-vanilla", @@ -1473,6 +1546,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "[Vanilla] Minecraft 1.20.6", "title": "Minecraft 1.20.6", "category": "mc-vanilla", @@ -1493,6 +1567,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "[Vanilla] Minecraft 1.20.4", "title": "Minecraft 1.20.4", "category": "mc-vanilla", @@ -1513,6 +1588,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "[Vanilla] Minecraft 1.20.1", "title": "Minecraft 1.20.1", "category": "mc-vanilla", @@ -1533,6 +1609,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "[Vanilla] Minecraft 1.19.4", "title": "Minecraft 1.19.4", "category": "mc-vanilla", @@ -1553,6 +1630,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "[Vanilla] Minecraft 1.18.2", "title": "Minecraft 1.18.2", "category": "mc-vanilla", @@ -1573,6 +1651,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "[Vanilla] Minecraft 1.17.1", "title": "Minecraft 1.17.1", "category": "mc-vanilla", @@ -1593,6 +1672,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "[Vanilla] Minecraft 1.16.5", "title": "Minecraft 1.16.5", "category": "mc-vanilla", @@ -1613,6 +1693,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "[Vanilla] Minecraft 1.12.2", "title": "Minecraft 1.12.2", "category": "mc-vanilla", @@ -1633,6 +1714,7 @@ }, { "language": "en_us", + "gameType": "Minecraft", "description": "[Vanilla] Minecraft 1.8.9", "title": "Minecraft 1.8.9", "category": "mc-vanilla", @@ -1653,6 +1735,7 @@ }, { "language": "zh_cn", + "gameType": "Minecraft", "description": "[Paper] Minecraft 1.21.1 快速开服", "title": "Minecraft 1.20.1", "category": "mc-paper", @@ -1673,6 +1756,7 @@ }, { "language": "zh_cn", + "gameType": "Minecraft", "description": "[Paper] 中小型互通服推荐,1.20.4 版本,快速开服,包含ESS、锁箱子、操作回滚、领地商店等基础插件。", "title": "Minecraft 1.20.4 (低配机器推荐)", "category": "mc-paper", @@ -1693,6 +1777,7 @@ }, { "language": "zh_cn", + "gameType": "Minecraft", "description": "注意:默认的启动命令是 \"sh ./run.sh\",如果需要在 Windows 上运行,请在安装后将命令修改为 \"start.bat\"", "title": "Forge 1.20.1 Java 版 (支持模组)", "category": "mc-forge", @@ -1713,6 +1798,7 @@ }, { "language": "zh_cn", + "gameType": "Minecraft", "description": "注意:默认的启动命令是 \"sh ./run.sh\",如果需要在 Windows 上运行,请在安装后将命令修改为 \"start.bat\"", "title": "Forge 1.20.6 Java 版 (支持模组)", "category": "mc-forge", @@ -1733,6 +1819,7 @@ }, { "language": "zh_cn", + "gameType": "Minecraft", "description": "注意:默认的启动命令是 \"sh ./run.sh\",如果需要在 Windows 上运行,请在安装后将命令修改为 \"start.bat\"", "title": "Forge 1.19.2 Java 版 (支持模组)", "category": "mc-forge", From 56acd41ab791ba3deb8c4ec7d5e84bd9991f3fb6 Mon Sep 17 00:00:00 2001 From: yumao233 Date: Tue, 5 Aug 2025 20:38:58 +0800 Subject: [PATCH 214/338] dev: new pack --- templates-test.json | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/templates-test.json b/templates-test.json index 6200834..c3861d8 100644 --- a/templates-test.json +++ b/templates-test.json @@ -38,23 +38,40 @@ "language": "zh_cn", "title": "幻兽帕鲁官方服务器(Docker)", "platform": "Linux", - "description": "适用于 Windows 的帕鲁们的最佳服务器!本模板使用 Docker 安装,Linux 服务器必须安装 Docker!", + "description": "适用于 Windows 的帕鲁们的最佳服务器!本模板使用 Docker 安装,Linux 服务器必须安装 Docker!安装后默认的密码是 123456", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/palworld.webp", - "remark": "", "gameType": "Palworld", "category": "最新版本", "runtime": "Ubuntu/Centos LTS", "hardware": "RAM 4G+", "size": "", - "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.8-2481.jar", - "author": "purpurmc.org", + "targetLink": "", + "author": "MCSManager", "setupInfo": { - "type": "minecraft/java/purpur", - "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.8-2481.jar nogui", "stopCommand": "stop", - "updateCommand": "{mcsm_steamcmd} steamcmd +login anonymous +force_install_dir \"{mcsm_workspace}\" +app_update 2394010 +quit", - "ie": "utf-8", - "oe": "utf-8" + "ie": "utf8", + "oe": "utf8", + "type": "steam/game", + "tag": ["palworld"], + "fileCode": "utf8", + "processType": "docker", + "updateCommand": "", + "docker": { + "image": "kagurazakanyaa/palworld:latest", + "containerName": "palworld-server", + "ports": ["{mcsm_port1}:8211/tcp", "{mcsm_port2}:25575/tcp"], + "extraVolumes": [], + "memory": 8192, + "networkMode": "bridge", + "cpuUsage": 100, + "workingDir": "/opt/palworld/Pal/Saved", + "env": [ + "SERVER_NAME=Private PalWorld Server", + "SERVER_DESC=Private PalWorld Server", + "ADMIN_PASSWORD=123456" + ], + "changeWorkdir": false + } } }, { From ad82ab50d9a01ba1cafb56f6bbba09867cc715e5 Mon Sep 17 00:00:00 2001 From: yumao233 Date: Tue, 5 Aug 2025 21:19:53 +0800 Subject: [PATCH 215/338] dev: new pack --- templates-test.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates-test.json b/templates-test.json index c3861d8..e059b78 100644 --- a/templates-test.json +++ b/templates-test.json @@ -51,7 +51,7 @@ "stopCommand": "stop", "ie": "utf8", "oe": "utf8", - "type": "steam/game", + "type": "steam/universal", "tag": ["palworld"], "fileCode": "utf8", "processType": "docker", From dca59d7277feafe5e4a0e2bddece543a374ac496 Mon Sep 17 00:00:00 2001 From: yumao233 Date: Tue, 5 Aug 2025 21:52:54 +0800 Subject: [PATCH 216/338] dev: new pack --- templates-test.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates-test.json b/templates-test.json index e059b78..5547c4f 100644 --- a/templates-test.json +++ b/templates-test.json @@ -38,7 +38,7 @@ "language": "zh_cn", "title": "幻兽帕鲁官方服务器(Docker)", "platform": "Linux", - "description": "适用于 Windows 的帕鲁们的最佳服务器!本模板使用 Docker 安装,Linux 服务器必须安装 Docker!安装后默认的密码是 123456", + "description": "适用于 Windows 的帕鲁们的最佳服务器!本模板使用 Docker 安装,Linux 服务器必须安装 Docker!安装后默认的密码是 123456,修改请前往环境变量处修改。", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/palworld.webp", "gameType": "Palworld", "category": "最新版本", @@ -47,6 +47,7 @@ "size": "", "targetLink": "", "author": "MCSManager", + "tags": ["适用于商业出租", "Docker 版"], "setupInfo": { "stopCommand": "stop", "ie": "utf8", From b4164b81e7c8f8e7dc336c5f5df2819c3d26c981 Mon Sep 17 00:00:00 2001 From: yumao233 Date: Tue, 5 Aug 2025 22:36:54 +0800 Subject: [PATCH 217/338] dev: new pack --- templates-test.json | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/templates-test.json b/templates-test.json index 5547c4f..dd4d1d6 100644 --- a/templates-test.json +++ b/templates-test.json @@ -13,7 +13,7 @@ "packages": [ { "language": "zh_cn", - "title": "幻兽帕鲁官方服务器(Windows)", + "title": "幻兽帕鲁官方服务器", "platform": "Windows", "description": "适用于 Windows 的帕鲁们的最佳服务器!", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/palworld.webp", @@ -25,6 +25,7 @@ "size": "", "targetLink": "", "author": "MCSManager", + "tags": ["仅适合个人使用", "Windows 版"], "setupInfo": { "type": "steam/universal", "startCommand": "PalServer.exe", @@ -36,7 +37,7 @@ }, { "language": "zh_cn", - "title": "幻兽帕鲁官方服务器(Docker)", + "title": "幻兽帕鲁官方服务器", "platform": "Linux", "description": "适用于 Windows 的帕鲁们的最佳服务器!本模板使用 Docker 安装,Linux 服务器必须安装 Docker!安装后默认的密码是 123456,修改请前往环境变量处修改。", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/palworld.webp", @@ -47,7 +48,7 @@ "size": "", "targetLink": "", "author": "MCSManager", - "tags": ["适用于商业出租", "Docker 版"], + "tags": ["可以商业出租", "Docker 版"], "setupInfo": { "stopCommand": "stop", "ie": "utf8", @@ -59,19 +60,16 @@ "updateCommand": "", "docker": { "image": "kagurazakanyaa/palworld:latest", - "containerName": "palworld-server", - "ports": ["{mcsm_port1}:8211/tcp", "{mcsm_port2}:25575/tcp"], - "extraVolumes": [], - "memory": 8192, + "changeWorkdir": false, "networkMode": "bridge", - "cpuUsage": 100, + "containerName": "palworld-server", "workingDir": "/opt/palworld/Pal/Saved", + "ports": ["{mcsm_port1}:8211/tcp", "{mcsm_port2}:25575/tcp"], "env": [ "SERVER_NAME=Private PalWorld Server", "SERVER_DESC=Private PalWorld Server", "ADMIN_PASSWORD=123456" - ], - "changeWorkdir": false + ] } } }, From 408ed33424ce45fccdef9b75c861d1aa3bc5f376 Mon Sep 17 00:00:00 2001 From: yumao233 Date: Thu, 7 Aug 2025 20:12:56 +0800 Subject: [PATCH 218/338] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E6=96=87=E4=BB=B6=20templates-test.json?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates-config.json | 287 ++++++ templates-test.json | 2055 ----------------------------------------- 2 files changed, 287 insertions(+), 2055 deletions(-) create mode 100644 templates-config.json delete mode 100644 templates-test.json diff --git a/templates-config.json b/templates-config.json new file mode 100644 index 0000000..9cb265d --- /dev/null +++ b/templates-config.json @@ -0,0 +1,287 @@ +{ + "languages": [ + { + "label": "English", + "value": "en_us", + "path": "templates-en.json" + }, + { + "label": "中文", + "value": "zh_cn", + "path": "templates-zh.json" + } + ], + "packages": [ + { + "title": "幻兽帕鲁官方服务器", + "platform": "Windows", + "description": "适用于 Windows 的帕鲁们的最佳服务器!", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/palworld.webp", + "remark": "", + "gameType": "Palworld", + "category": "最新版本", + "runtime": "Windows 10+", + "hardware": "RAM 4G+", + "size": "", + "targetLink": "", + "author": "MCSManager", + "tags": ["仅适合个人使用", "Windows 版"], + "setupInfo": { + "tag": ["Palworld"], + "type": "steam/universal", + "startCommand": "PalServer.exe", + "stopCommand": "exit", + "updateCommand": "{mcsm_steamcmd} +login anonymous +force_install_dir \"{mcsm_workspace}\" +app_update 2394010 +quit", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "title": "幻兽帕鲁官方服务器", + "platform": "Linux", + "description": "本模板使用 Docker 安装,Linux 服务器必须安装 Docker!安装后默认的密码是 123456,修改请前往环境变量处修改。", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/palworld.webp", + "gameType": "Palworld", + "category": "最新版本", + "runtime": "Ubuntu/Centos LTS", + "hardware": "RAM 4G+", + "size": "", + "targetLink": "", + "author": "MCSManager", + "tags": ["可以商业出租", "Docker 版"], + "setupInfo": { + "stopCommand": "stop", + "ie": "utf8", + "oe": "utf8", + "type": "steam/universal", + "tag": ["Palworld"], + "fileCode": "utf8", + "processType": "docker", + "updateCommand": "", + "docker": { + "image": "kagurazakanyaa/palworld:latest", + "changeWorkdir": false, + "networkMode": "bridge", + "containerName": "palworld-server", + "workingDir": "/opt/palworld/Pal/Saved", + "ports": ["{mcsm_port1}:8211/tcp", "{mcsm_port2}:25575/tcp"], + "env": [ + "SERVER_NAME=Private PalWorld Server", + "SERVER_DESC=Private PalWorld Server", + "ADMIN_PASSWORD=123456" + ] + } + } + }, + { + "title": "僵尸毁灭工程", + "platform": "Linux", + "description": "适用于 Linux 系统,使用《僵尸毁灭工程》第三方 Docker 镜像,快速开服!", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/pzomboid.webp", + "gameType": "Zombie Survival", + "category": "最新版本", + "runtime": "Ubuntu/Centos LTS", + "hardware": "RAM 4G+", + "size": "", + "targetLink": "", + "author": "MCSManager", + "tags": ["可以商业出租", "Docker 版"], + "setupInfo": { + "startCommand": "", + "stopCommand": "stop", + "ie": "utf8", + "oe": "utf8", + "type": "steam/universal", + "tag": ["Project Zomboid"], + "fileCode": "utf8", + "processType": "docker", + "updateCommand": "", + "docker": { + "image": "renegademaster/zomboid-dedicated-server:latest", + "containerName": "zomboid-dedicated-server", + "ports": ["{mcsm_port2}:16262/udp", "{mcsm_port1}:16261/udp"], + "extraVolumes": [ + "{mcsm_workspace}/ZomboidConfig|/home/steam/Zomboid", + "{mcsm_workspace}/ZomboidDedicatedServer|/home/steam/ZomboidDedicatedServer" + ], + "memory": 4096, + "networkMode": "bridge", + "cpuUsage": 100, + "workingDir": "", + "env": [], + "changeWorkdir": false + } + } + }, + + { + "title": "Terraria 服务器", + "platform": "Linux", + "description": "适用于 Linux 系统,使用《Terraria》第三方 Docker 镜像,快速开服!", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/terraria.webp", + "gameType": "Terraria", + "category": "最新版本", + "runtime": "Ubuntu/Centos LTS", + "hardware": "RAM 4G+", + "size": "", + "targetLink": "", + "author": "MCSManager", + "tags": ["可以商业出租", "Docker 版"], + "setupInfo": { + "startCommand": "", + "stopCommand": "exit", + "ie": "utf8", + "oe": "utf8", + "type": "steam/terraria", + "tag": ["terraria"], + "fileCode": "utf8", + "processType": "docker", + "updateCommand": "", + "docker": { + "image": "ryshe/terraria:latest", + "containerName": "terraria-server", + "ports": ["{mcsm_port1}:7777/tcp"], + "extraVolumes": [], + "memory": 4096, + "networkMode": "bridge", + "cpuUsage": 100, + "workingDir": "/root/.local/share/Terraria/Worlds", + "env": [], + "changeWorkdir": false + } + } + }, + + { + "platform": "ALL", + "description": "[Paper] Minecraft 1.21.1 快速开服", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "gameType": "Minecraft", + "title": "Minecraft 1.21.1 快速开服", + "category": "mc-paper", + "runtime": "Java 17+", + "hardware": "RAM 4G+", + "size": "250MB", + "remark": "包含基础插件,萌新快速开服!低配机器专属!", + "targetLink": "https://cloud.alongw.cn/f/DzvHK/Paper-1.21.1-ZH.zip", + "author": "alongw.cn", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -Xms4096M -Xmx4096M -jar server.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "ALL", + "description": "[Paper] 中小型互通服推荐,1.20.4 版本,快速开服,包含ESS、锁箱子、操作回滚、领地商店等基础插件。", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "gameType": "Minecraft", + "title": "Minecraft 1.20.4", + "category": "mc-paper", + "runtime": "Java 21+", + "hardware": "RAM 6G+", + "size": "140MB", + "remark": "支持插件,最低 8GB 内存要求", + "targetLink": "https://url.alww.top/mcsm/paper1.20.4.zip", + "author": "alongw.cn", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -Xms6144M -Xmx6144M -jar server.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "ALL", + "description": "注意:默认的启动命令是 \"sh ./run.sh\",如果需要在 Windows 上运行,请在安装后将命令修改为 \"start.bat\"", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "gameType": "Minecraft", + "title": "Forge 1.20.1 Java 版 (支持模组)", + "category": "mc-forge", + "runtime": "Java 17+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.1-47.3.33/forge-1.20.1-47.3.33-installer.jar", + "author": "minecraftforge.net", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.20.1-47.3.33-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "ALL", + "description": "注意:默认的启动命令是 \"sh ./run.sh\",如果需要在 Windows 上运行,请在安装后将命令修改为 \"start.bat\"", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "gameType": "Minecraft", + "title": "Forge 1.20.6 Java 版 (支持模组)", + "category": "mc-forge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.6-50.1.48/forge-1.20.6-50.1.48-installer.jar", + "author": "minecraftforge.net", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.20.6-50.1.48-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "ALL", + "description": "注意:默认的启动命令是 \"sh ./run.sh\",如果需要在 Windows 上运行,请在安装后将命令修改为 \"start.bat\"", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "gameType": "Minecraft", + "title": "Forge 1.19.2 Java 版 (支持模组)", + "category": "mc-forge", + "runtime": "Java 17+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.19.2-43.4.20/forge-1.19.2-43.4.20-installer.jar", + "author": "minecraftforge.net", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.19.2-43.4.20-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "gameType": "Minecraft", + "description": "[Purpur] Minecraft 1.21.8 Purpur", + "title": "Minecraft 1.21.8", + "category": "mc-purpur", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "55MB", + "remark": "Only Purpur included", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.8-2481.jar", + "author": "purpurmc.org", + "setupInfo": { + "type": "minecraft/java/purpur", + "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.8-2481.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + } + ] +} diff --git a/templates-test.json b/templates-test.json deleted file mode 100644 index dd4d1d6..0000000 --- a/templates-test.json +++ /dev/null @@ -1,2055 +0,0 @@ -{ - "name": "MCSManager Game Server Template Marketplace", - "languages": [ - { - "label": "English", - "value": "en_us" - }, - { - "label": "简体中文", - "value": "zh_cn" - } - ], - "packages": [ - { - "language": "zh_cn", - "title": "幻兽帕鲁官方服务器", - "platform": "Windows", - "description": "适用于 Windows 的帕鲁们的最佳服务器!", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/palworld.webp", - "remark": "", - "gameType": "Palworld", - "category": "最新版本", - "runtime": "Windows 10+", - "hardware": "RAM 4G+", - "size": "", - "targetLink": "", - "author": "MCSManager", - "tags": ["仅适合个人使用", "Windows 版"], - "setupInfo": { - "type": "steam/universal", - "startCommand": "PalServer.exe", - "stopCommand": "exit", - "updateCommand": "{mcsm_steamcmd} +login anonymous +force_install_dir \"{mcsm_workspace}\" +app_update 2394010 +quit", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "zh_cn", - "title": "幻兽帕鲁官方服务器", - "platform": "Linux", - "description": "适用于 Windows 的帕鲁们的最佳服务器!本模板使用 Docker 安装,Linux 服务器必须安装 Docker!安装后默认的密码是 123456,修改请前往环境变量处修改。", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/palworld.webp", - "gameType": "Palworld", - "category": "最新版本", - "runtime": "Ubuntu/Centos LTS", - "hardware": "RAM 4G+", - "size": "", - "targetLink": "", - "author": "MCSManager", - "tags": ["可以商业出租", "Docker 版"], - "setupInfo": { - "stopCommand": "stop", - "ie": "utf8", - "oe": "utf8", - "type": "steam/universal", - "tag": ["palworld"], - "fileCode": "utf8", - "processType": "docker", - "updateCommand": "", - "docker": { - "image": "kagurazakanyaa/palworld:latest", - "changeWorkdir": false, - "networkMode": "bridge", - "containerName": "palworld-server", - "workingDir": "/opt/palworld/Pal/Saved", - "ports": ["{mcsm_port1}:8211/tcp", "{mcsm_port2}:25575/tcp"], - "env": [ - "SERVER_NAME=Private PalWorld Server", - "SERVER_DESC=Private PalWorld Server", - "ADMIN_PASSWORD=123456" - ] - } - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "[Purpur] Minecraft 1.21.8 Purpur", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Minecraft 1.21.8", - "category": "mc-purpur", - "runtime": "Java 21+", - "hardware": "RAM 4G+", - "size": "55MB", - "remark": "Only Purpur included", - "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.8-2481.jar", - "author": "purpurmc.org", - "setupInfo": { - "type": "minecraft/java/purpur", - "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.8-2481.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "[Purpur] Minecraft 1.21.6 Purpur", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Minecraft 1.21.6", - "category": "mc-purpur", - "runtime": "Java 21+", - "hardware": "RAM 4G+", - "size": "55MB", - "remark": "Only Purpur included", - "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.6-2465.jar", - "author": "purpurmc.org", - "setupInfo": { - "type": "minecraft/java/purpur", - "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.6-2465.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "[Purpur] Minecraft 1.21.5 Purpur", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Minecraft 1.21.5", - "category": "mc-purpur", - "runtime": "Java 21+", - "hardware": "RAM 4G+", - "size": "55MB", - "remark": "Only Purpur included", - "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.5-2450.jar", - "author": "purpurmc.org", - "setupInfo": { - "type": "minecraft/java/purpur", - "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.5-2450.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "[Purpur] Minecraft 1.21.4 Purpur", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Minecraft 1.21.4", - "category": "mc-purpur", - "runtime": "Java 21+", - "hardware": "RAM 4G+", - "size": "50MB", - "remark": "Only Purpur included", - "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.4-2416.jar", - "author": "purpurmc.org", - "setupInfo": { - "type": "minecraft/java/purpur", - "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.4-2416.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "[Purpur] Minecraft 1.21.3 Purpur", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Minecraft 1.21.3", - "category": "mc-purpur", - "runtime": "Java 21+", - "hardware": "RAM 4G+", - "size": "50MB", - "remark": "Only Purpur included", - "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.3-2358.jar", - "author": "purpurmc.org", - "setupInfo": { - "type": "minecraft/java/purpur", - "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.3-2358.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "[Purpur] Minecraft 1.21.1 Purpur", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Minecraft 1.21.1", - "category": "mc-purpur", - "runtime": "Java 21+", - "hardware": "RAM 4G+", - "size": "50MB", - "remark": "Only Purpur included", - "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.1-2329.jar", - "author": "purpurmc.org", - "setupInfo": { - "type": "minecraft/java/purpur", - "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.1-2329.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "[Purpur] Minecraft 1.20.6 Purpur", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Minecraft 1.20.6", - "category": "mc-purpur", - "runtime": "Java 21+", - "hardware": "RAM 4G+", - "size": "50MB", - "remark": "Only Purpur included", - "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.20.6-2233.jar", - "author": "purpurmc.org", - "setupInfo": { - "type": "minecraft/java/purpur", - "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.20.6-2233.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "[Purpur] Minecraft 1.20.4 Purpur", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Minecraft 1.20.4", - "category": "mc-purpur", - "runtime": "Java 21+", - "hardware": "RAM 4G+", - "size": "50MB", - "remark": "Only Purpur included", - "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.20.4-2176.jar", - "author": "purpurmc.org", - "setupInfo": { - "type": "minecraft/java/purpur", - "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.20.4-2176.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "[Purpur] Minecraft 1.20.1 Purpur", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Minecraft 1.20.1", - "category": "mc-purpur", - "runtime": "Java 17+", - "hardware": "RAM 4G+", - "size": "50MB", - "remark": "Only Purpur included", - "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.20.1-2062.jar", - "author": "purpurmc.org", - "setupInfo": { - "type": "minecraft/java/purpur", - "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.20.1-2062.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "[Purpur] Minecraft 1.19.2 Purpur", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Minecraft 1.19.2", - "category": "mc-purpur", - "runtime": "Java 17+", - "hardware": "RAM 4G+", - "size": "50MB", - "remark": "Only Purpur included", - "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.19.2-1858.jar", - "author": "purpurmc.org", - "setupInfo": { - "type": "minecraft/java/purpur", - "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.19.2-1858.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "[Purpur] Minecraft 1.18.2 Purpur", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Minecraft 1.18.2", - "category": "mc-purpur", - "runtime": "Java 17+", - "hardware": "RAM 4G+", - "size": "50MB", - "remark": "Only Purpur included", - "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.18.2-1632.jar", - "author": "purpurmc.org", - "setupInfo": { - "type": "minecraft/java/purpur", - "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.18.2-1632.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "[Purpur] Minecraft 1.17.1 Purpur", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Minecraft 1.17.1", - "category": "mc-purpur", - "runtime": "Java 16+", - "hardware": "RAM 4G+", - "size": "50MB", - "remark": "Only Purpur included", - "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.17.1-1428.jar", - "author": "purpurmc.org", - "setupInfo": { - "type": "minecraft/java/purpur", - "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.17.1-1428.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "[Purpur] Minecraft 1.16.5 Purpur", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Minecraft 1.16.5", - "category": "mc-purpur", - "runtime": "Java 8+", - "hardware": "RAM 4G+", - "size": "50MB", - "remark": "Only Purpur included", - "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.16.5-1171.jar", - "author": "purpurmc.org", - "setupInfo": { - "type": "minecraft/java/purpur", - "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.16.5-1171.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "[Paper] Minecraft 1.21.8 Paper", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Minecraft 1.21.8", - "category": "mc-paper", - "runtime": "Java 21+", - "hardware": "RAM 4G+", - "size": "50MB", - "remark": "Only Paper included", - "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.8/builds/10/downloads/paper-1.21.8-10.jar", - "author": "papermc.io", - "setupInfo": { - "type": "minecraft/java/paper", - "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.8-10.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "[Paper] Minecraft 1.21.6 Paper", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Minecraft 1.21.6", - "category": "mc-paper", - "runtime": "Java 21+", - "hardware": "RAM 4G+", - "size": "50MB", - "remark": "Only Paper included", - "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.6/builds/48/downloads/paper-1.21.4-48.jar", - "author": "papermc.io", - "setupInfo": { - "type": "minecraft/java/paper", - "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.6-48.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "[Paper] Minecraft 1.21.4 Paper", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Minecraft 1.21.4", - "category": "mc-paper", - "runtime": "Java 21+", - "hardware": "RAM 4G+", - "size": "50MB", - "remark": "Only Paper included", - "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/232/downloads/paper-1.21.4-232.jar", - "author": "papermc.io", - "setupInfo": { - "type": "minecraft/java/paper", - "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.4-232.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "[Paper] Minecraft 1.21.3 Paper", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Minecraft 1.21.3", - "category": "mc-paper", - "runtime": "Java 21+", - "hardware": "RAM 4G+", - "size": "50MB", - "remark": "Only Paper included", - "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.3/builds/82/downloads/paper-1.21.3-82.jar", - "author": "papermc.io", - "setupInfo": { - "type": "minecraft/java/paper", - "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.3-82.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "[Paper] Minecraft 1.21.1 Paper", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Minecraft 1.21.1", - "category": "mc-paper", - "runtime": "Java 21+", - "hardware": "RAM 4G+", - "size": "50MB", - "remark": "Only Paper included", - "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.1/builds/132/downloads/paper-1.21.1-132.jar", - "author": "papermc.io", - "setupInfo": { - "type": "minecraft/java/paper", - "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.1-132.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "[Paper] Minecraft 1.20.6 Paper", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Minecraft 1.20.6", - "category": "mc-paper", - "runtime": "Java 21+", - "hardware": "RAM 4G+", - "size": "50MB", - "remark": "Only Paper included", - "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.20.6/builds/151/downloads/paper-1.20.6-151.jar", - "author": "papermc.io", - "setupInfo": { - "type": "minecraft/java/paper", - "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.20.6-151.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "[Paper] Minecraft 1.20.4 Paper", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Minecraft 1.20.4", - "category": "mc-paper", - "runtime": "Java 21+", - "hardware": "RAM 4G+", - "size": "50MB", - "remark": "Only Paper included", - "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.20.4/builds/499/downloads/paper-1.20.4-499.jar", - "author": "papermc.io", - "setupInfo": { - "type": "minecraft/java/paper", - "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.20.4-499.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "[Paper] Minecraft 1.20.2 Paper", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Minecraft 1.20.2", - "category": "mc-paper", - "runtime": "Java 17+", - "hardware": "RAM 4G+", - "size": "150MB", - "remark": "Includes some basic plugins", - "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.20.2/builds/318/downloads/paper-1.20.2-318.jar", - "author": "papermc.io", - "setupInfo": { - "type": "minecraft/java/paper", - "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.20.2-318.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "[Paper] Minecraft 1.20.1 Paper", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Minecraft 1.20.1", - "category": "mc-paper", - "runtime": "Java 17+", - "hardware": "RAM 4G+", - "size": "200MB", - "remark": "Includes some basic plugins", - "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.20.1/builds/196/downloads/paper-1.20.1-196.jar", - "author": "papermc.io", - "setupInfo": { - "type": "minecraft/java/paper", - "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.20.1-196.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "[Paper] Minecraft 1.19.4 Paper", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Minecraft 1.19.4", - "category": "mc-paper", - "runtime": "Java 17+", - "hardware": "RAM 4G+", - "size": "50MB", - "remark": "Only Paper included", - "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.19.4/builds/550/downloads/paper-1.19.4-550.jar", - "author": "papermc.io", - "setupInfo": { - "type": "minecraft/java/paper", - "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.19.4-550.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "[Paper] Minecraft 1.19.2 Paper", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Minecraft 1.19.2", - "category": "mc-paper", - "runtime": "Java 17+", - "hardware": "RAM 4G+", - "size": "50MB", - "remark": "Only Paper included", - "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.19.2/builds/307/downloads/paper-1.19.2-307.jar", - "author": "papermc.io", - "setupInfo": { - "type": "minecraft/java/paper", - "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.19.2-307.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "[Paper] Minecraft 1.18.2 Paper", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Minecraft 1.18.2", - "category": "mc-paper", - "runtime": "Java 17+", - "hardware": "RAM 4G+", - "size": "50MB", - "remark": "Only Paper included", - "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.18.2/builds/388/downloads/paper-1.18.2-388.jar", - "author": "papermc.io", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.18.2-388.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "[Paper] Minecraft 1.17.1 Paper", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Minecraft 1.17.1", - "category": "mc-paper", - "runtime": "Java 16+", - "hardware": "RAM 4G+", - "size": "60MB", - "remark": "Only Paper included", - "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.17.1/builds/411/downloads/paper-1.17.1-411.jar", - "author": "papermc.io", - "setupInfo": { - "type": "minecraft/java/paper", - "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.17.1-411.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "[Paper] Minecraft 1.16.5 Paper", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Minecraft 1.16.5", - "category": "mc-paper", - "runtime": "Java 8+", - "hardware": "RAM 4G+", - "size": "50MB", - "remark": "Only Paper included", - "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.16.5/builds/794/downloads/paper-1.16.5-794.jar", - "author": "papermc.io", - "setupInfo": { - "type": "minecraft/java/paper", - "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.16.5-794.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "[Paper] Minecraft 1.12.2 Paper", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Minecraft 1.12.2", - "category": "mc-paper", - "runtime": "Java 8+", - "hardware": "RAM 4G+", - "size": "50MB", - "remark": "Only Paper included", - "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.12.2/builds/1620/downloads/paper-1.12.2-1620.jar", - "author": "papermc.io", - "setupInfo": { - "type": "minecraft/java/paper", - "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.12.2-1620.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "Linux", - "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "NeoForge 1.21.8 (Supports Mods)", - "category": "mc-neoforge", - "runtime": "Java 21+", - "hardware": "RAM 8G+", - "size": "7MB", - "remark": "Minecraft NeoForge", - "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.8.4-beta/neoforge-21.8.4-beta-installer.jar", - "author": "neoforged.net", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "sh ./run.sh", - "stopCommand": "stop", - "updateCommand": "java -jar neoforge-21.8.4-beta-installer.jar --installServer", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "Linux", - "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "NeoForge 1.21.6 (Supports Mods)", - "category": "mc-neoforge", - "runtime": "Java 21+", - "hardware": "RAM 8G+", - "size": "7MB", - "remark": "Minecraft NeoForge", - "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.6.20-beta/neoforge-21.6.20-beta-installer.jar", - "author": "neoforged.net", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "sh ./run.sh", - "stopCommand": "stop", - "updateCommand": "java -jar neoforge-21.6.20-beta-installer.jar --installServer", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "NeoForge 1.21.5 (Supports Mods)", - "category": "mc-neoforge", - "runtime": "Java 21+", - "hardware": "RAM 8G+", - "size": "7MB", - "remark": "Minecraft NeoForge", - "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.5.87/neoforge-21.5.87-installer.jar", - "author": "neoforged.net", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "sh ./run.sh", - "stopCommand": "stop", - "updateCommand": "java -jar neoforge-21.5.87-installer.jar --installServer", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "NeoForge 1.21.4 (Supports Mods)", - "category": "mc-neoforge", - "runtime": "Java 21+", - "hardware": "RAM 8G+", - "size": "7MB", - "remark": "Minecraft NeoForge", - "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.4.147/neoforge-21.4.147-installer.jar", - "author": "neoforged.net", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "sh ./run.sh", - "stopCommand": "stop", - "updateCommand": "java -jar neoforge-21.4.147-installer.jar --installServer", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "NeoForge 1.21.1 (Supports Mods)", - "category": "mc-neoforge", - "runtime": "Java 21+", - "hardware": "RAM 8G+", - "size": "7MB", - "remark": "Minecraft NeoForge", - "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.1.193/neoforge-21.1.193-installer.jar", - "author": "neoforged.net", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "sh ./run.sh", - "stopCommand": "stop", - "updateCommand": "java -jar neoforge-21.1.193-installer.jar --installServer", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "NeoForge 1.20.6 (Supports Mods)", - "category": "mc-neoforge", - "runtime": "Java 21+", - "hardware": "RAM 8G+", - "size": "7MB", - "remark": "Minecraft NeoForge", - "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/20.6.137/neoforge-20.6.137-installer.jar", - "author": "neoforged.net", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "sh ./run.sh", - "stopCommand": "stop", - "updateCommand": "java -jar neoforge-20.6.137-installer.jar --installServer", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "NeoForge 1.20.4 (Supports Mods)", - "category": "mc-neoforge", - "runtime": "Java 21+", - "hardware": "RAM 8G+", - "size": "7MB", - "remark": "Minecraft NeoForge", - "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/20.4.248/neoforge-20.4.248-installer.jar", - "author": "neoforged.net", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "sh ./run.sh", - "stopCommand": "stop", - "updateCommand": "java -jar neoforge-20.4.248-installer.jar --installServer", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "NeoForge 1.20.2 (Supports Mods)", - "category": "mc-neoforge", - "runtime": "Java 21+", - "hardware": "RAM 8G+", - "size": "7MB", - "remark": "Minecraft NeoForge", - "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/20.2.93/neoforge-20.2.93-installer.jar", - "author": "neoforged.net", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "sh ./run.sh", - "stopCommand": "stop", - "updateCommand": "java -jar neoforge-20.2.93-installer.jar --installServer", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Forge 1.21.8 (Supports Mods)", - "category": "mc-forge", - "runtime": "Java 21+", - "hardware": "RAM 8G+", - "size": "7MB", - "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.8-58.0.0/forge-1.21.8-58.0.0-installer.jar", - "author": "minecraftforge.net", - "setupInfo": { - "type": "minecraft/java/forge", - "startCommand": "sh ./run.sh", - "stopCommand": "stop", - "updateCommand": "java -jar forge-1.21.8-58.0.0-installer.jar --installServer", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Forge 1.21.6 (Supports Mods)", - "category": "mc-forge", - "runtime": "Java 21+", - "hardware": "RAM 8G+", - "size": "7MB", - "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.6-56.0.9/forge-1.21.6-56.0.9-installer.jar", - "author": "minecraftforge.net", - "setupInfo": { - "type": "minecraft/java/forge", - "startCommand": "sh ./run.sh", - "stopCommand": "stop", - "updateCommand": "java -jar forge-1.21.6-56.0.9-installer.jar --installServer", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Forge 1.21.5 (Supports Mods)", - "category": "mc-forge", - "runtime": "Java 21+", - "hardware": "RAM 8G+", - "size": "7MB", - "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.5-55.0.23/forge-1.21.5-55.0.23-installer.jar", - "author": "minecraftforge.net", - "setupInfo": { - "type": "minecraft/java/forge", - "startCommand": "sh ./run.sh", - "stopCommand": "stop", - "updateCommand": "java -jar forge-1.21.5-55.0.23-installer.jar --installServer", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Forge 1.21.4 (Supports Mods)", - "category": "mc-forge", - "runtime": "Java 21+", - "hardware": "RAM 8G+", - "size": "7MB", - "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.4-54.1.3/forge-1.21.4-54.1.3-installer.jar", - "author": "minecraftforge.net", - "setupInfo": { - "type": "minecraft/java/forge", - "startCommand": "sh ./run.sh", - "stopCommand": "stop", - "updateCommand": "java -jar forge-1.21.4-54.1.3-installer.jar --installServer", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Forge 1.21.1 (Supports Mods)", - "category": "mc-forge", - "runtime": "Java 21+", - "hardware": "RAM 8G+", - "size": "7MB", - "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.1-52.1.1/forge-1.21.1-52.1.1-installer.jar", - "author": "minecraftforge.net", - "setupInfo": { - "type": "minecraft/java/forge", - "startCommand": "sh ./run.sh", - "stopCommand": "stop", - "updateCommand": "java -jar forge-1.21.1-52.1.1-installer.jar --installServer", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Forge 1.20.6 (Supports Mods)", - "category": "mc-forge", - "runtime": "Java 21+", - "hardware": "RAM 8G+", - "size": "7MB", - "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.6-50.2.0/forge-1.20.6-50.2.0-installer.jar", - "author": "minecraftforge.net", - "setupInfo": { - "type": "minecraft/java/forge", - "startCommand": "sh ./run.sh", - "stopCommand": "stop", - "updateCommand": "java -jar forge-1.20.6-50.2.0-installer.jar --installServer", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Forge 1.20.4 (Supports Mods)", - "category": "mc-forge", - "runtime": "Java 21+", - "hardware": "RAM 8G+", - "size": "7MB", - "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.4-49.2.0/forge-1.20.4-49.2.0-installer.jar", - "author": "minecraftforge.net", - "setupInfo": { - "type": "minecraft/java/forge", - "startCommand": "sh ./run.sh", - "stopCommand": "stop", - "updateCommand": "java -jar forge-1.20.4-49.2.0-installer.jar --installServer", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Forge 1.20.1 (Supports Mods)", - "category": "mc-forge", - "runtime": "Java 17+", - "hardware": "RAM 8G+", - "size": "7MB", - "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.1-47.4.4/forge-1.20.1-47.4.4-installer.jar", - "author": "minecraftforge.net", - "setupInfo": { - "type": "minecraft/java/forge", - "startCommand": "sh ./run.sh", - "stopCommand": "stop", - "updateCommand": "java -jar forge-1.20.1-47.4.4-installer.jar --installServer", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Forge 1.19.4 (Supports Mods)", - "category": "mc-forge", - "runtime": "Java 17+", - "hardware": "RAM 8G+", - "size": "7MB", - "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.19.4-45.4.0/forge-1.19.4-45.4.0-installer.jar", - "author": "minecraftforge.net", - "setupInfo": { - "type": "minecraft/java/forge", - "startCommand": "sh ./run.sh", - "stopCommand": "stop", - "updateCommand": "java -jar forge-1.19.4-45.4.0-installer.jar --installServer", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Forge 1.19.2 (Supports Mods)", - "category": "mc-forge", - "runtime": "Java 17+", - "hardware": "RAM 8G+", - "size": "7MB", - "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.19.2-43.5.0/forge-1.19.2-43.5.0-installer.jar", - "author": "minecraftforge.net", - "setupInfo": { - "type": "minecraft/java/forge", - "startCommand": "sh ./run.sh", - "stopCommand": "stop", - "updateCommand": "java -jar forge-1.19.2-43.5.0-installer.jar --installServer", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Forge 1.18.2 (Supports Mods)", - "category": "mc-forge", - "runtime": "Java 17+", - "hardware": "RAM 8G+", - "size": "7MB", - "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.18.2-40.3.9/forge-1.18.2-40.3.9-installer.jar", - "author": "minecraftforge.net", - "setupInfo": { - "type": "minecraft/java/forge", - "startCommand": "sh ./run.sh", - "stopCommand": "stop", - "updateCommand": "java -jar forge-1.18.2-40.3.9-installer.jar --installServer", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Forge 1.17.1 (Supports Mods)", - "category": "mc-forge", - "runtime": "Java 16+", - "hardware": "RAM 8G+", - "size": "7MB", - "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.17.1-37.1.1/forge-1.17.1-37.1.1-installer.jar", - "author": "minecraftforge.net", - "setupInfo": { - "type": "minecraft/java/forge", - "startCommand": "sh ./run.sh", - "stopCommand": "stop", - "updateCommand": "java -jar forge-1.17.1-37.1.1-installer.jar --installServer", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Forge 1.16.5 (Supports Mods)", - "category": "mc-forge", - "runtime": "Java 8+", - "hardware": "RAM 8G+", - "size": "7MB", - "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.16.5-36.2.42/forge-1.16.5-36.2.42-installer.jar", - "author": "minecraftforge.net", - "setupInfo": { - "type": "minecraft/java/forge", - "startCommand": "sh ./run.sh", - "stopCommand": "stop", - "updateCommand": "java -jar forge-1.16.5-36.2.42-installer.jar --installServer", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Forge 1.12.2 (Supports Mods)", - "category": "mc-forge", - "runtime": "Java 8+", - "hardware": "RAM 8G+", - "size": "5MB", - "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.12.2-14.23.5.2860/forge-1.12.2-14.23.5.2860-installer.jar", - "author": "minecraftforge.net", - "setupInfo": { - "type": "minecraft/java/forge", - "startCommand": "sh ./run.sh", - "stopCommand": "stop", - "updateCommand": "java -jar forge-1.12.2-14.23.5.2860-installer.jar --installServer", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Forge 1.8.9 (Supports Mods)", - "category": "mc-forge", - "runtime": "Java 7+", - "hardware": "RAM 8G+", - "size": "5MB", - "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.8.9-11.15.1.2318-1.8.9/forge-1.8.9-11.15.1.2318-1.8.9-installer.jar", - "author": "minecraftforge.net", - "setupInfo": { - "type": "minecraft/java/forge", - "startCommand": "sh ./run.sh", - "stopCommand": "stop", - "updateCommand": "java -jar forge-1.8.9-11.15.1.2318-1.8.9-installer.jar --installServer", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Forge 1.7.10 (Supports Mods)", - "category": "mc-forge", - "runtime": "Java 7+", - "hardware": "RAM 8G+", - "size": "5MB", - "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.7.10-10.13.4.1614-1.7.10/forge-1.7.10-10.13.4.1614-1.7.10-installer.jar", - "author": "minecraftforge.net", - "setupInfo": { - "type": "minecraft/java/forge", - "startCommand": "sh ./run.sh", - "stopCommand": "stop", - "updateCommand": "java -jar forge-1.7.10-10.13.4.1614-1.7.10-installer.jar --installServer", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "Minecraft 1.21.8 with Fabric Loader", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Fabric 1.21.8 (Supports Mods)", - "category": "mc-fabric", - "runtime": "Java 21+", - "hardware": "RAM 4G+", - "size": "5MB", - "remark": "Minecraft Fabric", - "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", - "author": "fabricmc.net", - "setupInfo": { - "type": "minecraft/java/fabric", - "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", - "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.21.8 -downloadMinecraft -noprofile", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "Minecraft 1.21.6 with Fabric Loader", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Fabric 1.21.6 (Supports Mods)", - "category": "mc-fabric", - "runtime": "Java 21+", - "hardware": "RAM 4G+", - "size": "5MB", - "remark": "Minecraft Fabric", - "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", - "author": "fabricmc.net", - "setupInfo": { - "type": "minecraft/java/fabric", - "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", - "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.21.6 -downloadMinecraft -noprofile", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "Minecraft 1.21.5 with Fabric Loader", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Fabric 1.21.5 (Supports Mods)", - "category": "mc-fabric", - "runtime": "Java 21+", - "hardware": "RAM 4G+", - "size": "5MB", - "remark": "Minecraft Fabric", - "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", - "author": "fabricmc.net", - "setupInfo": { - "type": "minecraft/java/fabric", - "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", - "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.21.5 -downloadMinecraft -noprofile", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "Minecraft 1.21.4 with Fabric Loader", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Fabric 1.21.4 (Supports Mods)", - "category": "mc-fabric", - "runtime": "Java 21+", - "hardware": "RAM 4G+", - "size": "5MB", - "remark": "Minecraft Fabric", - "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", - "author": "fabricmc.net", - "setupInfo": { - "type": "minecraft/java/fabric", - "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", - "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.21.4 -downloadMinecraft -noprofile", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "Minecraft 1.21.1 with Fabric Loader", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Fabric 1.21.1 (Supports Mods)", - "category": "mc-fabric", - "runtime": "Java 21+", - "hardware": "RAM 4G+", - "size": "5MB", - "remark": "Minecraft Fabric", - "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", - "author": "fabricmc.net", - "setupInfo": { - "type": "minecraft/java/fabric", - "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", - "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.21.1 -downloadMinecraft -noprofile", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "Minecraft 1.20.6 with Fabric Loader", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Fabric 1.20.6 (Supports Mods)", - "category": "mc-fabric", - "runtime": "Java 21+", - "hardware": "RAM 4G+", - "size": "5MB", - "remark": "Minecraft Fabric", - "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", - "author": "fabricmc.net", - "setupInfo": { - "type": "minecraft/java/fabric", - "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", - "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.20.6 -downloadMinecraft -noprofile", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "Minecraft 1.20.4 with Fabric Loader", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Fabric 1.20.4 (Supports Mods)", - "category": "mc-fabric", - "runtime": "Java 21+", - "hardware": "RAM 4G+", - "size": "5MB", - "remark": "Minecraft Fabric", - "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", - "author": "fabricmc.net", - "setupInfo": { - "type": "minecraft/java/fabric", - "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", - "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.20.4 -downloadMinecraft -noprofile", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "Minecraft 1.20.1 with Fabric Loader", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Fabric 1.20.1 (Supports Mods)", - "category": "mc-fabric", - "runtime": "Java 17+", - "hardware": "RAM 4G+", - "size": "5MB", - "remark": "Minecraft Fabric", - "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", - "author": "fabricmc.net", - "setupInfo": { - "type": "minecraft/java/fabric", - "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", - "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.20.1 -downloadMinecraft -noprofile", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "Minecraft 1.19.4 with Fabric Loader", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Fabric 1.19.4 (Supports Mods)", - "category": "mc-fabric", - "runtime": "Java 17+", - "hardware": "RAM 4G+", - "size": "5MB", - "remark": "Minecraft Fabric", - "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", - "author": "fabricmc.net", - "setupInfo": { - "type": "minecraft/java/fabric", - "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", - "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.19.4 -downloadMinecraft -noprofile", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "Minecraft 1.19.2 with Fabric Loader", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Fabric 1.19.2 (Supports Mods)", - "category": "mc-fabric", - "runtime": "Java 17+", - "hardware": "RAM 4G+", - "size": "5MB", - "remark": "Minecraft Fabric", - "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", - "author": "fabricmc.net", - "setupInfo": { - "type": "minecraft/java/fabric", - "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", - "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.19.2 -downloadMinecraft -noprofile", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "Minecraft 1.18.2 with Fabric Loader", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Fabric 1.18.2 (Supports Mods)", - "category": "mc-fabric", - "runtime": "Java 17+", - "hardware": "RAM 4G+", - "size": "5MB", - "remark": "Minecraft Fabric", - "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", - "author": "fabricmc.net", - "setupInfo": { - "type": "minecraft/java/fabric", - "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", - "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.18.2 -downloadMinecraft -noprofile", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "Minecraft 1.17.1 with Fabric Loader", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Fabric 1.17.1 (Supports Mods)", - "category": "mc-fabric", - "runtime": "Java 16+", - "hardware": "RAM 4G+", - "size": "5MB", - "remark": "Minecraft Fabric", - "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", - "author": "fabricmc.net", - "setupInfo": { - "type": "minecraft/java/fabric", - "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", - "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.17.1 -downloadMinecraft -noprofile", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "Minecraft 1.16.5 with Fabric Loader", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Fabric 1.16.5 (Supports Mods)", - "category": "mc-fabric", - "runtime": "Java 8+", - "hardware": "RAM 4G+", - "size": "5MB", - "remark": "Minecraft Fabric", - "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", - "author": "fabricmc.net", - "setupInfo": { - "type": "minecraft/java/fabric", - "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", - "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.16.5 -downloadMinecraft -noprofile", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "Minecraft 1.15.2 with Fabric Loader", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Fabric 1.15.2 (Supports Mods)", - "category": "mc-fabric", - "runtime": "Java 8+", - "hardware": "RAM 4G+", - "size": "5MB", - "remark": "Minecraft Fabric", - "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", - "author": "fabricmc.net", - "setupInfo": { - "type": "minecraft/java/fabric", - "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", - "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.15.2 -downloadMinecraft -noprofile", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "Minecraft 1.14.4 with Fabric Loader", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Fabric 1.14.4 (Supports Mods)", - "category": "mc-fabric", - "runtime": "Java 8+", - "hardware": "RAM 4G+", - "size": "5MB", - "remark": "Minecraft Fabric", - "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", - "author": "fabricmc.net", - "setupInfo": { - "type": "minecraft/java/fabric", - "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", - "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.14.4 -downloadMinecraft -noprofile", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "[Vanilla] Minecraft 1.21.8", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Minecraft 1.21.8", - "category": "mc-vanilla", - "runtime": "Java 21+", - "hardware": "RAM 2G+", - "size": "55MB", - "remark": "Minecraft Java", - "targetLink": "https://piston-data.mojang.com/v1/objects/6bce4ef400e4efaa63a13d5e6f6b500be969ef81/server.jar", - "author": "Mojang Studios", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "[Vanilla] Minecraft 1.21.6", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Minecraft 1.21.6", - "category": "mc-vanilla", - "runtime": "Java 21+", - "hardware": "RAM 2G+", - "size": "55MB", - "remark": "Minecraft Java", - "targetLink": "https://piston-data.mojang.com/v1/objects/6e64dcabba3c01a7271b4fa6bd898483b794c59b/server.jar", - "author": "Mojang Studios", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "[Vanilla] Minecraft 1.21.5", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Minecraft 1.21.5", - "category": "mc-vanilla", - "runtime": "Java 21+", - "hardware": "RAM 2G+", - "size": "55MB", - "remark": "Minecraft Java", - "targetLink": "https://piston-data.mojang.com/v1/objects/e6ec2f64e6080b9b5d9b471b291c33cc7f509733/server.jar", - "author": "Mojang Studios", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "[Vanilla] Minecraft 1.21.4", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Minecraft 1.21.4", - "category": "mc-vanilla", - "runtime": "Java 21+", - "hardware": "RAM 2G+", - "size": "55MB", - "remark": "Minecraft Java", - "targetLink": "https://piston-data.mojang.com/v1/objects/4707d00eb834b446575d89a61a11b5d548d8c001/server.jar", - "author": "Mojang Studios", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "[Vanilla] Minecraft 1.21.1", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Minecraft 1.21.1", - "category": "mc-vanilla", - "runtime": "Java 21+", - "hardware": "RAM 2G+", - "size": "50MB", - "remark": "Minecraft Java", - "targetLink": "https://piston-data.mojang.com/v1/objects/59353fb40c36d304f2035d51e7d6e6baa98dc05c/server.jar", - "author": "Mojang Studios", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "[Vanilla] Minecraft 1.20.6", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Minecraft 1.20.6", - "category": "mc-vanilla", - "runtime": "Java 21+", - "hardware": "RAM 2G+", - "size": "50MB", - "remark": "Minecraft Java", - "targetLink": "https://piston-data.mojang.com/v1/objects/145ff0858209bcfc164859ba735d4199aafa1eea/server.jar", - "author": "Mojang Studios", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "[Vanilla] Minecraft 1.20.4", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Minecraft 1.20.4", - "category": "mc-vanilla", - "runtime": "Java 21+", - "hardware": "RAM 2G+", - "size": "50MB", - "remark": "Minecraft Java", - "targetLink": "https://piston-data.mojang.com/v1/objects/8dd1a28015f51b1803213892b50b7b4fc76e594d/server.jar", - "author": "Mojang Studios", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "[Vanilla] Minecraft 1.20.1", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Minecraft 1.20.1", - "category": "mc-vanilla", - "runtime": "Java 17+", - "hardware": "RAM 2G+", - "size": "50MB", - "remark": "Minecraft Java", - "targetLink": "https://piston-data.mojang.com/v1/objects/84194a2f286ef7c14ed7ce0090dba59902951553/server.jar", - "author": "Mojang Studios", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "[Vanilla] Minecraft 1.19.4", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Minecraft 1.19.4", - "category": "mc-vanilla", - "runtime": "Java 17+", - "hardware": "RAM 2G+", - "size": "50MB", - "remark": "Minecraft Java", - "targetLink": "https://piston-data.mojang.com/v1/objects/8f3112a1049751cc472ec13e397eade5336ca7ae/server.jar", - "author": "Mojang Studios", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "[Vanilla] Minecraft 1.18.2", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Minecraft 1.18.2", - "category": "mc-vanilla", - "runtime": "Java 17+", - "hardware": "RAM 2G+", - "size": "45MB", - "remark": "Minecraft Java", - "targetLink": "https://piston-data.mojang.com/v1/objects/c8f83c5655308435b3dcf03c06d9fe8740a77469/server.jar", - "author": "Mojang Studios", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "[Vanilla] Minecraft 1.17.1", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Minecraft 1.17.1", - "category": "mc-vanilla", - "runtime": "Java 16+", - "hardware": "RAM 2G+", - "size": "45MB", - "remark": "Minecraft Java", - "targetLink": "https://piston-data.mojang.com/v1/objects/a16d67e5807f57fc4e550299cf20226194497dc2/server.jar", - "author": "Mojang Studios", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "[Vanilla] Minecraft 1.16.5", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Minecraft 1.16.5", - "category": "mc-vanilla", - "runtime": "Java 8+", - "hardware": "RAM 2G+", - "size": "45MB", - "remark": "Minecraft Java", - "targetLink": "https://piston-data.mojang.com/v1/objects/1b557e7b033b583cd9f66746b7a9ab1ec1673ced/server.jar", - "author": "Mojang Studios", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "[Vanilla] Minecraft 1.12.2", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Minecraft 1.12.2", - "category": "mc-vanilla", - "runtime": "Java 8+", - "hardware": "RAM 2G+", - "size": "30MB", - "remark": "Minecraft Java", - "targetLink": "https://piston-data.mojang.com/v1/objects/886945bfb2b978778c3a0288fd7fab09d315b25f/server.jar", - "author": "Mojang Studios", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "platform": "ALL", - "description": "[Vanilla] Minecraft 1.8.9", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Minecraft 1.8.9", - "category": "mc-vanilla", - "runtime": "Java 7+", - "hardware": "RAM 2G+", - "size": "10MB", - "remark": "Minecraft Java", - "targetLink": "https://launcher.mojang.com/v1/objects/b58b2ceb36e01bcd8dbf49c8fb66c55a9f0676cd/server.jar", - "author": "Mojang Studios", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "zh_cn", - "platform": "ALL", - "description": "[Paper] Minecraft 1.21.1 快速开服", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Minecraft 1.21.1 快速开服", - "category": "mc-paper", - "runtime": "Java 17+", - "hardware": "RAM 4G+", - "size": "250MB", - "remark": "包含基础插件,萌新快速开服!低配机器专属!", - "targetLink": "https://cloud.alongw.cn/f/DzvHK/Paper-1.21.1-ZH.zip", - "author": "alongw.cn", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "java -Xms4096M -Xmx4096M -jar server.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "zh_cn", - "platform": "ALL", - "description": "[Paper] 中小型互通服推荐,1.20.4 版本,快速开服,包含ESS、锁箱子、操作回滚、领地商店等基础插件。", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Minecraft 1.20.4", - "category": "mc-paper", - "runtime": "Java 21+", - "hardware": "RAM 6G+", - "size": "140MB", - "remark": "支持插件,最低 8GB 内存要求", - "targetLink": "https://url.alww.top/mcsm/paper1.20.4.zip", - "author": "alongw.cn", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "java -Xms6144M -Xmx6144M -jar server.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "zh_cn", - "platform": "ALL", - "description": "注意:默认的启动命令是 \"sh ./run.sh\",如果需要在 Windows 上运行,请在安装后将命令修改为 \"start.bat\"", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Forge 1.20.1 Java 版 (支持模组)", - "category": "mc-forge", - "runtime": "Java 17+", - "hardware": "RAM 8G+", - "size": "7MB", - "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.1-47.3.33/forge-1.20.1-47.3.33-installer.jar", - "author": "minecraftforge.net", - "setupInfo": { - "type": "minecraft/java/forge", - "startCommand": "sh ./run.sh", - "stopCommand": "stop", - "updateCommand": "java -jar forge-1.20.1-47.3.33-installer.jar --installServer", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "zh_cn", - "platform": "ALL", - "description": "注意:默认的启动命令是 \"sh ./run.sh\",如果需要在 Windows 上运行,请在安装后将命令修改为 \"start.bat\"", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Forge 1.20.6 Java 版 (支持模组)", - "category": "mc-forge", - "runtime": "Java 21+", - "hardware": "RAM 8G+", - "size": "7MB", - "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.6-50.1.48/forge-1.20.6-50.1.48-installer.jar", - "author": "minecraftforge.net", - "setupInfo": { - "type": "minecraft/java/forge", - "startCommand": "sh ./run.sh", - "stopCommand": "stop", - "updateCommand": "java -jar forge-1.20.6-50.1.48-installer.jar --installServer", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "zh_cn", - "platform": "ALL", - "description": "注意:默认的启动命令是 \"sh ./run.sh\",如果需要在 Windows 上运行,请在安装后将命令修改为 \"start.bat\"", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Forge 1.19.2 Java 版 (支持模组)", - "category": "mc-forge", - "runtime": "Java 17+", - "hardware": "RAM 8G+", - "size": "7MB", - "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.19.2-43.4.20/forge-1.19.2-43.4.20-installer.jar", - "author": "minecraftforge.net", - "setupInfo": { - "type": "minecraft/java/forge", - "startCommand": "sh ./run.sh", - "stopCommand": "stop", - "updateCommand": "java -jar forge-1.19.2-43.4.20-installer.jar --installServer", - "ie": "utf-8", - "oe": "utf-8" - } - } - ] -} From 541a37f67b306112d011a863548bd93ded81e0f5 Mon Sep 17 00:00:00 2001 From: yumao233 Date: Thu, 7 Aug 2025 20:15:00 +0800 Subject: [PATCH 219/338] feat: test new config --- templates-config.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/templates-config.json b/templates-config.json index 9cb265d..6ac8055 100644 --- a/templates-config.json +++ b/templates-config.json @@ -14,6 +14,7 @@ "packages": [ { "title": "幻兽帕鲁官方服务器", + "language": "zh_cn", "platform": "Windows", "description": "适用于 Windows 的帕鲁们的最佳服务器!", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/palworld.webp", @@ -38,6 +39,7 @@ }, { "title": "幻兽帕鲁官方服务器", + "language": "zh_cn", "platform": "Linux", "description": "本模板使用 Docker 安装,Linux 服务器必须安装 Docker!安装后默认的密码是 123456,修改请前往环境变量处修改。", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/palworld.webp", @@ -75,6 +77,7 @@ }, { "title": "僵尸毁灭工程", + "language": "zh_cn", "platform": "Linux", "description": "适用于 Linux 系统,使用《僵尸毁灭工程》第三方 Docker 镜像,快速开服!", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/pzomboid.webp", @@ -116,6 +119,7 @@ { "title": "Terraria 服务器", + "language": "zh_cn", "platform": "Linux", "description": "适用于 Linux 系统,使用《Terraria》第三方 Docker 镜像,快速开服!", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/terraria.webp", @@ -158,6 +162,7 @@ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Minecraft 1.21.1 快速开服", + "language": "zh_cn", "category": "mc-paper", "runtime": "Java 17+", "hardware": "RAM 4G+", @@ -175,6 +180,7 @@ } }, { + "language": "zh_cn", "platform": "ALL", "description": "[Paper] 中小型互通服推荐,1.20.4 版本,快速开服,包含ESS、锁箱子、操作回滚、领地商店等基础插件。", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", @@ -197,6 +203,7 @@ } }, { + "language": "zh_cn", "platform": "ALL", "description": "注意:默认的启动命令是 \"sh ./run.sh\",如果需要在 Windows 上运行,请在安装后将命令修改为 \"start.bat\"", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", @@ -219,6 +226,7 @@ } }, { + "language": "zh_cn", "platform": "ALL", "description": "注意:默认的启动命令是 \"sh ./run.sh\",如果需要在 Windows 上运行,请在安装后将命令修改为 \"start.bat\"", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", @@ -241,6 +249,7 @@ } }, { + "language": "zh_cn", "platform": "ALL", "description": "注意:默认的启动命令是 \"sh ./run.sh\",如果需要在 Windows 上运行,请在安装后将命令修改为 \"start.bat\"", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", From 881f09861c400eb3baa3024ab9aa87a630ac6f62 Mon Sep 17 00:00:00 2001 From: yumao233 Date: Thu, 7 Aug 2025 20:26:58 +0800 Subject: [PATCH 220/338] feat: test new config --- templates-config.json | 47 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/templates-config.json b/templates-config.json index 6ac8055..d13c06a 100644 --- a/templates-config.json +++ b/templates-config.json @@ -273,6 +273,7 @@ }, { "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp", "gameType": "Minecraft", "description": "[Purpur] Minecraft 1.21.8 Purpur", "title": "Minecraft 1.21.8", @@ -291,6 +292,52 @@ "ie": "utf-8", "oe": "utf-8" } + }, + { + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp", + "gameType": "Minecraft", + "platform": "Linux", + "description": "Forge 1.21.1 Server for Linux", + "title": "Forge 1.21.1 (Supports Mods)", + "category": "mc-forge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.1-52.1.1/forge-1.21.1-52.1.1-installer.jar", + "author": "minecraftforge.net", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.21.1-52.1.1-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp", + "gameType": "Minecraft", + "platform": "Windows", + "description": "Forge 1.21.1 Server for Windows", + "title": "Forge 1.21.1 (Supports Mods)", + "category": "mc-forge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.1-52.1.1/forge-1.21.1-52.1.1-installer.jar", + "author": "minecraftforge.net", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.bat", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.21.1-52.1.1-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } } ] } From 31230d71c7b340f6e7bd6c229c02947b317058fd Mon Sep 17 00:00:00 2001 From: yumao233 Date: Mon, 11 Aug 2025 20:09:28 +0800 Subject: [PATCH 221/338] feat: test new config --- templates-config.json => market.json | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename templates-config.json => market.json (100%) diff --git a/templates-config.json b/market.json similarity index 100% rename from templates-config.json rename to market.json From 47bfc9eaa06fb5def931ca9f1014f5b105e18554 Mon Sep 17 00:00:00 2001 From: yumao233 Date: Mon, 11 Aug 2025 20:45:48 +0800 Subject: [PATCH 222/338] feat: test new config --- market.json | 326 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 316 insertions(+), 10 deletions(-) diff --git a/market.json b/market.json index d13c06a..3d20036 100644 --- a/market.json +++ b/market.json @@ -157,12 +157,12 @@ }, { + "language": "zh_cn", "platform": "ALL", "description": "[Paper] Minecraft 1.21.1 快速开服", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Minecraft 1.21.1 快速开服", - "language": "zh_cn", "category": "mc-paper", "runtime": "Java 17+", "hardware": "RAM 4G+", @@ -204,8 +204,8 @@ }, { "language": "zh_cn", - "platform": "ALL", - "description": "注意:默认的启动命令是 \"sh ./run.sh\",如果需要在 Windows 上运行,请在安装后将命令修改为 \"start.bat\"", + "platform": "Linux", + "description": "Minecraft Forge 1.20.1 服务器,支持 Forge 模组!", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Forge 1.20.1 Java 版 (支持模组)", @@ -227,7 +227,30 @@ }, { "language": "zh_cn", - "platform": "ALL", + "platform": "Windows", + "description": "Minecraft Forge 1.20.1 服务器,支持 Forge 模组!", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "gameType": "Minecraft", + "title": "Forge 1.20.1 Java 版 (支持模组)", + "category": "mc-forge", + "runtime": "Java 17+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.1-47.3.33/forge-1.20.1-47.3.33-installer.jar", + "author": "minecraftforge.net", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "start.bat", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.20.1-47.3.33-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "zh_cn", + "platform": "Windows", "description": "注意:默认的启动命令是 \"sh ./run.sh\",如果需要在 Windows 上运行,请在安装后将命令修改为 \"start.bat\"", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -241,7 +264,7 @@ "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", - "startCommand": "sh ./run.sh", + "startCommand": "start.bat", "stopCommand": "stop", "updateCommand": "java -jar forge-1.20.6-50.1.48-installer.jar --installServer", "ie": "utf-8", @@ -250,7 +273,7 @@ }, { "language": "zh_cn", - "platform": "ALL", + "platform": "Windows", "description": "注意:默认的启动命令是 \"sh ./run.sh\",如果需要在 Windows 上运行,请在安装后将命令修改为 \"start.bat\"", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", @@ -264,14 +287,159 @@ "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", - "startCommand": "sh ./run.sh", + "startCommand": "start.bat", "stopCommand": "stop", "updateCommand": "java -jar forge-1.19.2-43.4.20-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } }, + + { + "title": "Palworld Official Server", + "language": "en_us", + "platform": "Windows", + "description": "The best Palworld server for Windows!", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/palworld.webp", + "remark": "", + "gameType": "Palworld", + "category": "Latest Version", + "runtime": "Windows 10+", + "hardware": "RAM 4G+", + "size": "", + "targetLink": "", + "author": "MCSManager", + "tags": ["Windows version"], + "setupInfo": { + "tag": ["Palworld"], + "type": "steam/universal", + "startCommand": "PalServer.exe", + "stopCommand": "exit", + "updateCommand": "{mcsm_steamcmd} +login anonymous +force_install_dir \"{mcsm_workspace}\" +app_update 2394010 +quit", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "title": "Palworld Official Server", + "language": "en_us", + "platform": "Linux", + "description": "This template uses Docker for installation. Docker must be installed on your Linux server! The default password after installation is 123456. To change it, please go to the environment variables.", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/palworld.webp", + "gameType": "Palworld", + "category": "Latest Version", + "runtime": "Ubuntu/Centos LTS", + "hardware": "RAM 4G+", + "size": "", + "targetLink": "", + "author": "MCSManager", + "tags": ["Docker version"], + "setupInfo": { + "stopCommand": "stop", + "ie": "utf8", + "oe": "utf8", + "type": "steam/universal", + "tag": ["Palworld"], + "fileCode": "utf8", + "processType": "docker", + "updateCommand": "", + "docker": { + "image": "kagurazakanyaa/palworld:latest", + "changeWorkdir": false, + "networkMode": "bridge", + "containerName": "palworld-server", + "workingDir": "/opt/palworld/Pal/Saved", + "ports": ["{mcsm_port1}:8211/tcp", "{mcsm_port2}:25575/tcp"], + "env": [ + "SERVER_NAME=Private PalWorld Server", + "SERVER_DESC=Private PalWorld Server", + "ADMIN_PASSWORD=123456" + ] + } + } + }, + { + "title": "Project Zomboid", + "language": "en_us", + "platform": "Linux", + "description": "For Linux systems, using a third-party Docker image of Project Zomboid for quick server deployment!", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/pzomboid.webp", + "gameType": "Zombie Survival", + "category": "Latest Version", + "runtime": "Ubuntu/Centos LTS", + "hardware": "RAM 4G+", + "size": "", + "targetLink": "", + "author": "MCSManager", + "tags": ["Docker version"], + "setupInfo": { + "startCommand": "", + "stopCommand": "stop", + "ie": "utf8", + "oe": "utf8", + "type": "steam/universal", + "tag": ["Project Zomboid"], + "fileCode": "utf8", + "processType": "docker", + "updateCommand": "", + "docker": { + "image": "renegademaster/zomboid-dedicated-server:latest", + "containerName": "zomboid-dedicated-server", + "ports": ["{mcsm_port2}:16262/udp", "{mcsm_port1}:16261/udp"], + "extraVolumes": [ + "{mcsm_workspace}/ZomboidConfig|/home/steam/Zomboid", + "{mcsm_workspace}/ZomboidDedicatedServer|/home/steam/ZomboidDedicatedServer" + ], + "memory": 4096, + "networkMode": "bridge", + "cpuUsage": 100, + "workingDir": "", + "env": [], + "changeWorkdir": false + } + } + }, + + { + "title": "Terraria Server", + "language": "en_us", + "platform": "Linux", + "description": "For Linux systems, using a third-party Docker image of Terraria for quick server deployment!", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/terraria.webp", + "gameType": "Terraria", + "category": "Latest Version", + "runtime": "Ubuntu/Centos LTS", + "hardware": "RAM 4G+", + "size": "", + "targetLink": "", + "author": "MCSManager", + "tags": ["Docker version"], + "setupInfo": { + "startCommand": "", + "stopCommand": "exit", + "ie": "utf8", + "oe": "utf8", + "type": "steam/terraria", + "tag": ["terraria"], + "fileCode": "utf8", + "processType": "docker", + "updateCommand": "", + "docker": { + "image": "ryshe/terraria:latest", + "containerName": "terraria-server", + "ports": ["{mcsm_port1}:7777/tcp"], + "extraVolumes": [], + "memory": 4096, + "networkMode": "bridge", + "cpuUsage": 100, + "workingDir": "/root/.local/share/Terraria/Worlds", + "env": [], + "changeWorkdir": false + } + } + }, { + "platform": "ALL", "language": "en_us", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp", "gameType": "Minecraft", @@ -294,10 +462,10 @@ } }, { + "platform": "Linux", "language": "en_us", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp", "gameType": "Minecraft", - "platform": "Linux", "description": "Forge 1.21.1 Server for Linux", "title": "Forge 1.21.1 (Supports Mods)", "category": "mc-forge", @@ -317,10 +485,10 @@ } }, { + "platform": "Windows", "language": "en_us", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp", "gameType": "Minecraft", - "platform": "Windows", "description": "Forge 1.21.1 Server for Windows", "title": "Forge 1.21.1 (Supports Mods)", "category": "mc-forge", @@ -332,12 +500,150 @@ "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", - "startCommand": "sh ./run.bat", + "startCommand": "start.bat", "stopCommand": "stop", "updateCommand": "java -jar forge-1.21.1-52.1.1-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } + }, + { + "platform": "ALL", + "language": "en_us", + "gameType": "Minecraft", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-purpur.webp", + "description": "[Purpur] Minecraft 1.21.4 Purpur", + "title": "Minecraft 1.21.4", + "category": "mc-purpur", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Purpur included", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.4-2416.jar", + "author": "purpurmc.org", + "setupInfo": { + "type": "minecraft/java/purpur", + "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.4-2416.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "ALL", + "language": "en_us", + "gameType": "Minecraft", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "description": "[Paper] Minecraft 1.21.4 Paper", + "title": "Minecraft 1.21.4", + "category": "mc-paper", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Paper included", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/232/downloads/paper-1.21.4-232.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java/paper", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.4-232.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "ALL", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "gameType": "Minecraft", + "description": "[Vanilla] Minecraft 1.21.8", + "title": "Minecraft 1.21.8", + "category": "mc-vanilla", + "runtime": "Java 21+", + "hardware": "RAM 2G+", + "size": "55MB", + "remark": "Minecraft Java", + "targetLink": "https://piston-data.mojang.com/v1/objects/6bce4ef400e4efaa63a13d5e6f6b500be969ef81/server.jar", + "author": "Mojang Studios", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "ALL", + "language": "en_us", + "gameType": "Minecraft", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "description": "[Vanilla] Minecraft 1.21.4", + "title": "Minecraft 1.21.4", + "category": "mc-vanilla", + "runtime": "Java 21+", + "hardware": "RAM 2G+", + "size": "55MB", + "remark": "Minecraft Java", + "targetLink": "https://piston-data.mojang.com/v1/objects/4707d00eb834b446575d89a61a11b5d548d8c001/server.jar", + "author": "Mojang Studios", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "ALL", + "language": "en_us", + "gameType": "Minecraft", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-fabric.webp", + "description": "Minecraft 1.21.4 with Fabric Loader", + "title": "Fabric 1.21.4 (Supports Mods)", + "category": "mc-fabric", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "5MB", + "remark": "Minecraft Fabric", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", + "author": "fabricmc.net", + "setupInfo": { + "type": "minecraft/java/fabric", + "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", + "stopCommand": "stop", + "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.21.4 -downloadMinecraft -noprofile", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "ALL", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-fabric.webp", + "gameType": "Minecraft", + "description": "Minecraft 1.21.8 with Fabric Loader", + "title": "Fabric 1.21.8 (Supports Mods)", + "category": "mc-fabric", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "5MB", + "remark": "Minecraft Fabric", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", + "author": "fabricmc.net", + "setupInfo": { + "type": "minecraft/java/fabric", + "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", + "stopCommand": "stop", + "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.21.8 -downloadMinecraft -noprofile", + "ie": "utf-8", + "oe": "utf-8" + } } ] } From e31dd39bd6cd5986be75f0c4abddb8a60522aef3 Mon Sep 17 00:00:00 2001 From: yumao233 Date: Tue, 12 Aug 2025 19:15:40 +0800 Subject: [PATCH 223/338] feat: test new config --- market.json | 79 +++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 62 insertions(+), 17 deletions(-) diff --git a/market.json b/market.json index 3d20036..9e81a8c 100644 --- a/market.json +++ b/market.json @@ -22,7 +22,7 @@ "gameType": "Palworld", "category": "最新版本", "runtime": "Windows 10+", - "hardware": "RAM 4G+", + "hardware": "RAM 8G+", "size": "", "targetLink": "", "author": "MCSManager", @@ -46,7 +46,7 @@ "gameType": "Palworld", "category": "最新版本", "runtime": "Ubuntu/Centos LTS", - "hardware": "RAM 4G+", + "hardware": "RAM 8G+", "size": "", "targetLink": "", "author": "MCSManager", @@ -84,7 +84,7 @@ "gameType": "Zombie Survival", "category": "最新版本", "runtime": "Ubuntu/Centos LTS", - "hardware": "RAM 4G+", + "hardware": "RAM 8G+", "size": "", "targetLink": "", "author": "MCSManager", @@ -126,7 +126,7 @@ "gameType": "Terraria", "category": "最新版本", "runtime": "Ubuntu/Centos LTS", - "hardware": "RAM 4G+", + "hardware": "RAM 8G+", "size": "", "targetLink": "", "author": "MCSManager", @@ -155,7 +155,52 @@ } } }, - + { + "platform": "ALL", + "language": "zh_cn", + "gameType": "Minecraft", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "description": "[Paper] Minecraft 1.21.8 Paper 快速开服", + "title": "Paper Minecraft 1.21.8 快速开服,性能强,占用少,支持插件,不支持模组", + "category": "mc-paper", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "100MB", + "remark": "仅包含 Paper 版本", + "targetLink": "https://fill-data.papermc.io/v1/objects/d310c61899acc608b683515c5c7ef929774bfd1b90262dac965e76c7e9ea8d22/paper-1.21.8-30.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java/paper", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.8-30.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "ALL", + "language": "zh_cn", + "gameType": "Minecraft", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "description": "[Paper] Minecraft 1.20.1 Paper 快速开服", + "title": "Paper Minecraft 1.20.1 快速开服,性能强,占用少,支持插件,不支持模组", + "category": "mc-paper", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "100MB", + "remark": "仅包含 Paper 版本", + "targetLink": "https://fill-data.papermc.io/v1/objects/234a9b32098100c6fc116664d64e36ccdb58b5b649af0f80bcccb08b0255eaea/paper-1.20.1-196.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java/paper", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.20.1-196.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "language": "zh_cn", "platform": "ALL", @@ -165,7 +210,7 @@ "title": "Minecraft 1.21.1 快速开服", "category": "mc-paper", "runtime": "Java 17+", - "hardware": "RAM 4G+", + "hardware": "RAM 8G+", "size": "250MB", "remark": "包含基础插件,萌新快速开服!低配机器专属!", "targetLink": "https://cloud.alongw.cn/f/DzvHK/Paper-1.21.1-ZH.zip", @@ -251,7 +296,7 @@ { "language": "zh_cn", "platform": "Windows", - "description": "注意:默认的启动命令是 \"sh ./run.sh\",如果需要在 Windows 上运行,请在安装后将命令修改为 \"start.bat\"", + "description": "适用于 Windows 系统,支持 Minecraft Forge 模组,快速开服!", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Forge 1.20.6 Java 版 (支持模组)", @@ -274,7 +319,7 @@ { "language": "zh_cn", "platform": "Windows", - "description": "注意:默认的启动命令是 \"sh ./run.sh\",如果需要在 Windows 上运行,请在安装后将命令修改为 \"start.bat\"", + "description": "适用于 Windows 系统,支持 Minecraft Forge 模组,快速开服!", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "title": "Forge 1.19.2 Java 版 (支持模组)", @@ -305,7 +350,7 @@ "gameType": "Palworld", "category": "Latest Version", "runtime": "Windows 10+", - "hardware": "RAM 4G+", + "hardware": "RAM 8G+", "size": "", "targetLink": "", "author": "MCSManager", @@ -329,7 +374,7 @@ "gameType": "Palworld", "category": "Latest Version", "runtime": "Ubuntu/Centos LTS", - "hardware": "RAM 4G+", + "hardware": "RAM 8G+", "size": "", "targetLink": "", "author": "MCSManager", @@ -367,7 +412,7 @@ "gameType": "Zombie Survival", "category": "Latest Version", "runtime": "Ubuntu/Centos LTS", - "hardware": "RAM 4G+", + "hardware": "RAM 8G+", "size": "", "targetLink": "", "author": "MCSManager", @@ -409,7 +454,7 @@ "gameType": "Terraria", "category": "Latest Version", "runtime": "Ubuntu/Centos LTS", - "hardware": "RAM 4G+", + "hardware": "RAM 8G+", "size": "", "targetLink": "", "author": "MCSManager", @@ -447,7 +492,7 @@ "title": "Minecraft 1.21.8", "category": "mc-purpur", "runtime": "Java 21+", - "hardware": "RAM 4G+", + "hardware": "RAM 8G+", "size": "55MB", "remark": "Only Purpur included", "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.8-2481.jar", @@ -516,7 +561,7 @@ "title": "Minecraft 1.21.4", "category": "mc-purpur", "runtime": "Java 21+", - "hardware": "RAM 4G+", + "hardware": "RAM 8G+", "size": "50MB", "remark": "Only Purpur included", "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.4-2416.jar", @@ -539,7 +584,7 @@ "title": "Minecraft 1.21.4", "category": "mc-paper", "runtime": "Java 21+", - "hardware": "RAM 4G+", + "hardware": "RAM 8G+", "size": "50MB", "remark": "Only Paper included", "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/232/downloads/paper-1.21.4-232.jar", @@ -608,7 +653,7 @@ "title": "Fabric 1.21.4 (Supports Mods)", "category": "mc-fabric", "runtime": "Java 21+", - "hardware": "RAM 4G+", + "hardware": "RAM 8G+", "size": "5MB", "remark": "Minecraft Fabric", "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", @@ -631,7 +676,7 @@ "title": "Fabric 1.21.8 (Supports Mods)", "category": "mc-fabric", "runtime": "Java 21+", - "hardware": "RAM 4G+", + "hardware": "RAM 8G+", "size": "5MB", "remark": "Minecraft Fabric", "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", From b405ed29e46e97fac9df311c1afa52a85929d528 Mon Sep 17 00:00:00 2001 From: yumao233 Date: Tue, 12 Aug 2025 19:16:11 +0800 Subject: [PATCH 224/338] feat: test new config --- market.json | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/market.json b/market.json index 9e81a8c..4e6d077 100644 --- a/market.json +++ b/market.json @@ -483,6 +483,52 @@ } } }, + { + "platform": "ALL", + "language": "en_us", + "gameType": "Minecraft", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "description": "[Paper] Minecraft 1.21.8 Paper Quick Server Setup", + "title": "Paper Minecraft 1.21.8 Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support", + "category": "mc-paper", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "100MB", + "remark": "Paper version only", + "targetLink": "https://fill-data.papermc.io/v1/objects/d310c61899acc608b683515c5c7ef929774bfd1b90262dac965e76c7e9ea8d22/paper-1.21.8-30.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java/paper", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.8-30.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "ALL", + "language": "en_us", + "gameType": "Minecraft", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "description": "[Paper] Minecraft 1.20.1 Paper Quick Server Setup", + "title": "Paper Minecraft 1.20.1 Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support", + "category": "mc-paper", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "100MB", + "remark": "Paper version only", + "targetLink": "https://fill-data.papermc.io/v1/objects/234a9b32098100c6fc116664d64e36ccdb58b5b649af0f80bcccb08b0255eaea/paper-1.20.1-196.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java/paper", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.20.1-196.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "platform": "ALL", "language": "en_us", From df39fa835cb828b372020deae46b3e095f32f2d0 Mon Sep 17 00:00:00 2001 From: yumao233 Date: Tue, 12 Aug 2025 19:17:39 +0800 Subject: [PATCH 225/338] feat: test new config --- market.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/market.json b/market.json index 4e6d077..aba3874 100644 --- a/market.json +++ b/market.json @@ -160,8 +160,8 @@ "language": "zh_cn", "gameType": "Minecraft", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "description": "[Paper] Minecraft 1.21.8 Paper 快速开服", - "title": "Paper Minecraft 1.21.8 快速开服,性能强,占用少,支持插件,不支持模组", + "description": "Paper Minecraft 1.21.8 快速开服,性能强,占用少,支持插件,不支持模组", + "title": "[Paper] Minecraft 1.21.8 Paper 快速开服", "category": "mc-paper", "runtime": "Java 21+", "hardware": "RAM 8G+", @@ -183,8 +183,8 @@ "language": "zh_cn", "gameType": "Minecraft", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "description": "[Paper] Minecraft 1.20.1 Paper 快速开服", - "title": "Paper Minecraft 1.20.1 快速开服,性能强,占用少,支持插件,不支持模组", + "description": "Paper Minecraft 1.20.1 快速开服,性能强,占用少,支持插件,不支持模组", + "title": "[Paper] Minecraft 1.20.1 Paper 快速开服", "category": "mc-paper", "runtime": "Java 21+", "hardware": "RAM 8G+", @@ -488,8 +488,8 @@ "language": "en_us", "gameType": "Minecraft", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "description": "[Paper] Minecraft 1.21.8 Paper Quick Server Setup", - "title": "Paper Minecraft 1.21.8 Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support", + "description": "[Paper] Minecraft 1.21.8 Paper Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support", + "title": "Paper Minecraft 1.21.8 Quick Server Setup", "category": "mc-paper", "runtime": "Java 21+", "hardware": "RAM 8G+", @@ -511,8 +511,8 @@ "language": "en_us", "gameType": "Minecraft", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "description": "[Paper] Minecraft 1.20.1 Paper Quick Server Setup", - "title": "Paper Minecraft 1.20.1 Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support", + "description": "[Paper] Minecraft 1.20.1 Paper Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support", + "title": "Paper Minecraft 1.20.1 Quick Server Setup", "category": "mc-paper", "runtime": "Java 21+", "hardware": "RAM 8G+", From 7b15861251bb9aed8df950f5df15a009bd2ddabc Mon Sep 17 00:00:00 2001 From: Yumao Date: Wed, 13 Aug 2025 20:31:14 +0800 Subject: [PATCH 226/338] Update market.json --- market.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/market.json b/market.json index aba3874..9cb8a7f 100644 --- a/market.json +++ b/market.json @@ -602,7 +602,7 @@ "platform": "ALL", "language": "en_us", "gameType": "Minecraft", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-purpur.webp", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "description": "[Purpur] Minecraft 1.21.4 Purpur", "title": "Minecraft 1.21.4", "category": "mc-purpur", @@ -694,7 +694,7 @@ "platform": "ALL", "language": "en_us", "gameType": "Minecraft", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-fabric.webp", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "description": "Minecraft 1.21.4 with Fabric Loader", "title": "Fabric 1.21.4 (Supports Mods)", "category": "mc-fabric", @@ -716,7 +716,7 @@ { "platform": "ALL", "language": "en_us", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-fabric.webp", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "description": "Minecraft 1.21.8 with Fabric Loader", "title": "Fabric 1.21.8 (Supports Mods)", From 8ac50703a6424f21189235c332a25706c354093a Mon Sep 17 00:00:00 2001 From: YuMao233 Date: Sat, 16 Aug 2025 19:48:10 +0800 Subject: [PATCH 227/338] =?UTF-8?q?feat:=20=E6=8D=A2=E4=B8=AA=E5=9B=BE?= =?UTF-8?q?=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- market.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/market.json b/market.json index 9cb8a7f..de4e39d 100644 --- a/market.json +++ b/market.json @@ -251,7 +251,7 @@ "language": "zh_cn", "platform": "Linux", "description": "Minecraft Forge 1.20.1 服务器,支持 Forge 模组!", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-mod.webp", "gameType": "Minecraft", "title": "Forge 1.20.1 Java 版 (支持模组)", "category": "mc-forge", @@ -274,7 +274,7 @@ "language": "zh_cn", "platform": "Windows", "description": "Minecraft Forge 1.20.1 服务器,支持 Forge 模组!", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-mod.webp", "gameType": "Minecraft", "title": "Forge 1.20.1 Java 版 (支持模组)", "category": "mc-forge", @@ -297,7 +297,7 @@ "language": "zh_cn", "platform": "Windows", "description": "适用于 Windows 系统,支持 Minecraft Forge 模组,快速开服!", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-mod.webp", "gameType": "Minecraft", "title": "Forge 1.20.6 Java 版 (支持模组)", "category": "mc-forge", @@ -320,7 +320,7 @@ "language": "zh_cn", "platform": "Windows", "description": "适用于 Windows 系统,支持 Minecraft Forge 模组,快速开服!", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-mod.webp", "gameType": "Minecraft", "title": "Forge 1.19.2 Java 版 (支持模组)", "category": "mc-forge", @@ -555,7 +555,7 @@ { "platform": "Linux", "language": "en_us", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-mod.webp", "gameType": "Minecraft", "description": "Forge 1.21.1 Server for Linux", "title": "Forge 1.21.1 (Supports Mods)", @@ -578,7 +578,7 @@ { "platform": "Windows", "language": "en_us", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-mod.webp", "gameType": "Minecraft", "description": "Forge 1.21.1 Server for Windows", "title": "Forge 1.21.1 (Supports Mods)", From a2d9f9513287208254645ae8432efd0736ed8130 Mon Sep 17 00:00:00 2001 From: YuMao233 Date: Sat, 16 Aug 2025 19:58:58 +0800 Subject: [PATCH 228/338] feat: del windows --- market.json | 52 ---------------------------------------------------- 1 file changed, 52 deletions(-) diff --git a/market.json b/market.json index de4e39d..e59f968 100644 --- a/market.json +++ b/market.json @@ -12,31 +12,6 @@ } ], "packages": [ - { - "title": "幻兽帕鲁官方服务器", - "language": "zh_cn", - "platform": "Windows", - "description": "适用于 Windows 的帕鲁们的最佳服务器!", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/palworld.webp", - "remark": "", - "gameType": "Palworld", - "category": "最新版本", - "runtime": "Windows 10+", - "hardware": "RAM 8G+", - "size": "", - "targetLink": "", - "author": "MCSManager", - "tags": ["仅适合个人使用", "Windows 版"], - "setupInfo": { - "tag": ["Palworld"], - "type": "steam/universal", - "startCommand": "PalServer.exe", - "stopCommand": "exit", - "updateCommand": "{mcsm_steamcmd} +login anonymous +force_install_dir \"{mcsm_workspace}\" +app_update 2394010 +quit", - "ie": "utf-8", - "oe": "utf-8" - } - }, { "title": "幻兽帕鲁官方服务器", "language": "zh_cn", @@ -116,7 +91,6 @@ } } }, - { "title": "Terraria 服务器", "language": "zh_cn", @@ -339,32 +313,6 @@ "oe": "utf-8" } }, - - { - "title": "Palworld Official Server", - "language": "en_us", - "platform": "Windows", - "description": "The best Palworld server for Windows!", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/palworld.webp", - "remark": "", - "gameType": "Palworld", - "category": "Latest Version", - "runtime": "Windows 10+", - "hardware": "RAM 8G+", - "size": "", - "targetLink": "", - "author": "MCSManager", - "tags": ["Windows version"], - "setupInfo": { - "tag": ["Palworld"], - "type": "steam/universal", - "startCommand": "PalServer.exe", - "stopCommand": "exit", - "updateCommand": "{mcsm_steamcmd} +login anonymous +force_install_dir \"{mcsm_workspace}\" +app_update 2394010 +quit", - "ie": "utf-8", - "oe": "utf-8" - } - }, { "title": "Palworld Official Server", "language": "en_us", From 54db55d52c63d299fe28669fcda0a0dcd7c75aec Mon Sep 17 00:00:00 2001 From: mmyddd Date: Sat, 16 Aug 2025 20:48:51 +0800 Subject: [PATCH 229/338] =?UTF-8?q?=E6=A3=AE=E6=9E=97=E4=B9=8B=E5=AD=90?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- market.json | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/market.json b/market.json index 9cb8a7f..42ec6ed 100644 --- a/market.json +++ b/market.json @@ -735,6 +735,31 @@ "ie": "utf-8", "oe": "utf-8" } + }, + { + "title": "森林之子 服务器", + "language": "zh_cn", + "platform": "Windows", + "description": "森林之子服务器,适用于 Windows 系统", + "image": "https://shared.cdn.queniuqe.com/store_item_assets/steam/apps/1326470/header.jpg?t=1708624856", + "remark": "请在防火墙放行8766(UDP) 27016(UDP) 9700(UDP)端口", + "gameType": "Son Of The Forest", + "category": "最新版本", + "runtime": "Windows 10+", + "hardware": "RAM 8G+", + "size": "", + "targetLink": "", + "author": "MCSManager", + "tags": ["仅适合个人使用", "Windows 版"], + "setupInfo": { + "tag": ["SonsOfTheForest"], + "type": "steam/universal", + "startCommand": "set SteamAppId=1326470 && set SteamGameId=1326470 && SonsOfTheForestDS.exe -userdatapath \"{mcsm_workspace}/userdata\" | consoleparser -colorize", + "stopCommand": "^C", + "updateCommand": "{mcsm_steamcmd} +login anonymous +force_install_dir \"{mcsm_workspace}\" +app_update 2465200 +quit", + "ie": "utf-8", + "oe": "utf-8" + } } ] } From c387b675de916d99292564a223a261bf738d75b4 Mon Sep 17 00:00:00 2001 From: mmyddd Date: Sat, 16 Aug 2025 21:50:21 +0800 Subject: [PATCH 230/338] =?UTF-8?q?scpsl=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- market.json | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/market.json b/market.json index 42ec6ed..f7fd721 100644 --- a/market.json +++ b/market.json @@ -760,6 +760,31 @@ "ie": "utf-8", "oe": "utf-8" } + }, + { + "title": "SCP秘密实验室 服务器", + "language": "zh_cn", + "platform": "Windows", + "description": "SCP秘密实验室服务器,适用于 Windows 系统", + "image": "https://shared.cdn.queniuqe.com/store_item_assets/steam/apps/700330/dad38399643cda1a4084b1faff60452427bef8c0/header.jpg?t=1747606719", + "remark": "第一次启动需要配置", + "gameType": "SCP秘密实验室", + "category": "最新版本", + "runtime": "Windows 10+", + "hardware": "RAM 8G+", + "size": "", + "targetLink": "", + "author": "MCSManager", + "tags": ["仅适合个人使用", "Windows 版"], + "setupInfo": { + "tag": ["SCP秘密实验室"], + "type": "steam/universal", + "startCommand": "LocalAdmin.exe", + "stopCommand": "stop", + "updateCommand": "{mcsm_steamcmd} +login anonymous +force_install_dir \"{mcsm_workspace}\" +app_update 996560 +quit", + "ie": "utf-8", + "oe": "utf-8" + } } ] } From c06f43628209ae59a2debd602563ef28648ff275 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=97=E8=B5=9B?= <3776473137@qq.com> Date: Sat, 16 Aug 2025 22:38:02 +0800 Subject: [PATCH 231/338] Update market.json --- market.json | 47 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/market.json b/market.json index e59f968..f19eb85 100644 --- a/market.json +++ b/market.json @@ -392,7 +392,6 @@ } } }, - { "title": "Terraria Server", "language": "en_us", @@ -683,6 +682,52 @@ "ie": "utf-8", "oe": "utf-8" } + }, + { + "title": "Squad 服务器", + "language": "zh_cn", + "platform": "Windows", + "description": "适用于 Windows 系统,快速开服", + "image": "https://squadovo.cn/img/header.jpg", + "gameType": "Squad", + "category": "最新版本", + "runtime": "Windows Server", + "hardware": "Intel Core 平台、RAM 8G+", + "size": "20GB", + "author": "南赛", + "remark": "需安装 Visual C++ 才可以运行", + "targetLink": "https://download.nansai.cc/steam/SteamCMD.exe", + "setupInfo": { + "type": "steam/universal", + "startCommand": ""steamapps/common/Squad Dedicated Server/SquadGame/Binaries/Win64/SquadGameServer.exe" Port=7787 QueryPort=15000 FIXEDMAXTICKRATE=30 -log", + "stopCommand": "^C", + "updateCommand": "SteamCMD.exe +login anonymous +force_install_dir \"%CD%\" +app_update 403240 validate +quit", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "title": "Squad Server", + "language": "en_us", + "platform": "Windows", + "description": "Suitable for Windows system, quick server setup", + "image": "https://squadovo.cn/img/header.jpg", + "gameType": "Squad", + "category": "Latest Version", + "runtime": "Windows Server", + "hardware": "Intel Core platform、RAM 8G+", + "size": "20GB", + "author": "南赛", + "remark": "Need to install Visual C++", + "targetLink": "https://download.nansai.cc/steam/SteamCMD.exe", + "setupInfo": { + "type": "steam/universal", + "startCommand": ""steamapps/common/Squad Dedicated Server/SquadGame/Binaries/Win64/SquadGameServer.exe" Port=7787 QueryPort=15000 FIXEDMAXTICKRATE=30 -log", + "stopCommand": "^C", + "updateCommand": "SteamCMD.exe +login anonymous +force_install_dir \"%CD%\" +app_update 403240 validate +quit", + "ie": "utf-8", + "oe": "utf-8" + } } ] } From 04e73ed8e490f68dccec8758f00a05f7fda07e83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=97=E8=B5=9B?= <3776473137@qq.com> Date: Sat, 16 Aug 2025 22:41:18 +0800 Subject: [PATCH 232/338] Update market.json --- market.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/market.json b/market.json index f19eb85..b03c4c8 100644 --- a/market.json +++ b/market.json @@ -699,7 +699,7 @@ "targetLink": "https://download.nansai.cc/steam/SteamCMD.exe", "setupInfo": { "type": "steam/universal", - "startCommand": ""steamapps/common/Squad Dedicated Server/SquadGame/Binaries/Win64/SquadGameServer.exe" Port=7787 QueryPort=15000 FIXEDMAXTICKRATE=30 -log", + "startCommand": ""\"steamapps/common/Squad Dedicated Server/SquadGame/Binaries/Win64/SquadGameServer.exe\" Port=7787 QueryPort=15000 FIXEDMAXTICKRATE=30 -log", "stopCommand": "^C", "updateCommand": "SteamCMD.exe +login anonymous +force_install_dir \"%CD%\" +app_update 403240 validate +quit", "ie": "utf-8", @@ -722,7 +722,7 @@ "targetLink": "https://download.nansai.cc/steam/SteamCMD.exe", "setupInfo": { "type": "steam/universal", - "startCommand": ""steamapps/common/Squad Dedicated Server/SquadGame/Binaries/Win64/SquadGameServer.exe" Port=7787 QueryPort=15000 FIXEDMAXTICKRATE=30 -log", + "startCommand": ""\"steamapps/common/Squad Dedicated Server/SquadGame/Binaries/Win64/SquadGameServer.exe\" Port=7787 QueryPort=15000 FIXEDMAXTICKRATE=30 -log", "stopCommand": "^C", "updateCommand": "SteamCMD.exe +login anonymous +force_install_dir \"%CD%\" +app_update 403240 validate +quit", "ie": "utf-8", From c17d91e0cf877a7e9e6fd8cea1bfaf895ece0314 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=97=E8=B5=9B?= <3776473137@qq.com> Date: Sat, 16 Aug 2025 22:41:50 +0800 Subject: [PATCH 233/338] Update market.json --- market.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/market.json b/market.json index b03c4c8..25b58a2 100644 --- a/market.json +++ b/market.json @@ -699,7 +699,7 @@ "targetLink": "https://download.nansai.cc/steam/SteamCMD.exe", "setupInfo": { "type": "steam/universal", - "startCommand": ""\"steamapps/common/Squad Dedicated Server/SquadGame/Binaries/Win64/SquadGameServer.exe\" Port=7787 QueryPort=15000 FIXEDMAXTICKRATE=30 -log", + "startCommand": "\"steamapps/common/Squad Dedicated Server/SquadGame/Binaries/Win64/SquadGameServer.exe\" Port=7787 QueryPort=15000 FIXEDMAXTICKRATE=30 -log", "stopCommand": "^C", "updateCommand": "SteamCMD.exe +login anonymous +force_install_dir \"%CD%\" +app_update 403240 validate +quit", "ie": "utf-8", @@ -722,7 +722,7 @@ "targetLink": "https://download.nansai.cc/steam/SteamCMD.exe", "setupInfo": { "type": "steam/universal", - "startCommand": ""\"steamapps/common/Squad Dedicated Server/SquadGame/Binaries/Win64/SquadGameServer.exe\" Port=7787 QueryPort=15000 FIXEDMAXTICKRATE=30 -log", + "startCommand": "\"steamapps/common/Squad Dedicated Server/SquadGame/Binaries/Win64/SquadGameServer.exe\" Port=7787 QueryPort=15000 FIXEDMAXTICKRATE=30 -log", "stopCommand": "^C", "updateCommand": "SteamCMD.exe +login anonymous +force_install_dir \"%CD%\" +app_update 403240 validate +quit", "ie": "utf-8", From 3518729cf7a61bff39642647d43b98f96b61994c Mon Sep 17 00:00:00 2001 From: mmyddd <98249707+mmyddd@users.noreply.github.com> Date: Sun, 17 Aug 2025 04:20:07 +0800 Subject: [PATCH 234/338] Update market.json --- market.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/market.json b/market.json index f7fd721..84439f1 100644 --- a/market.json +++ b/market.json @@ -747,9 +747,9 @@ "category": "最新版本", "runtime": "Windows 10+", "hardware": "RAM 8G+", - "size": "", + "size": "3.5GB", "targetLink": "", - "author": "MCSManager", + "author": "mmyddd", "tags": ["仅适合个人使用", "Windows 版"], "setupInfo": { "tag": ["SonsOfTheForest"], @@ -772,9 +772,9 @@ "category": "最新版本", "runtime": "Windows 10+", "hardware": "RAM 8G+", - "size": "", + "size": "1GB", "targetLink": "", - "author": "MCSManager", + "author": "mmyddd", "tags": ["仅适合个人使用", "Windows 版"], "setupInfo": { "tag": ["SCP秘密实验室"], From da36630164cd13015eea24a6ee9e0fbcb8693775 Mon Sep 17 00:00:00 2001 From: mmyddd <98249707+mmyddd@users.noreply.github.com> Date: Sun, 17 Aug 2025 04:31:39 +0800 Subject: [PATCH 235/338] =?UTF-8?q?=E8=A7=84=E8=8C=83=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE=EF=BC=8C=E5=A2=9E=E5=8A=A0enus?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- market.json | 78 +++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 64 insertions(+), 14 deletions(-) diff --git a/market.json b/market.json index 84439f1..1567f0a 100644 --- a/market.json +++ b/market.json @@ -339,6 +339,56 @@ "oe": "utf-8" } }, + { + "title": "森林之子 服务器", + "language": "zh_cn", + "platform": "Windows", + "description": "森林之子服务器,适用于 Windows 系统", + "image": "https://shared.cdn.queniuqe.com/store_item_assets/steam/apps/1326470/header.jpg?t=1708624856", + "remark": "请在防火墙放行8766(UDP) 27016(UDP) 9700(UDP)端口", + "gameType": "Son Of The Forest", + "category": "最新版本", + "runtime": "Windows 10+", + "hardware": "RAM 8G+", + "size": "3.5GB", + "targetLink": "", + "author": "mmyddd", + "tags": ["仅适合个人使用", "Windows 版"], + "setupInfo": { + "tag": ["SonsOfTheForest"], + "type": "steam/universal", + "startCommand": "set SteamAppId=1326470 && set SteamGameId=1326470 && SonsOfTheForestDS.exe -userdatapath \"{mcsm_workspace}/userdata\" | consoleparser -colorize", + "stopCommand": "^C", + "updateCommand": "{mcsm_steamcmd} +login anonymous +force_install_dir \"{mcsm_workspace}\" +app_update 2465200 +quit", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "title": "SCP秘密实验室 服务器", + "language": "zh_cn", + "platform": "Windows", + "description": "SCP秘密实验室服务器,适用于 Windows 系统", + "image": "https://shared.cdn.queniuqe.com/store_item_assets/steam/apps/700330/dad38399643cda1a4084b1faff60452427bef8c0/header.jpg?t=1747606719", + "remark": "第一次启动需要在控制台配置。服务器设置路径:%APPDATA%/SCP Secret Laboratory/config/{启动时控制台设置的端口}", + "gameType": "SCP秘密实验室", + "category": "最新版本", + "runtime": "Windows 10+", + "hardware": "RAM 8G+", + "size": "1GB", + "targetLink": "", + "author": "mmyddd", + "tags": ["仅适合个人使用", "Windows 版"], + "setupInfo": { + "tag": ["SCP秘密实验室"], + "type": "steam/universal", + "startCommand": "LocalAdmin.exe", + "stopCommand": "stop", + "updateCommand": "{mcsm_steamcmd} +login anonymous +force_install_dir \"{mcsm_workspace}\" +app_update 996560 +quit", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "title": "Palworld Official Server", @@ -737,20 +787,20 @@ } }, { - "title": "森林之子 服务器", - "language": "zh_cn", + "title": "Son Of The Forest Offical Server", + "language": "en_us", "platform": "Windows", - "description": "森林之子服务器,适用于 Windows 系统", + "description": "Son Of The Forest Server for Windows system.", "image": "https://shared.cdn.queniuqe.com/store_item_assets/steam/apps/1326470/header.jpg?t=1708624856", - "remark": "请在防火墙放行8766(UDP) 27016(UDP) 9700(UDP)端口", + "remark": "Please allow port 8766 (UDP) 27016 (UDP) 9700 (UDP) to pass through the firewall.", "gameType": "Son Of The Forest", - "category": "最新版本", + "category": "latest", "runtime": "Windows 10+", "hardware": "RAM 8G+", "size": "3.5GB", "targetLink": "", "author": "mmyddd", - "tags": ["仅适合个人使用", "Windows 版"], + "tags": ["Windows version"], "setupInfo": { "tag": ["SonsOfTheForest"], "type": "steam/universal", @@ -762,22 +812,22 @@ } }, { - "title": "SCP秘密实验室 服务器", - "language": "zh_cn", + "title": "SCP:SL Offical Server", + "language": "en_us", "platform": "Windows", - "description": "SCP秘密实验室服务器,适用于 Windows 系统", + "description": "SCP:SL Offical Server for Windows systen", "image": "https://shared.cdn.queniuqe.com/store_item_assets/steam/apps/700330/dad38399643cda1a4084b1faff60452427bef8c0/header.jpg?t=1747606719", - "remark": "第一次启动需要配置", - "gameType": "SCP秘密实验室", - "category": "最新版本", + "remark": "The first startup requires configuration in the console.Server Config Path:%APPDATA%/SCP Secret Laboratory/config/{port}", + "gameType": "SCP:SL", + "category": "latest", "runtime": "Windows 10+", "hardware": "RAM 8G+", "size": "1GB", "targetLink": "", "author": "mmyddd", - "tags": ["仅适合个人使用", "Windows 版"], + "tags": ["Windows version"], "setupInfo": { - "tag": ["SCP秘密实验室"], + "tag": ["SCP:SL"], "type": "steam/universal", "startCommand": "LocalAdmin.exe", "stopCommand": "stop", From a545241e92906ccfcdd59dd4a74b4ce67788f724 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=9C=E5=86=BB?= <414630368@qq.com> Date: Sun, 17 Aug 2025 14:24:31 +0800 Subject: [PATCH 236/338] =?UTF-8?q?=E6=B7=BB=E5=8A=A0EndstoneMC=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- market.json | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/market.json b/market.json index e59f968..cba85a3 100644 --- a/market.json +++ b/market.json @@ -683,6 +683,44 @@ "ie": "utf-8", "oe": "utf-8" } + }, + { + "title": "EndstoneMC官方服务器", + "language": "zh_cn", + "platform": "Linux", + "description": "适用于 Linux 系统,使用Endstone官方Docker镜像,一键快速开服!", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "gameType": "Minecraft", + "category": "最新版本", + "runtime": "Ubuntu/Centos LTS", + "hardware": "RAM 2G+", + "size": "", + "targetLink": "", + "author": "EndstoneMC", + "tags": ["可以商业出租","Docker版","官方镜像"], + "setupInfo": { + "startCommand": "endstone -y -s .", + "stopCommand": "stop", + "ie": "utf8", + "oe": "utf8", + "type": "minecraft/bedrock", + "tag": ["bedrock"], + "fileCode": "utf8", + "processType": "docker", + "updateCommand": "", + "docker": { + "image": "endstone/endstone:latest", + "containerName": "endstone-server", + "ports": ["{mcsm_port1}:19132/udp"], + "extraVolumes": [], + "memory": 2048, + "networkMode": "bridge", + "cpuUsage": 100, + "workingDir": "", + "env": [], + "changeWorkdir": true + } + } } ] } From 0b6b1dc7b29891d2e764cc7d90cd762b2f1d275e Mon Sep 17 00:00:00 2001 From: YuMao233 Date: Sun, 17 Aug 2025 18:26:29 +0800 Subject: [PATCH 237/338] feat: update market --- market.json | 60 +++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 49 insertions(+), 11 deletions(-) diff --git a/market.json b/market.json index 82b2c29..fd11d6d 100644 --- a/market.json +++ b/market.json @@ -687,21 +687,21 @@ "title": "Squad 服务器", "language": "zh_cn", "platform": "Windows", - "description": "适用于 Windows 系统,快速开服", + "description": "适用于 Windows 系统的战术新队服务器,快速开服", "image": "https://squadovo.cn/img/header.jpg", "gameType": "Squad", "category": "最新版本", - "runtime": "Windows Server", + "runtime": "Windows", "hardware": "Intel Core 平台、RAM 8G+", "size": "20GB", "author": "南赛", "remark": "需安装 Visual C++ 才可以运行", - "targetLink": "https://download.nansai.cc/steam/SteamCMD.exe", + "targetLink": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/steamcmd.exe", "setupInfo": { "type": "steam/universal", "startCommand": "\"steamapps/common/Squad Dedicated Server/SquadGame/Binaries/Win64/SquadGameServer.exe\" Port=7787 QueryPort=15000 FIXEDMAXTICKRATE=30 -log", "stopCommand": "^C", - "updateCommand": "SteamCMD.exe +login anonymous +force_install_dir \"%CD%\" +app_update 403240 validate +quit", + "updateCommand": "steamcmd.exe +login anonymous +force_install_dir \"%CD%\" +app_update 403240 validate +quit", "ie": "utf-8", "oe": "utf-8" } @@ -719,30 +719,68 @@ "size": "20GB", "author": "南赛", "remark": "Need to install Visual C++", - "targetLink": "https://download.nansai.cc/steam/SteamCMD.exe", + "targetLink": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/steamcmd.exe", "setupInfo": { "type": "steam/universal", "startCommand": "\"steamapps/common/Squad Dedicated Server/SquadGame/Binaries/Win64/SquadGameServer.exe\" Port=7787 QueryPort=15000 FIXEDMAXTICKRATE=30 -log", "stopCommand": "^C", - "updateCommand": "SteamCMD.exe +login anonymous +force_install_dir \"%CD%\" +app_update 403240 validate +quit", + "updateCommand": "steamcmd.exe +login anonymous +force_install_dir \"%CD%\" +app_update 403240 validate +quit", "ie": "utf-8", "oe": "utf-8" } }, { - "title": "EndstoneMC官方服务器", + "title": "EndStone MC 服务端", "language": "zh_cn", "platform": "Linux", - "description": "适用于 Linux 系统,使用Endstone官方Docker镜像,一键快速开服!", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "description": "适用于 Linux 系统,使用 EndStone MC 官方 Docker 镜像,一键快速开服!", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/endstone_mc.webp", "gameType": "Minecraft", "category": "最新版本", "runtime": "Ubuntu/Centos LTS", "hardware": "RAM 2G+", "size": "", "targetLink": "", - "author": "EndstoneMC", - "tags": ["可以商业出租","Docker版","官方镜像"], + "author": "EndStone", + "tags": ["可以商业出租", "Docker版"], + "setupInfo": { + "startCommand": "endstone -y -s .", + "stopCommand": "stop", + "ie": "utf8", + "oe": "utf8", + "type": "minecraft/bedrock", + "tag": ["bedrock"], + "fileCode": "utf8", + "processType": "docker", + "updateCommand": "", + "docker": { + "image": "endstone/endstone:latest", + "containerName": "endstone-server", + "ports": ["{mcsm_port1}:19132/udp"], + "extraVolumes": [], + "memory": 2048, + "networkMode": "bridge", + "cpuUsage": 100, + "workingDir": "", + "env": [], + "changeWorkdir": true + } + } + }, + { + "title": "EndStone MC Server", + "language": "en_us", + "platform": "Linux", + "description": "For Linux, using the official EndStone MC Docker image, one-click to quickly set up the server!", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/endstone_mc.webp", + "gameType": "Minecraft", + "category": "Latest Version", + "runtime": "Ubuntu/Centos LTS", + "hardware": "RAM 2G+", + "size": "", + "targetLink": "", + "author": "EndStone", + "tags": ["Docker version"], "setupInfo": { "startCommand": "endstone -y -s .", "stopCommand": "stop", From 38164f34f421e2de2320679821d8f28d447b8fde Mon Sep 17 00:00:00 2001 From: YuMao233 Date: Sun, 17 Aug 2025 18:27:28 +0800 Subject: [PATCH 238/338] feat: update market --- templates.json | 189 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 189 insertions(+) diff --git a/templates.json b/templates.json index 6bd8682..f2fb252 100644 --- a/templates.json +++ b/templates.json @@ -1775,6 +1775,195 @@ "oe": "utf-8" } }, + { + "language": "en_us", + "gameType": "Minecraft", + "description": "[Paper] Minecraft 1.21.8 Paper", + "title": "Minecraft 1.21.8", + "category": "mc-paper", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Paper included", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.8/builds/10/downloads/paper-1.21.8-10.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java/paper", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.8-10.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "gameType": "Minecraft", + "description": "[Paper] Minecraft 1.21.6 Paper", + "title": "Minecraft 1.21.6", + "category": "mc-paper", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Paper included", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.6/builds/48/downloads/paper-1.21.4-48.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java/paper", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.6-48.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "gameType": "Minecraft", + "description": "[Paper] Minecraft 1.21.4 Paper", + "title": "Minecraft 1.21.4", + "category": "mc-paper", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Paper included", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/232/downloads/paper-1.21.4-232.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java/paper", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.4-232.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "gameType": "Minecraft", + "description": "[Paper] Minecraft 1.21.3 Paper", + "title": "Minecraft 1.21.3", + "category": "mc-paper", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Paper included", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.3/builds/82/downloads/paper-1.21.3-82.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java/paper", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.3-82.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "gameType": "Minecraft", + "description": "[Paper] Minecraft 1.21.1 Paper", + "title": "Minecraft 1.21.1", + "category": "mc-paper", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Paper included", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.1/builds/132/downloads/paper-1.21.1-132.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java/paper", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.1-132.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "gameType": "Minecraft", + "description": "[Paper] Minecraft 1.20.6 Paper", + "title": "Minecraft 1.20.6", + "category": "mc-paper", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Paper included", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.20.6/builds/151/downloads/paper-1.20.6-151.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java/paper", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.20.6-151.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "gameType": "Minecraft", + "description": "[Paper] Minecraft 1.20.4 Paper", + "title": "Minecraft 1.20.4", + "category": "mc-paper", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Paper included", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.20.4/builds/499/downloads/paper-1.20.4-499.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java/paper", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.20.4-499.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "gameType": "Minecraft", + "description": "[Paper] Minecraft 1.20.2 Paper", + "title": "Minecraft 1.20.2", + "category": "mc-paper", + "runtime": "Java 17+", + "hardware": "RAM 4G+", + "size": "150MB", + "remark": "Includes some basic plugins", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.20.2/builds/318/downloads/paper-1.20.2-318.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java/paper", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.20.2-318.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "gameType": "Minecraft", + "description": "[Paper] Minecraft 1.20.1 Paper", + "title": "Minecraft 1.20.1", + "category": "mc-paper", + "runtime": "Java 17+", + "hardware": "RAM 4G+", + "size": "200MB", + "remark": "Includes some basic plugins", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.20.1/builds/196/downloads/paper-1.20.1-196.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java/paper", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.20.1-196.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "language": "zh_cn", "gameType": "Minecraft", From c4a25c52c30df3d8e8e3f071e39ea77cf95d2f38 Mon Sep 17 00:00:00 2001 From: YuMao233 Date: Sun, 17 Aug 2025 18:32:31 +0800 Subject: [PATCH 239/338] feat: update market --- market.json | 186 ++++++++++++++++++++++++++-------------------------- 1 file changed, 94 insertions(+), 92 deletions(-) diff --git a/market.json b/market.json index fd11d6d..6219e01 100644 --- a/market.json +++ b/market.json @@ -12,6 +12,52 @@ } ], "packages": [ + { + "language": "zh_cn", + "platform": "ALL", + "description": "[Paper] Minecraft 1.21.1 快速开服", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/wallpaper.webp", + "gameType": "Minecraft", + "title": "Minecraft 1.21.1 快速开服", + "category": "mc-paper", + "runtime": "Java 17+", + "hardware": "RAM 8G+", + "size": "250MB", + "remark": "包含基础插件,萌新快速开服!低配机器专属!", + "targetLink": "https://cloud.alongw.cn/f/DzvHK/Paper-1.21.1-ZH.zip", + "author": "alongw.cn", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -Xms4096M -Xmx4096M -jar server.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "zh_cn", + "platform": "ALL", + "description": "[Paper] 中小型互通服推荐,1.20.4 版本,快速开服,包含ESS、锁箱子、操作回滚、领地商店等基础插件。", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/wallpaper.webp", + "gameType": "Minecraft", + "title": "Minecraft 1.20.4", + "category": "mc-paper", + "runtime": "Java 21+", + "hardware": "RAM 6G+", + "size": "140MB", + "remark": "支持插件,最低 8GB 内存要求", + "targetLink": "https://url.alww.top/mcsm/paper1.20.4.zip", + "author": "alongw.cn", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -Xms6144M -Xmx6144M -jar server.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "title": "幻兽帕鲁官方服务器", "language": "zh_cn", @@ -129,6 +175,52 @@ } } }, + { + "title": "Squad 服务器", + "language": "zh_cn", + "platform": "Windows", + "description": "适用于 Windows 系统的战术新队服务器,快速开服", + "image": "https://squadovo.cn/img/header.jpg", + "gameType": "Squad", + "category": "最新版本", + "runtime": "Windows", + "hardware": "Intel Core 平台、RAM 8G+", + "size": "20GB", + "author": "南赛", + "remark": "需安装 Visual C++ 才可以运行", + "targetLink": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/steamcmd.exe", + "setupInfo": { + "type": "steam/universal", + "startCommand": "\"steamapps/common/Squad Dedicated Server/SquadGame/Binaries/Win64/SquadGameServer.exe\" Port=7787 QueryPort=15000 FIXEDMAXTICKRATE=30 -log", + "stopCommand": "^C", + "updateCommand": "steamcmd.exe +login anonymous +force_install_dir \"%CD%\" +app_update 403240 validate +quit", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "title": "Squad Server", + "language": "en_us", + "platform": "Windows", + "description": "Suitable for Windows system, quick server setup", + "image": "https://squadovo.cn/img/header.jpg", + "gameType": "Squad", + "category": "Latest Version", + "runtime": "Windows Server", + "hardware": "Intel Core platform、RAM 8G+", + "size": "20GB", + "author": "南赛", + "remark": "Need to install Visual C++", + "targetLink": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/steamcmd.exe", + "setupInfo": { + "type": "steam/universal", + "startCommand": "\"steamapps/common/Squad Dedicated Server/SquadGame/Binaries/Win64/SquadGameServer.exe\" Port=7787 QueryPort=15000 FIXEDMAXTICKRATE=30 -log", + "stopCommand": "^C", + "updateCommand": "steamcmd.exe +login anonymous +force_install_dir \"%CD%\" +app_update 403240 validate +quit", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "platform": "ALL", "language": "zh_cn", @@ -175,52 +267,7 @@ "oe": "utf-8" } }, - { - "language": "zh_cn", - "platform": "ALL", - "description": "[Paper] Minecraft 1.21.1 快速开服", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Minecraft 1.21.1 快速开服", - "category": "mc-paper", - "runtime": "Java 17+", - "hardware": "RAM 8G+", - "size": "250MB", - "remark": "包含基础插件,萌新快速开服!低配机器专属!", - "targetLink": "https://cloud.alongw.cn/f/DzvHK/Paper-1.21.1-ZH.zip", - "author": "alongw.cn", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "java -Xms4096M -Xmx4096M -jar server.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "zh_cn", - "platform": "ALL", - "description": "[Paper] 中小型互通服推荐,1.20.4 版本,快速开服,包含ESS、锁箱子、操作回滚、领地商店等基础插件。", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "gameType": "Minecraft", - "title": "Minecraft 1.20.4", - "category": "mc-paper", - "runtime": "Java 21+", - "hardware": "RAM 6G+", - "size": "140MB", - "remark": "支持插件,最低 8GB 内存要求", - "targetLink": "https://url.alww.top/mcsm/paper1.20.4.zip", - "author": "alongw.cn", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "java -Xms6144M -Xmx6144M -jar server.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, + { "language": "zh_cn", "platform": "Linux", @@ -683,52 +730,7 @@ "oe": "utf-8" } }, - { - "title": "Squad 服务器", - "language": "zh_cn", - "platform": "Windows", - "description": "适用于 Windows 系统的战术新队服务器,快速开服", - "image": "https://squadovo.cn/img/header.jpg", - "gameType": "Squad", - "category": "最新版本", - "runtime": "Windows", - "hardware": "Intel Core 平台、RAM 8G+", - "size": "20GB", - "author": "南赛", - "remark": "需安装 Visual C++ 才可以运行", - "targetLink": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/steamcmd.exe", - "setupInfo": { - "type": "steam/universal", - "startCommand": "\"steamapps/common/Squad Dedicated Server/SquadGame/Binaries/Win64/SquadGameServer.exe\" Port=7787 QueryPort=15000 FIXEDMAXTICKRATE=30 -log", - "stopCommand": "^C", - "updateCommand": "steamcmd.exe +login anonymous +force_install_dir \"%CD%\" +app_update 403240 validate +quit", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "title": "Squad Server", - "language": "en_us", - "platform": "Windows", - "description": "Suitable for Windows system, quick server setup", - "image": "https://squadovo.cn/img/header.jpg", - "gameType": "Squad", - "category": "Latest Version", - "runtime": "Windows Server", - "hardware": "Intel Core platform、RAM 8G+", - "size": "20GB", - "author": "南赛", - "remark": "Need to install Visual C++", - "targetLink": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/steamcmd.exe", - "setupInfo": { - "type": "steam/universal", - "startCommand": "\"steamapps/common/Squad Dedicated Server/SquadGame/Binaries/Win64/SquadGameServer.exe\" Port=7787 QueryPort=15000 FIXEDMAXTICKRATE=30 -log", - "stopCommand": "^C", - "updateCommand": "steamcmd.exe +login anonymous +force_install_dir \"%CD%\" +app_update 403240 validate +quit", - "ie": "utf-8", - "oe": "utf-8" - } - }, + { "title": "EndStone MC 服务端", "language": "zh_cn", From 964f611fcb3b89fec4798342573457b528b1f81b Mon Sep 17 00:00:00 2001 From: YuMao233 Date: Sun, 17 Aug 2025 18:33:43 +0800 Subject: [PATCH 240/338] feat: update market --- market.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/market.json b/market.json index 6219e01..bdc68d9 100644 --- a/market.json +++ b/market.json @@ -138,7 +138,7 @@ } }, { - "title": "Terraria 服务器", + "title": "泰拉瑞亚服务器", "language": "zh_cn", "platform": "Linux", "description": "适用于 Linux 系统,使用《Terraria》第三方 Docker 镜像,快速开服!", @@ -176,7 +176,7 @@ } }, { - "title": "Squad 服务器", + "title": "战术小队服务器", "language": "zh_cn", "platform": "Windows", "description": "适用于 Windows 系统的战术新队服务器,快速开服", From c4939be2a01331099737c31c37a922b94b221c8f Mon Sep 17 00:00:00 2001 From: YuMao233 Date: Sun, 17 Aug 2025 18:34:31 +0800 Subject: [PATCH 241/338] feat: update market --- market.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/market.json b/market.json index bdc68d9..f35cf94 100644 --- a/market.json +++ b/market.json @@ -15,7 +15,7 @@ { "language": "zh_cn", "platform": "ALL", - "description": "[Paper] Minecraft 1.21.1 快速开服", + "description": " Minecraft 1.21.1 快速开服", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/wallpaper.webp", "gameType": "Minecraft", "title": "Minecraft 1.21.1 快速开服", @@ -38,7 +38,7 @@ { "language": "zh_cn", "platform": "ALL", - "description": "[Paper] 中小型互通服推荐,1.20.4 版本,快速开服,包含ESS、锁箱子、操作回滚、领地商店等基础插件。", + "description": " 中小型互通服推荐,1.20.4 版本,快速开服,包含ESS、锁箱子、操作回滚、领地商店等基础插件。", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/wallpaper.webp", "gameType": "Minecraft", "title": "Minecraft 1.20.4", @@ -227,7 +227,7 @@ "gameType": "Minecraft", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "description": "Paper Minecraft 1.21.8 快速开服,性能强,占用少,支持插件,不支持模组", - "title": "[Paper] Minecraft 1.21.8 Paper 快速开服", + "title": "Minecraft 1.21.8 Paper 快速开服", "category": "mc-paper", "runtime": "Java 21+", "hardware": "RAM 8G+", @@ -250,7 +250,7 @@ "gameType": "Minecraft", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "description": "Paper Minecraft 1.20.1 快速开服,性能强,占用少,支持插件,不支持模组", - "title": "[Paper] Minecraft 1.20.1 Paper 快速开服", + "title": "Minecraft 1.20.1 Paper 快速开服", "category": "mc-paper", "runtime": "Java 21+", "hardware": "RAM 8G+", @@ -482,7 +482,7 @@ "language": "en_us", "gameType": "Minecraft", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "description": "[Paper] Minecraft 1.21.8 Paper Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support", + "description": "Minecraft 1.21.8 Paper Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support", "title": "Paper Minecraft 1.21.8 Quick Server Setup", "category": "mc-paper", "runtime": "Java 21+", @@ -505,7 +505,7 @@ "language": "en_us", "gameType": "Minecraft", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "description": "[Paper] Minecraft 1.20.1 Paper Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support", + "description": "Minecraft 1.20.1 Paper Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support", "title": "Paper Minecraft 1.20.1 Quick Server Setup", "category": "mc-paper", "runtime": "Java 21+", @@ -620,7 +620,7 @@ "language": "en_us", "gameType": "Minecraft", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "description": "[Paper] Minecraft 1.21.4 Paper", + "description": "Minecraft 1.21.4 Paper", "title": "Minecraft 1.21.4", "category": "mc-paper", "runtime": "Java 21+", From 2a2250ed1a23a2bb89382b584977ae3a97a715df Mon Sep 17 00:00:00 2001 From: YuMao233 Date: Sun, 17 Aug 2025 18:46:14 +0800 Subject: [PATCH 242/338] feat: update market --- market.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/market.json b/market.json index f35cf94..763d796 100644 --- a/market.json +++ b/market.json @@ -193,7 +193,7 @@ "type": "steam/universal", "startCommand": "\"steamapps/common/Squad Dedicated Server/SquadGame/Binaries/Win64/SquadGameServer.exe\" Port=7787 QueryPort=15000 FIXEDMAXTICKRATE=30 -log", "stopCommand": "^C", - "updateCommand": "steamcmd.exe +login anonymous +force_install_dir \"%CD%\" +app_update 403240 validate +quit", + "updateCommand": "steamcmd.exe +login anonymous +force_install_dir \"{mcsm_workspace}\" +app_update 403240 validate +quit", "ie": "utf-8", "oe": "utf-8" } @@ -216,7 +216,7 @@ "type": "steam/universal", "startCommand": "\"steamapps/common/Squad Dedicated Server/SquadGame/Binaries/Win64/SquadGameServer.exe\" Port=7787 QueryPort=15000 FIXEDMAXTICKRATE=30 -log", "stopCommand": "^C", - "updateCommand": "steamcmd.exe +login anonymous +force_install_dir \"%CD%\" +app_update 403240 validate +quit", + "updateCommand": "steamcmd.exe +login anonymous +force_install_dir \"{mcsm_workspace}\" +app_update 403240 validate +quit", "ie": "utf-8", "oe": "utf-8" } From 828305f4f05185d520040ac8323c28f22632c4fb Mon Sep 17 00:00:00 2001 From: YuMao233 Date: Sun, 17 Aug 2025 18:50:18 +0800 Subject: [PATCH 243/338] feat: update market --- market.json | 272 ++++++++++++++++++++++++++-------------------------- 1 file changed, 137 insertions(+), 135 deletions(-) diff --git a/market.json b/market.json index 763d796..86d79a8 100644 --- a/market.json +++ b/market.json @@ -12,6 +12,44 @@ } ], "packages": [ + { + "title": "泰拉瑞亚服务器", + "language": "zh_cn", + "platform": "Linux", + "description": "适用于 Linux 系统,使用《Terraria》第三方 Docker 镜像,快速开服!", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/terraria.webp", + "gameType": "Terraria", + "category": "最新版本", + "runtime": "Ubuntu/Centos LTS", + "hardware": "RAM 8G+", + "size": "", + "targetLink": "", + "author": "MCSManager", + "tags": ["可以商业出租", "Docker 版"], + "setupInfo": { + "startCommand": "", + "stopCommand": "exit", + "ie": "utf8", + "oe": "utf8", + "type": "steam/terraria", + "tag": ["terraria"], + "fileCode": "utf8", + "processType": "docker", + "updateCommand": "", + "docker": { + "image": "ryshe/terraria:latest", + "containerName": "terraria-server", + "ports": ["{mcsm_port1}:7777/tcp"], + "extraVolumes": [], + "memory": 4096, + "networkMode": "bridge", + "cpuUsage": 100, + "workingDir": "/root/.local/share/Terraria/Worlds", + "env": [], + "changeWorkdir": false + } + } + }, { "language": "zh_cn", "platform": "ALL", @@ -138,89 +176,43 @@ } }, { - "title": "泰拉瑞亚服务器", - "language": "zh_cn", + "title": "EndStone MC Server", + "language": "en_us", "platform": "Linux", - "description": "适用于 Linux 系统,使用《Terraria》第三方 Docker 镜像,快速开服!", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/terraria.webp", - "gameType": "Terraria", - "category": "最新版本", + "description": "For Linux, using the official EndStone MC Docker image, one-click to quickly set up the server!", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/endstone_mc.webp", + "gameType": "Minecraft", + "category": "Latest Version", "runtime": "Ubuntu/Centos LTS", - "hardware": "RAM 8G+", + "hardware": "RAM 2G+", "size": "", "targetLink": "", - "author": "MCSManager", - "tags": ["可以商业出租", "Docker 版"], + "author": "EndStone", + "tags": ["Docker version"], "setupInfo": { - "startCommand": "", - "stopCommand": "exit", + "startCommand": "endstone -y -s .", + "stopCommand": "stop", "ie": "utf8", "oe": "utf8", - "type": "steam/terraria", - "tag": ["terraria"], + "type": "minecraft/bedrock", + "tag": ["bedrock"], "fileCode": "utf8", "processType": "docker", "updateCommand": "", "docker": { - "image": "ryshe/terraria:latest", - "containerName": "terraria-server", - "ports": ["{mcsm_port1}:7777/tcp"], + "image": "endstone/endstone:latest", + "containerName": "endstone-server", + "ports": ["{mcsm_port1}:19132/udp"], "extraVolumes": [], - "memory": 4096, + "memory": 2048, "networkMode": "bridge", "cpuUsage": 100, - "workingDir": "/root/.local/share/Terraria/Worlds", + "workingDir": "", "env": [], - "changeWorkdir": false + "changeWorkdir": true } } }, - { - "title": "战术小队服务器", - "language": "zh_cn", - "platform": "Windows", - "description": "适用于 Windows 系统的战术新队服务器,快速开服", - "image": "https://squadovo.cn/img/header.jpg", - "gameType": "Squad", - "category": "最新版本", - "runtime": "Windows", - "hardware": "Intel Core 平台、RAM 8G+", - "size": "20GB", - "author": "南赛", - "remark": "需安装 Visual C++ 才可以运行", - "targetLink": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/steamcmd.exe", - "setupInfo": { - "type": "steam/universal", - "startCommand": "\"steamapps/common/Squad Dedicated Server/SquadGame/Binaries/Win64/SquadGameServer.exe\" Port=7787 QueryPort=15000 FIXEDMAXTICKRATE=30 -log", - "stopCommand": "^C", - "updateCommand": "steamcmd.exe +login anonymous +force_install_dir \"{mcsm_workspace}\" +app_update 403240 validate +quit", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "title": "Squad Server", - "language": "en_us", - "platform": "Windows", - "description": "Suitable for Windows system, quick server setup", - "image": "https://squadovo.cn/img/header.jpg", - "gameType": "Squad", - "category": "Latest Version", - "runtime": "Windows Server", - "hardware": "Intel Core platform、RAM 8G+", - "size": "20GB", - "author": "南赛", - "remark": "Need to install Visual C++", - "targetLink": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/steamcmd.exe", - "setupInfo": { - "type": "steam/universal", - "startCommand": "\"steamapps/common/Squad Dedicated Server/SquadGame/Binaries/Win64/SquadGameServer.exe\" Port=7787 QueryPort=15000 FIXEDMAXTICKRATE=30 -log", - "stopCommand": "^C", - "updateCommand": "steamcmd.exe +login anonymous +force_install_dir \"{mcsm_workspace}\" +app_update 403240 validate +quit", - "ie": "utf-8", - "oe": "utf-8" - } - }, { "platform": "ALL", "language": "zh_cn", @@ -360,6 +352,44 @@ "oe": "utf-8" } }, + { + "title": "Terraria Server", + "language": "en_us", + "platform": "Linux", + "description": "For Linux systems, using a third-party Docker image of Terraria for quick server deployment!", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/terraria.webp", + "gameType": "Terraria", + "category": "Latest Version", + "runtime": "Ubuntu/Centos LTS", + "hardware": "RAM 8G+", + "size": "", + "targetLink": "", + "author": "MCSManager", + "tags": ["Docker version"], + "setupInfo": { + "startCommand": "", + "stopCommand": "exit", + "ie": "utf8", + "oe": "utf8", + "type": "steam/terraria", + "tag": ["terraria"], + "fileCode": "utf8", + "processType": "docker", + "updateCommand": "", + "docker": { + "image": "ryshe/terraria:latest", + "containerName": "terraria-server", + "ports": ["{mcsm_port1}:7777/tcp"], + "extraVolumes": [], + "memory": 4096, + "networkMode": "bridge", + "cpuUsage": 100, + "workingDir": "/root/.local/share/Terraria/Worlds", + "env": [], + "changeWorkdir": false + } + } + }, { "title": "Palworld Official Server", "language": "en_us", @@ -439,44 +469,7 @@ } } }, - { - "title": "Terraria Server", - "language": "en_us", - "platform": "Linux", - "description": "For Linux systems, using a third-party Docker image of Terraria for quick server deployment!", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/terraria.webp", - "gameType": "Terraria", - "category": "Latest Version", - "runtime": "Ubuntu/Centos LTS", - "hardware": "RAM 8G+", - "size": "", - "targetLink": "", - "author": "MCSManager", - "tags": ["Docker version"], - "setupInfo": { - "startCommand": "", - "stopCommand": "exit", - "ie": "utf8", - "oe": "utf8", - "type": "steam/terraria", - "tag": ["terraria"], - "fileCode": "utf8", - "processType": "docker", - "updateCommand": "", - "docker": { - "image": "ryshe/terraria:latest", - "containerName": "terraria-server", - "ports": ["{mcsm_port1}:7777/tcp"], - "extraVolumes": [], - "memory": 4096, - "networkMode": "bridge", - "cpuUsage": 100, - "workingDir": "/root/.local/share/Terraria/Worlds", - "env": [], - "changeWorkdir": false - } - } - }, + { "platform": "ALL", "language": "en_us", @@ -769,42 +762,51 @@ } } }, + { - "title": "EndStone MC Server", + "title": "战术小队服务器", + "language": "zh_cn", + "platform": "Windows", + "description": "适用于 Windows 系统的战术新队服务器,快速开服", + "image": "https://squadovo.cn/img/header.jpg", + "gameType": "Squad", + "category": "最新版本", + "runtime": "Windows", + "hardware": "Intel Core 平台、RAM 8G+", + "size": "20GB", + "author": "南赛", + "remark": "需安装 Visual C++ 才可以运行", + "targetLink": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/steamcmd.exe", + "setupInfo": { + "type": "steam/universal", + "startCommand": "\"steamapps/common/Squad Dedicated Server/SquadGame/Binaries/Win64/SquadGameServer.exe\" Port=7787 QueryPort=15000 FIXEDMAXTICKRATE=30 -log", + "stopCommand": "^C", + "updateCommand": "steamcmd.exe +login anonymous +force_install_dir \"{mcsm_workspace}\" +app_update 403240 validate +quit", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "title": "Squad Server", "language": "en_us", - "platform": "Linux", - "description": "For Linux, using the official EndStone MC Docker image, one-click to quickly set up the server!", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/endstone_mc.webp", - "gameType": "Minecraft", + "platform": "Windows", + "description": "Suitable for Windows system, quick server setup", + "image": "https://squadovo.cn/img/header.jpg", + "gameType": "Squad", "category": "Latest Version", - "runtime": "Ubuntu/Centos LTS", - "hardware": "RAM 2G+", - "size": "", - "targetLink": "", - "author": "EndStone", - "tags": ["Docker version"], + "runtime": "Windows Server", + "hardware": "Intel Core platform、RAM 8G+", + "size": "20GB", + "author": "南赛", + "remark": "Need to install Visual C++", + "targetLink": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/steamcmd.exe", "setupInfo": { - "startCommand": "endstone -y -s .", - "stopCommand": "stop", - "ie": "utf8", - "oe": "utf8", - "type": "minecraft/bedrock", - "tag": ["bedrock"], - "fileCode": "utf8", - "processType": "docker", - "updateCommand": "", - "docker": { - "image": "endstone/endstone:latest", - "containerName": "endstone-server", - "ports": ["{mcsm_port1}:19132/udp"], - "extraVolumes": [], - "memory": 2048, - "networkMode": "bridge", - "cpuUsage": 100, - "workingDir": "", - "env": [], - "changeWorkdir": true - } + "type": "steam/universal", + "startCommand": "\"steamapps/common/Squad Dedicated Server/SquadGame/Binaries/Win64/SquadGameServer.exe\" Port=7787 QueryPort=15000 FIXEDMAXTICKRATE=30 -log", + "stopCommand": "^C", + "updateCommand": "steamcmd.exe +login anonymous +force_install_dir \"{mcsm_workspace}\" +app_update 403240 validate +quit", + "ie": "utf-8", + "oe": "utf-8" } } ] From 6b58b26bcbe9a3851fa22e4a636db79243386b04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=97=E8=B5=9B?= <3776473137@qq.com> Date: Sun, 17 Aug 2025 19:10:57 +0800 Subject: [PATCH 244/338] Update market.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新增 人渣 修复了原仓库错别字 --- market.json | 52 +++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 49 insertions(+), 3 deletions(-) diff --git a/market.json b/market.json index 86d79a8..5426ee5 100644 --- a/market.json +++ b/market.json @@ -764,10 +764,10 @@ }, { - "title": "战术小队服务器", + "title": "战术小队 服务器", "language": "zh_cn", "platform": "Windows", - "description": "适用于 Windows 系统的战术新队服务器,快速开服", + "description": "适用于 Windows 系统的战术小队服务器,快速开服", "image": "https://squadovo.cn/img/header.jpg", "gameType": "Squad", "category": "最新版本", @@ -790,7 +790,7 @@ "title": "Squad Server", "language": "en_us", "platform": "Windows", - "description": "Suitable for Windows system, quick server setup", + "description": "Squad Server suitable for Windows system, fast server setup", "image": "https://squadovo.cn/img/header.jpg", "gameType": "Squad", "category": "Latest Version", @@ -808,6 +808,52 @@ "ie": "utf-8", "oe": "utf-8" } + }, + { + "title": "人渣 服务器", + "language": "zh_cn", + "platform": "Windows", + "description": "适用于 Windows 系统的人渣服务器,快速开服", + "image": "https://api.nansai.cc/img/scum/header_chinese.jpg", + "gameType": "SCUM", + "category": "最新版本", + "runtime": "Windows Server", + "hardware": "Intel Core 平台、RAM 8G+", + "size": "20GB", + "author": "南赛", + "remark": "需安装 Visual C++ 才可以运行", + "targetLink": "https://download.nansai.cc/steam/SteamCMD.exe", + "setupInfo": { + "type": "steam/universal", + "startCommand": "\"steamapps/common/SCUM Server/SCUM/Binaries/Win64/SCUMServer.exe\" -port=7779 -log", + "stopCommand": "^C", + "updateCommand": "SteamCMD.exe +login anonymous +force_install_dir \"%CD%\" +app_update 3792580 validate +quit", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "title": "SCUM Server", + "language": "zh_cn", + "platform": "Windows", + "description": "SCUM Server suitable for Windows system, fast server setup", + "image": "https://api.nansai.cc/img/scum/header_English.jpg", + "gameType": "SCUM", + "category": "最新版本", + "runtime": "Windows Server", + "hardware": "Intel Core platform、RAM 8G+", + "size": "20GB", + "author": "南赛", + "remark": "need install Visual C++", + "targetLink": "https://download.nansai.cc/steam/SteamCMD.exe", + "setupInfo": { + "type": "steam/universal", + "startCommand": "\"steamapps/common/SCUM Server/SCUM/Binaries/Win64/SCUMServer.exe\" -port=7779 -log", + "stopCommand": "^C", + "updateCommand": "SteamCMD.exe +login anonymous +force_install_dir \"%CD%\" +app_update 3792580 validate +quit", + "ie": "utf-8", + "oe": "utf-8" + } } ] } From f306aaca5c9553b8486a1c5146b765a43b6b8929 Mon Sep 17 00:00:00 2001 From: YuMao233 Date: Mon, 18 Aug 2025 00:31:59 +0800 Subject: [PATCH 245/338] feat: update market --- market.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/market.json b/market.json index 5426ee5..9a00aa5 100644 --- a/market.json +++ b/market.json @@ -827,14 +827,14 @@ "type": "steam/universal", "startCommand": "\"steamapps/common/SCUM Server/SCUM/Binaries/Win64/SCUMServer.exe\" -port=7779 -log", "stopCommand": "^C", - "updateCommand": "SteamCMD.exe +login anonymous +force_install_dir \"%CD%\" +app_update 3792580 validate +quit", + "updateCommand": "SteamCMD.exe +login anonymous +force_install_dir \"{mcsm_workspace}\" +app_update 3792580 validate +quit", "ie": "utf-8", "oe": "utf-8" } }, { "title": "SCUM Server", - "language": "zh_cn", + "language": "en_us", "platform": "Windows", "description": "SCUM Server suitable for Windows system, fast server setup", "image": "https://api.nansai.cc/img/scum/header_English.jpg", @@ -850,7 +850,7 @@ "type": "steam/universal", "startCommand": "\"steamapps/common/SCUM Server/SCUM/Binaries/Win64/SCUMServer.exe\" -port=7779 -log", "stopCommand": "^C", - "updateCommand": "SteamCMD.exe +login anonymous +force_install_dir \"%CD%\" +app_update 3792580 validate +quit", + "updateCommand": "SteamCMD.exe +login anonymous +force_install_dir \"{mcsm_workspace}\" +app_update 3792580 validate +quit", "ie": "utf-8", "oe": "utf-8" } From be89e8389add097f4e5f8a5c05b0b60cf02aaabd Mon Sep 17 00:00:00 2001 From: YuMao233 Date: Mon, 18 Aug 2025 00:33:31 +0800 Subject: [PATCH 246/338] feat: update market --- market.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/market.json b/market.json index 9a00aa5..7f27da7 100644 --- a/market.json +++ b/market.json @@ -821,6 +821,7 @@ "hardware": "Intel Core 平台、RAM 8G+", "size": "20GB", "author": "南赛", + "tags": ["不完全兼容面板"], "remark": "需安装 Visual C++ 才可以运行", "targetLink": "https://download.nansai.cc/steam/SteamCMD.exe", "setupInfo": { @@ -839,11 +840,12 @@ "description": "SCUM Server suitable for Windows system, fast server setup", "image": "https://api.nansai.cc/img/scum/header_English.jpg", "gameType": "SCUM", - "category": "最新版本", + "category": "Latest Version", "runtime": "Windows Server", "hardware": "Intel Core platform、RAM 8G+", "size": "20GB", - "author": "南赛", + "author": "LanSai", + "tags": ["Incompatible with panel"], "remark": "need install Visual C++", "targetLink": "https://download.nansai.cc/steam/SteamCMD.exe", "setupInfo": { From 100642513556967c61a5e16363f16802864cb59d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=97=E8=B5=9B?= <3776473137@qq.com> Date: Mon, 18 Aug 2025 22:21:17 +0800 Subject: [PATCH 247/338] Update market.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复了一些问题 --- market.json | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/market.json b/market.json index 7f27da7..2d10641 100644 --- a/market.json +++ b/market.json @@ -775,11 +775,12 @@ "hardware": "Intel Core 平台、RAM 8G+", "size": "20GB", "author": "南赛", + "tags": ["不完全兼容面板"], "remark": "需安装 Visual C++ 才可以运行", "targetLink": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/steamcmd.exe", "setupInfo": { "type": "steam/universal", - "startCommand": "\"steamapps/common/Squad Dedicated Server/SquadGame/Binaries/Win64/SquadGameServer.exe\" Port=7787 QueryPort=15000 FIXEDMAXTICKRATE=30 -log", + "startCommand": "\"SquadGame/Binaries/Win64/SquadGameServer.exe\" Port=7787 QueryPort=15000 -log", "stopCommand": "^C", "updateCommand": "steamcmd.exe +login anonymous +force_install_dir \"{mcsm_workspace}\" +app_update 403240 validate +quit", "ie": "utf-8", @@ -797,12 +798,13 @@ "runtime": "Windows Server", "hardware": "Intel Core platform、RAM 8G+", "size": "20GB", - "author": "南赛", + "author": "NanSai", + "tags": ["不完全兼容面板"], "remark": "Need to install Visual C++", "targetLink": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/steamcmd.exe", "setupInfo": { "type": "steam/universal", - "startCommand": "\"steamapps/common/Squad Dedicated Server/SquadGame/Binaries/Win64/SquadGameServer.exe\" Port=7787 QueryPort=15000 FIXEDMAXTICKRATE=30 -log", + "startCommand": "\"SquadGame/Binaries/Win64/SquadGameServer.exe\" Port=7787 QueryPort=15000 -log", "stopCommand": "^C", "updateCommand": "steamcmd.exe +login anonymous +force_install_dir \"{mcsm_workspace}\" +app_update 403240 validate +quit", "ie": "utf-8", @@ -826,7 +828,7 @@ "targetLink": "https://download.nansai.cc/steam/SteamCMD.exe", "setupInfo": { "type": "steam/universal", - "startCommand": "\"steamapps/common/SCUM Server/SCUM/Binaries/Win64/SCUMServer.exe\" -port=7779 -log", + "startCommand": "\"SCUM/Binaries/Win64/SCUMServer.exe\" -port=7779 -log", "stopCommand": "^C", "updateCommand": "SteamCMD.exe +login anonymous +force_install_dir \"{mcsm_workspace}\" +app_update 3792580 validate +quit", "ie": "utf-8", @@ -844,13 +846,13 @@ "runtime": "Windows Server", "hardware": "Intel Core platform、RAM 8G+", "size": "20GB", - "author": "LanSai", + "author": "NanSai", "tags": ["Incompatible with panel"], "remark": "need install Visual C++", "targetLink": "https://download.nansai.cc/steam/SteamCMD.exe", "setupInfo": { "type": "steam/universal", - "startCommand": "\"steamapps/common/SCUM Server/SCUM/Binaries/Win64/SCUMServer.exe\" -port=7779 -log", + "startCommand": "\"SCUM/Binaries/Win64/SCUMServer.exe\" -port=7779 -log", "stopCommand": "^C", "updateCommand": "SteamCMD.exe +login anonymous +force_install_dir \"{mcsm_workspace}\" +app_update 3792580 validate +quit", "ie": "utf-8", From afa92476dc4faf93bd3337f2cce7f0ee115c605a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=97=E8=B5=9B?= <3776473137@qq.com> Date: Mon, 18 Aug 2025 22:25:58 +0800 Subject: [PATCH 248/338] Update market.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 更换了 yumao233 的 MCSManager 专用 Steam 下载链接 --- market.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/market.json b/market.json index 2d10641..2a37d07 100644 --- a/market.json +++ b/market.json @@ -825,7 +825,7 @@ "author": "南赛", "tags": ["不完全兼容面板"], "remark": "需安装 Visual C++ 才可以运行", - "targetLink": "https://download.nansai.cc/steam/SteamCMD.exe", + "targetLink": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/steamcmd.exe", "setupInfo": { "type": "steam/universal", "startCommand": "\"SCUM/Binaries/Win64/SCUMServer.exe\" -port=7779 -log", @@ -849,7 +849,7 @@ "author": "NanSai", "tags": ["Incompatible with panel"], "remark": "need install Visual C++", - "targetLink": "https://download.nansai.cc/steam/SteamCMD.exe", + "targetLink": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/steamcmd.exe", "setupInfo": { "type": "steam/universal", "startCommand": "\"SCUM/Binaries/Win64/SCUMServer.exe\" -port=7779 -log", From 8714851f168d74a8cccea1ce5731f94eecbd8a47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=97=E8=B5=9B?= <3776473137@qq.com> Date: Tue, 19 Aug 2025 00:49:00 +0800 Subject: [PATCH 249/338] Update market.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 增加了 Docker Squad Server --- market.json | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/market.json b/market.json index 2a37d07..69342a6 100644 --- a/market.json +++ b/market.json @@ -858,6 +858,82 @@ "ie": "utf-8", "oe": "utf-8" } + }, + { + "title": "战术小队 官方服务器", + "language": "zh_cn", + "platform": "Linux", + "description": "适用于 Linux 系统,使用《战术小队》官方 Docker 镜像,快速开服!", + "image": "https://squadovo.cn/img/header.jpg", + "gameType": "Squad", + "category": "最新版本", + "runtime": "Centos/Ubuntu/Debian", + "hardware": "Intel Core platform、RAM 8G+", + "size": "", + "targetLink": "", + "author": "南赛", + "tags": ["可以商业出租", "Docker 版"], + "setupInfo": { + "startCommand": "", + "stopCommand": "docker stop squad-dedicated", + "ie": "utf8", + "oe": "utf8", + "type": "steam/universal", + "tag": ["Squad"], + "fileCode": "utf8", + "processType": "docker", + "updateCommand": "docker restart squad-dedicated", + "docker": { + "image": "cm2network/squad", + "containerName": "squad-dedicated", + "ports": ["{mcsm_port1}:7787/udp", "{mcsm_port2}:15000/udp"], + "extraVolumes": ["{mcsm_workspace}/SquadConfig:/home/steam/squad-dedicated/SquadGame/ServerConfig/"], + "memory": 8192, + "networkMode": "bridge", + "cpuUsage": 100, + "workingDir": "", + "env": [], + "changeWorkdir": false + } + } + }, + { + "title": "Squad Docker Server", + "language": "en_us", + "platform": "Linux", + "description": "Suitable for Linux systems, use the official Docker image of Squad Server to quickly get started!", + "image": "https://squadovo.cn/img/header.jpg", + "gameType": "Squad", + "category": "Latest Version", + "runtime": "Centos/Ubuntu/Debian", + "hardware": "Intel Core platform、RAM 8G+", + "size": "", + "targetLink": "", + "author": "Nansai", + "tags": ["Commercial Use Allowed", "Docker version"], + "setupInfo": { + "startCommand": "", + "stopCommand": "docker stop squad-dedicated", + "ie": "utf8", + "oe": "utf8", + "type": "steam/universal", + "tag": ["Squad"], + "fileCode": "utf8", + "processType": "docker", + "updateCommand": "docker restart squad-dedicated", + "docker": { + "image": "cm2network/squad", + "containerName": "squad-dedicated", + "ports": ["{mcsm_port1}:7787/udp", "{mcsm_port2}:15000/udp"], + "extraVolumes": ["{mcsm_workspace}/SquadConfig:/home/steam/squad-dedicated/SquadGame/ServerConfig/"], + "memory": 8192, + "networkMode": "bridge", + "cpuUsage": 100, + "workingDir": "", + "env": [], + "changeWorkdir": false + } + } } ] } From 571e2f56668adf77b9c58a687afa25eebc96a715 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=97=E8=B5=9B?= <3776473137@qq.com> Date: Wed, 20 Aug 2025 02:27:27 +0800 Subject: [PATCH 250/338] Update market.json --- market.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/market.json b/market.json index 1247877..bf59261 100644 --- a/market.json +++ b/market.json @@ -967,7 +967,7 @@ "gameType": "Squad", "category": "最新版本", "runtime": "Centos/Ubuntu/Debian", - "hardware": "Intel Core platform、RAM 8G+", + "hardware": "Intel Core 平台、RAM 8G+", "size": "", "targetLink": "", "author": "南赛", From 62465b0e81a527e46ced873f0c37810bf2fe52db Mon Sep 17 00:00:00 2001 From: yumao233 Date: Wed, 20 Aug 2025 19:34:22 +0800 Subject: [PATCH 251/338] =?UTF-8?q?=E9=87=8D=E6=9E=84=E5=B8=82=E5=9C=BA?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=EF=BC=8C=E9=87=8D=E6=96=B0=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=B3=B0=E6=8B=89=E7=91=9E=E4=BA=9A=E6=9C=8D=E5=8A=A1=E5=99=A8?= =?UTF-8?q?=E7=9A=84=E8=AF=A6=E7=BB=86=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- market.json | 76 ++++++++++++++++++++++++++--------------------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/market.json b/market.json index bf59261..a5fbf05 100644 --- a/market.json +++ b/market.json @@ -12,44 +12,6 @@ } ], "packages": [ - { - "title": "泰拉瑞亚服务器", - "language": "zh_cn", - "platform": "Linux", - "description": "适用于 Linux 系统,使用《Terraria》第三方 Docker 镜像,快速开服!", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/terraria.webp", - "gameType": "Terraria", - "category": "最新版本", - "runtime": "Ubuntu/Centos LTS", - "hardware": "RAM 8G+", - "size": "", - "targetLink": "", - "author": "MCSManager", - "tags": ["可以商业出租", "Docker 版"], - "setupInfo": { - "startCommand": "", - "stopCommand": "exit", - "ie": "utf8", - "oe": "utf8", - "type": "steam/terraria", - "tag": ["terraria"], - "fileCode": "utf8", - "processType": "docker", - "updateCommand": "", - "docker": { - "image": "ryshe/terraria:latest", - "containerName": "terraria-server", - "ports": ["{mcsm_port1}:7777/tcp"], - "extraVolumes": [], - "memory": 4096, - "networkMode": "bridge", - "cpuUsage": 100, - "workingDir": "/root/.local/share/Terraria/Worlds", - "env": [], - "changeWorkdir": false - } - } - }, { "language": "zh_cn", "platform": "ALL", @@ -96,6 +58,44 @@ "oe": "utf-8" } }, + { + "title": "泰拉瑞亚服务器", + "language": "zh_cn", + "platform": "Linux", + "description": "适用于 Linux 系统,使用《Terraria》第三方 Docker 镜像,快速开服!", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/terraria.webp", + "gameType": "Terraria", + "category": "最新版本", + "runtime": "Ubuntu/Centos LTS", + "hardware": "RAM 8G+", + "size": "", + "targetLink": "", + "author": "MCSManager", + "tags": ["可以商业出租", "Docker 版"], + "setupInfo": { + "startCommand": "", + "stopCommand": "exit", + "ie": "utf8", + "oe": "utf8", + "type": "steam/terraria", + "tag": ["terraria"], + "fileCode": "utf8", + "processType": "docker", + "updateCommand": "", + "docker": { + "image": "ryshe/terraria:latest", + "containerName": "terraria-server", + "ports": ["{mcsm_port1}:7777/tcp"], + "extraVolumes": [], + "memory": 4096, + "networkMode": "bridge", + "cpuUsage": 100, + "workingDir": "/root/.local/share/Terraria/Worlds", + "env": [], + "changeWorkdir": false + } + } + }, { "title": "幻兽帕鲁官方服务器", "language": "zh_cn", From 561c040d6f7bb7403188da6151925cdcc42964eb Mon Sep 17 00:00:00 2001 From: mmyddd Date: Wed, 20 Aug 2025 21:43:21 +0800 Subject: [PATCH 252/338] update market.json --- market.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/market.json b/market.json index a5fbf05..cb48050 100644 --- a/market.json +++ b/market.json @@ -741,7 +741,7 @@ "setupInfo": { "tag": ["SonsOfTheForest"], "type": "steam/universal", - "startCommand": "set SteamAppId=1326470 && set SteamGameId=1326470 && SonsOfTheForestDS.exe -userdatapath \"{mcsm_workspace}/userdata\" | consoleparser -colorize", + "startCommand": "echo|set /p="1326470" > steam_appid.txt & set SteamAppId=1326470 && set SteamGameId=1326470 && SonsOfTheForestDS.exe -userdatapath \"{mcsm_workspace}/userdata\" | consoleparser -colorize", "stopCommand": "^C", "updateCommand": "{mcsm_steamcmd} +login anonymous +force_install_dir \"{mcsm_workspace}\" +app_update 2465200 +quit", "ie": "utf-8", @@ -791,7 +791,7 @@ "setupInfo": { "tag": ["SonsOfTheForest"], "type": "steam/universal", - "startCommand": "set SteamAppId=1326470 && set SteamGameId=1326470 && SonsOfTheForestDS.exe -userdatapath \"{mcsm_workspace}/userdata\" | consoleparser -colorize", + "startCommand": "echo|set /p="1326470" > steam_appid.txt & set SteamAppId=1326470 && set SteamGameId=1326470 && SonsOfTheForestDS.exe -userdatapath \"{mcsm_workspace}/userdata\" | consoleparser -colorize", "stopCommand": "^C", "updateCommand": "{mcsm_steamcmd} +login anonymous +force_install_dir \"{mcsm_workspace}\" +app_update 2465200 +quit", "ie": "utf-8", From 7663c83609ec60e2b8ed2d8bb6b95f6cee2d36f6 Mon Sep 17 00:00:00 2001 From: yumao233 Date: Sat, 23 Aug 2025 19:32:58 +0800 Subject: [PATCH 253/338] fix: /home/steam/squad-dedicated/SquadGame/ServerConfig/ --- market.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/market.json b/market.json index a5fbf05..677dc91 100644 --- a/market.json +++ b/market.json @@ -987,7 +987,7 @@ "containerName": "squad-dedicated", "ports": ["{mcsm_port1}:7787/udp", "{mcsm_port2}:15000/udp"], "extraVolumes": [ - "{mcsm_workspace}/SquadConfig:/home/steam/squad-dedicated/SquadGame/ServerConfig/" + "{mcsm_workspace}/SquadConfig|/home/steam/squad-dedicated/SquadGame/ServerConfig/" ], "memory": 8192, "networkMode": "bridge", @@ -1027,7 +1027,7 @@ "containerName": "squad-dedicated", "ports": ["{mcsm_port1}:7787/udp", "{mcsm_port2}:15000/udp"], "extraVolumes": [ - "{mcsm_workspace}/SquadConfig:/home/steam/squad-dedicated/SquadGame/ServerConfig/" + "{mcsm_workspace}/SquadConfig|/home/steam/squad-dedicated/SquadGame/ServerConfig/" ], "memory": 8192, "networkMode": "bridge", From c9660b85d94c28e0e19512aff8f231a22442e0bd Mon Sep 17 00:00:00 2001 From: yumao233 Date: Sat, 23 Aug 2025 19:34:00 +0800 Subject: [PATCH 254/338] fix: json err --- market.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/market.json b/market.json index fcea59c..61049d3 100644 --- a/market.json +++ b/market.json @@ -741,7 +741,7 @@ "setupInfo": { "tag": ["SonsOfTheForest"], "type": "steam/universal", - "startCommand": "echo|set /p="1326470" > steam_appid.txt & set SteamAppId=1326470 && set SteamGameId=1326470 && SonsOfTheForestDS.exe -userdatapath \"{mcsm_workspace}/userdata\" | consoleparser -colorize", + "startCommand": "echo|set /p=\"1326470\" > steam_appid.txt & set SteamAppId=1326470 && set SteamGameId=1326470 && SonsOfTheForestDS.exe -userdatapath \"{mcsm_workspace}/userdata\" | consoleparser -colorize", "stopCommand": "^C", "updateCommand": "{mcsm_steamcmd} +login anonymous +force_install_dir \"{mcsm_workspace}\" +app_update 2465200 +quit", "ie": "utf-8", @@ -791,7 +791,7 @@ "setupInfo": { "tag": ["SonsOfTheForest"], "type": "steam/universal", - "startCommand": "echo|set /p="1326470" > steam_appid.txt & set SteamAppId=1326470 && set SteamGameId=1326470 && SonsOfTheForestDS.exe -userdatapath \"{mcsm_workspace}/userdata\" | consoleparser -colorize", + "startCommand": "echo|set /p=\"1326470\" > steam_appid.txt & set SteamAppId=1326470 && set SteamGameId=1326470 && SonsOfTheForestDS.exe -userdatapath \"{mcsm_workspace}/userdata\" | consoleparser -colorize", "stopCommand": "^C", "updateCommand": "{mcsm_steamcmd} +login anonymous +force_install_dir \"{mcsm_workspace}\" +app_update 2465200 +quit", "ie": "utf-8", From 5c506fd8f77b694672ce7f50adc5dec16b343bd9 Mon Sep 17 00:00:00 2001 From: yumao233 Date: Sat, 23 Aug 2025 19:36:17 +0800 Subject: [PATCH 255/338] fix: typo --- market.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/market.json b/market.json index 61049d3..8a83779 100644 --- a/market.json +++ b/market.json @@ -774,7 +774,7 @@ } }, { - "title": "Son Of The Forest Offical Server", + "title": "Son Of The Forest Official Server", "language": "en_us", "platform": "Windows", "description": "Son Of The Forest Server for Windows system.", @@ -799,10 +799,10 @@ } }, { - "title": "SCP:SL Offical Server", + "title": "SCP:SL Official Server", "language": "en_us", "platform": "Windows", - "description": "SCP:SL Offical Server for Windows systen", + "description": "SCP:SL Official Server for Windows", "image": "https://shared.cdn.queniuqe.com/store_item_assets/steam/apps/700330/dad38399643cda1a4084b1faff60452427bef8c0/header.jpg?t=1747606719", "remark": "The first startup requires configuration in the console.Server Config Path:%APPDATA%/SCP Secret Laboratory/config/{port}", "gameType": "SCP:SL", From d9963494adf3b407636030cd4816c0b72581a439 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=97=E8=B5=9B?= <3776473137@qq.com> Date: Sun, 24 Aug 2025 18:35:48 +0800 Subject: [PATCH 256/338] Update market.json --- market.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/market.json b/market.json index 8a83779..7eb1e9f 100644 --- a/market.json +++ b/market.json @@ -961,7 +961,7 @@ { "title": "战术小队 官方服务器", "language": "zh_cn", - "platform": "Linux", + "platform": "ALL", "description": "适用于 Linux 系统,使用《战术小队》官方 Docker 镜像,快速开服!", "image": "https://squadovo.cn/img/header.jpg", "gameType": "Squad", @@ -1001,7 +1001,7 @@ { "title": "Squad Docker Server", "language": "en_us", - "platform": "Linux", + "platform": "ALL", "description": "Suitable for Linux systems, use the official Docker image of Squad Server to quickly get started!", "image": "https://squadovo.cn/img/header.jpg", "gameType": "Squad", From 092d301325f8cf35700a4a7f581173641d21f77a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=97=E8=B5=9B?= <3776473137@qq.com> Date: Sun, 24 Aug 2025 18:37:07 +0800 Subject: [PATCH 257/338] Update market.json --- market.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/market.json b/market.json index 7eb1e9f..20e9d18 100644 --- a/market.json +++ b/market.json @@ -966,7 +966,7 @@ "image": "https://squadovo.cn/img/header.jpg", "gameType": "Squad", "category": "最新版本", - "runtime": "Centos/Ubuntu/Debian", + "runtime": "Windows/Linux", "hardware": "Intel Core 平台、RAM 8G+", "size": "", "targetLink": "", @@ -1006,7 +1006,7 @@ "image": "https://squadovo.cn/img/header.jpg", "gameType": "Squad", "category": "Latest Version", - "runtime": "Centos/Ubuntu/Debian", + "runtime": "Windows/Linux", "hardware": "Intel Core platform、RAM 8G+", "size": "", "targetLink": "", From 60855a65c05d834a09f945a28ba66b8903766c3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=97=E8=B5=9B?= <3776473137@qq.com> Date: Sun, 24 Aug 2025 18:42:39 +0800 Subject: [PATCH 258/338] Update market.json --- market.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/market.json b/market.json index 20e9d18..c36c1ba 100644 --- a/market.json +++ b/market.json @@ -962,7 +962,7 @@ "title": "战术小队 官方服务器", "language": "zh_cn", "platform": "ALL", - "description": "适用于 Linux 系统,使用《战术小队》官方 Docker 镜像,快速开服!", + "description": "使用《战术小队》官方 Docker 镜像,快速开服!", "image": "https://squadovo.cn/img/header.jpg", "gameType": "Squad", "category": "最新版本", @@ -1002,7 +1002,7 @@ "title": "Squad Docker Server", "language": "en_us", "platform": "ALL", - "description": "Suitable for Linux systems, use the official Docker image of Squad Server to quickly get started!", + "description": "use the official Docker image of Squad Server to quickly get started!", "image": "https://squadovo.cn/img/header.jpg", "gameType": "Squad", "category": "Latest Version", From e9363f461bc05c2ab1d0bdf1a842f22187b7d5e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=97=E8=B5=9B?= <3776473137@qq.com> Date: Sun, 24 Aug 2025 19:00:47 +0800 Subject: [PATCH 259/338] Update market.json --- market.json | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/market.json b/market.json index c36c1ba..cedd7e9 100644 --- a/market.json +++ b/market.json @@ -1037,6 +1037,96 @@ "changeWorkdir": false } } + }, + { + "title": "Rust 官方服务器", + "language": "zh_cn", + "platform": "ALL", + "description": "使用 Rust 官方 Docker 镜像,快速开服!", + "image": "https://api.nansai.cc/img/rust/header.jpg", + "gameType": "Rust", + "category": "最新版本", + "runtime": "Windows/Linux", + "hardware": "Intel Core 平台、RAM 16G+", + "size": "", + "targetLink": "", + "author": "南赛", + "tags": ["可以商业出租", "Docker 版"], + "setupInfo": { + "startCommand": "", + "stopCommand": "docker stop rust-server", + "ie": "utf8", + "oe": "utf8", + "type": "steam/universal", + "tag": ["Rust"], + "fileCode": "utf8", + "processType": "docker", + "updateCommand": "docker restart rust-server", + "docker": { + "image": "facepunch/rust-server", + "containerName": "rust-server", + "ports": [ + "{mcsm_port1}:28015/udp", + "{mcsm_port2}:28016/udp" + ], + "extraVolumes": [ + "{mcsm_workspace}/server:/server", + "{mcsm_workspace}/config:/app/.config/unity3d/Facepunch/Rust", + "{mcsm_workspace}/data:/data" + ], + "memory": 16384, + "networkMode": "bridge", + "cpuUsage": 100, + "workingDir": "", + "env": [], + "changeWorkdir": false + } + } + }, + { + "title": "Rust Docker Server", + "language": "en_us", + "platform": "ALL", + "description": "Use Rust's official Docker image to quickly get started!", + "image": "https://api.nansai.cc/img/rust/header.jpg", + "gameType": "Rust", + "category": "Latest Version", + "runtime": "Windows/Linux", + "hardware": "Intel Core platform、RAM 16G+", + "size": "", + "targetLink": "", + "author": "南赛", + "tags": ["Commercial Use Allowed", "Docker version"], + "setupInfo": { + "startCommand": "", + "stopCommand": "docker stop rust-server", + "ie": "utf8", + "oe": "utf8", + "type": "steam/universal", + "tag": ["Rust"], + "fileCode": "utf8", + "processType": "docker", + "updateCommand": "docker restart rust-server", + "docker": { + "image": "facepunch/rust-server", + "containerName": "rust-server", + "ports": [ + "{mcsm_port1}:28015/udp", + "{mcsm_port2}:28016/udp" + ], + "extraVolumes": [ + "{mcsm_workspace}/server:/server", + "{mcsm_workspace}/config:/app/.config/unity3d/Facepunch/Rust", + "{mcsm_workspace}/data:/data" + ], + "memory": 16384, + "networkMode": "bridge", + "cpuUsage": 100, + "workingDir": "", + "env": [], + "changeWorkdir": false + } + } } ] } From f24559f080cc622401ffb3bbd1f3bc427419d5fa Mon Sep 17 00:00:00 2001 From: yumao233 Date: Thu, 28 Aug 2025 23:01:05 +0800 Subject: [PATCH 260/338] feat: update download addr --- setup_cn.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup_cn.sh b/setup_cn.sh index 97e9b8c..7306fe9 100755 --- a/setup_cn.sh +++ b/setup_cn.sh @@ -2,7 +2,7 @@ # This script file is specifically designed for the Chinese region, and servers in the Chinese region are used to accelerate file downloads. mcsmanager_install_path="/opt/mcsmanager" -mcsmanager_download_addr="https://cdn.imlazy.ink:233/files/mcsmanager_linux_release.tar.gz" +mcsmanager_download_addr="https://download.mcsmanager.com/mcsmanager_linux_release.tar.gz" package_name="mcsmanager_linux_release.tar.gz" node="v20.12.2" arch=$(uname -m) From 42ee976bf14f9228b40790f6cce7e1e7a4a3d013 Mon Sep 17 00:00:00 2001 From: yumao233 Date: Thu, 28 Aug 2025 23:08:35 +0800 Subject: [PATCH 261/338] fix: linux only info --- market.json | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/market.json b/market.json index cedd7e9..981b9f4 100644 --- a/market.json +++ b/market.json @@ -961,12 +961,12 @@ { "title": "战术小队 官方服务器", "language": "zh_cn", - "platform": "ALL", + "platform": "Linux", "description": "使用《战术小队》官方 Docker 镜像,快速开服!", "image": "https://squadovo.cn/img/header.jpg", "gameType": "Squad", "category": "最新版本", - "runtime": "Windows/Linux", + "runtime": "Linux", "hardware": "Intel Core 平台、RAM 8G+", "size": "", "targetLink": "", @@ -1001,12 +1001,12 @@ { "title": "Squad Docker Server", "language": "en_us", - "platform": "ALL", + "platform": "Linux", "description": "use the official Docker image of Squad Server to quickly get started!", "image": "https://squadovo.cn/img/header.jpg", "gameType": "Squad", "category": "Latest Version", - "runtime": "Windows/Linux", + "runtime": "Linux", "hardware": "Intel Core platform、RAM 8G+", "size": "", "targetLink": "", @@ -1065,10 +1065,7 @@ "docker": { "image": "facepunch/rust-server", "containerName": "rust-server", - "ports": [ - "{mcsm_port1}:28015/udp", - "{mcsm_port2}:28016/udp" - ], + "ports": ["{mcsm_port1}:28015/udp", "{mcsm_port2}:28016/udp"], "extraVolumes": [ "{mcsm_workspace}/server:/server", "{mcsm_workspace}/config:/app/.config/unity3d/Facepunch/Rust", @@ -1110,10 +1107,7 @@ "docker": { "image": "facepunch/rust-server", "containerName": "rust-server", - "ports": [ - "{mcsm_port1}:28015/udp", - "{mcsm_port2}:28016/udp" - ], + "ports": ["{mcsm_port1}:28015/udp", "{mcsm_port2}:28016/udp"], "extraVolumes": [ "{mcsm_workspace}/server:/server", "{mcsm_workspace}/config:/app/.config/unity3d/Facepunch/Rust", From b0b338c314059884e9af09f0f265bfaaad610dbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=97=E8=B5=9B?= <3776473137@qq.com> Date: Mon, 1 Sep 2025 18:01:05 +0800 Subject: [PATCH 262/338] Update market.json --- market.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/market.json b/market.json index 981b9f4..1becb16 100644 --- a/market.json +++ b/market.json @@ -1039,10 +1039,10 @@ } }, { - "title": "Rust 官方服务器", + "title": "Rust 服务器", "language": "zh_cn", - "platform": "ALL", - "description": "使用 Rust 官方 Docker 镜像,快速开服!", + "platform": "Linux", + "description": "使用 Rust 第三方 Docker 镜像,快速开服!", "image": "https://api.nansai.cc/img/rust/header.jpg", "gameType": "Rust", "category": "最新版本", @@ -1063,7 +1063,7 @@ "processType": "docker", "updateCommand": "docker restart rust-server", "docker": { - "image": "facepunch/rust-server", + "image": "didstopia/rust-server", "containerName": "rust-server", "ports": ["{mcsm_port1}:28015/udp", "{mcsm_port2}:28016/udp"], "extraVolumes": [ @@ -1083,8 +1083,8 @@ { "title": "Rust Docker Server", "language": "en_us", - "platform": "ALL", - "description": "Use Rust's official Docker image to quickly get started!", + "platform": "Linux", + "description": "Use Rust third-party Docker images to quickly get started!", "image": "https://api.nansai.cc/img/rust/header.jpg", "gameType": "Rust", "category": "Latest Version", @@ -1105,7 +1105,7 @@ "processType": "docker", "updateCommand": "docker restart rust-server", "docker": { - "image": "facepunch/rust-server", + "image": "didstopia/rust-server", "containerName": "rust-server", "ports": ["{mcsm_port1}:28015/udp", "{mcsm_port2}:28016/udp"], "extraVolumes": [ From 787f31995795bc8d4e972e560df8d08e92f68ec1 Mon Sep 17 00:00:00 2001 From: Capslock800000 Date: Mon, 1 Sep 2025 19:25:46 +0800 Subject: [PATCH 263/338] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E4=BA=86=E4=B8=AD?= =?UTF-8?q?=E6=96=87=E7=9A=84=E5=AE=89=E8=A3=85=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup_cn.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/setup_cn.sh b/setup_cn.sh index 7306fe9..5e7c0ad 100755 --- a/setup_cn.sh +++ b/setup_cn.sh @@ -81,7 +81,7 @@ Install_Node() { } Install_MCSManager() { - echo_cyan "[+] Install MCSManager..." + echo_cyan "[+] 安装 MCSManager..." # stop service systemctl disable --now mcsm-{web,daemon} @@ -96,7 +96,7 @@ Install_MCSManager() { cd "${mcsmanager_install_path}" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}" # download MCSManager release - wget "${mcsmanager_download_addr}" -O "${package_name}" || Red_Error "[x] Failed to download MCSManager" + wget "${mcsmanager_download_addr}" -O "${package_name}" || Red_Error "[x] 未能成功下载 MCSManager" tar -zxf ${package_name} -o || Red_Error "[x] Failed to untar ${package_name}" rm -rf "${mcsmanager_install_path}/${package_name}" @@ -132,7 +132,7 @@ Install_MCSManager() { } Create_Service() { - echo_cyan "[+] Create MCSManager service..." + echo_cyan "[+] 创建 MCSManager 面板服务..." echo "[Unit] Description=MCSManager-Daemon @@ -177,7 +177,7 @@ WantedBy=multi-user.target echo_yellow "http://:23333 (Browser)" echo_cyan_n "被控守护进程地址: " echo_yellow "ws://:24444 (Cluster)" - echo_red "默认情况下,你必须开放 23333 和 24444 端口才能确保面板工作正常!" + echo_red "默认情况下,你必须在防火墙放行 23333 和 24444 端口才能确保面板工作正常!" echo_yellow " " echo_cyan "面板开关指令:" echo_cyan "systemctl start mcsm-{daemon,web}.service" @@ -215,7 +215,7 @@ node_install_path="/opt/node-$node-linux-$arch" echo_cyan "[-] Architecture: $arch" # Install related software -echo_cyan_n "[+] Installing dependent software (git, tar, wget)... " +echo_cyan_n "[+] 正在安装依赖软件 (git, tar, wget)... " if [[ -x "$(command -v yum)" ]]; then yum install -y git tar wget elif [[ -x "$(command -v apt-get)" ]]; then @@ -225,14 +225,14 @@ elif [[ -x "$(command -v pacman)" ]]; then elif [[ -x "$(command -v zypper)" ]]; then zypper --non-interactive install git tar wget else - echo_red "[!] Cannot find your package manager! You may need to install git, tar and wget manually!" + echo_red "[!] 找不到你的软件包管理器! 你需要先去安装 git, tar 和 wget!" fi # Determine whether the relevant software is installed successfully if [[ -x "$(command -v git)" && -x "$(command -v tar)" && -x "$(command -v wget)" ]]; then echo_green "Success" else - Red_Error "[x] Failed to find git, tar and wget, please install them manually!" + Red_Error "[x] 没有安装 git, tar 和 wget, 请先在安装MCSManager前安装它们!" fi # Install the Node environment From 2d049ef5cbab47b3e0b979f7ae64fb9ad5b430f3 Mon Sep 17 00:00:00 2001 From: Capslock800000 Date: Mon, 1 Sep 2025 19:51:01 +0800 Subject: [PATCH 264/338] =?UTF-8?q?=E7=AC=AC2=E6=AC=A1=E6=9B=B4=E6=94=B9se?= =?UTF-8?q?tup=5Fcn.sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup_cn.sh | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) mode change 100755 => 100644 setup_cn.sh diff --git a/setup_cn.sh b/setup_cn.sh old mode 100755 new mode 100644 index 5e7c0ad..c3b09f9 --- a/setup_cn.sh +++ b/setup_cn.sh @@ -8,7 +8,7 @@ node="v20.12.2" arch=$(uname -m) if [ "$(id -u)" -ne 0 ]; then - echo "This script must be run as root. Please use \"sudo bash\" instead." + echo "这个脚本必须使用root权限运行! 请使用 \"sudo bash\" instead." exit 1 fi @@ -49,11 +49,11 @@ Install_Node() { return fi - echo_cyan "[+] Install Node.JS environment..." + echo_cyan "[+] 正在安装l Node.JS..." rm -irf "$node_install_path" - cd /opt || Red_Error "[x] Failed to enter /opt" + cd /opt || Red_Error "[x] 未能进入 /opt目录" rm -rf "node-$node-linux-$arch.tar.gz" @@ -67,7 +67,7 @@ Install_Node() { if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then echo_green "Success" else - Red_Error "[x] Node installation failed!" + Red_Error "[x] Node.JS 安装失败!" fi echo @@ -90,14 +90,14 @@ Install_MCSManager() { rm -rf /etc/systemd/system/mcsm-{daemon,web}.service systemctl daemon-reload - mkdir -p "${mcsmanager_install_path}" || Red_Error "[x] Failed to create ${mcsmanager_install_path}" + mkdir -p "${mcsmanager_install_path}" || Red_Error "[x] 未能创建 ${mcsmanager_install_path}" # cd /opt/mcsmanager - cd "${mcsmanager_install_path}" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}" + cd "${mcsmanager_install_path}" || Red_Error "[x] 未能进入 ${mcsmanager_install_path}" # download MCSManager release wget "${mcsmanager_download_addr}" -O "${package_name}" || Red_Error "[x] 未能成功下载 MCSManager" - tar -zxf ${package_name} -o || Red_Error "[x] Failed to untar ${package_name}" + tar -zxf ${package_name} -o || Red_Error "[x] 未能成功解压 ${package_name}" rm -rf "${mcsmanager_install_path}/${package_name}" # compatible with tar.gz packages of different formats @@ -107,16 +107,16 @@ Install_MCSManager() { fi # echo "[→] cd daemon" - cd "${mcsmanager_install_path}/daemon" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/daemon" + cd "${mcsmanager_install_path}/daemon" || Red_Error "[x] 未能进入 ${mcsmanager_install_path}/daemon" - echo_cyan "[+] Install MCSManager-Daemon dependencies..." + echo_cyan "[+] 正在安装 MCSManager-Daemon 依赖库..." env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --registry=https://registry.npmmirror.com --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${mcsmanager_install_path}/daemon" # echo "[←] cd .." - cd "${mcsmanager_install_path}/web" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/web" + cd "${mcsmanager_install_path}/web" || Red_Error "[x] 未能进入 ${mcsmanager_install_path}/web" - echo_cyan "[+] Install MCSManager-Web dependencies..." - env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --registry=https://registry.npmmirror.com --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${mcsmanager_install_path}/web" + echo_cyan "[+] 正在安装 MCSManager-Web 依赖库..." + env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --registry=https://registry.npmmirror.com --production --no-fund --no-audit &>/dev/null || Red_Error "[x] 未能在以下目录使用npm install编译依赖库: ${mcsmanager_install_path}/web" echo echo_yellow "=============== MCSManager ===============" @@ -124,7 +124,7 @@ Install_MCSManager() { echo_green "Web: ${mcsmanager_install_path}/web" echo_yellow "=============== MCSManager ===============" echo - echo_green "[+] MCSManager installation success!" + echo_green "[+] MCSManager 安装完成!" chmod -R 755 "$mcsmanager_install_path" @@ -164,7 +164,7 @@ WantedBy=multi-user.target systemctl daemon-reload systemctl enable --now mcsm-{daemon,web}.service - echo_green "Registered!" + echo_green "已注册MCSManager到系统服务!" sleep 2 @@ -184,7 +184,7 @@ WantedBy=multi-user.target echo_cyan "systemctl stop mcsm-{daemon,web}.service" echo_cyan "systemctl restart mcsm-{daemon,web}.service" echo_yellow " " - echo_green "官方文档: https://docs.mcsmanager.com/" + echo_green "官方文档: https://docs.mcsmanager.com/zh_cn/" echo_yellow "==================================================================" } @@ -205,7 +205,7 @@ elif [[ $arch == s390x ]]; then arch=s390x #echo "[-] IBM LinuxONE architecture detected" else - Red_Error "[x] Sorry, this architecture is not supported yet!\n[x]Please try to install manually: https://github.com/MCSManager/MCSManager#linux" + Red_Error "[x] 对不起,这个架构还不支持安装MCSManager!\n[x]请尝试手动安装: https://github.com/MCSManager/MCSManager#linux" fi # Define the variable Node installation directory @@ -230,7 +230,7 @@ fi # Determine whether the relevant software is installed successfully if [[ -x "$(command -v git)" && -x "$(command -v tar)" && -x "$(command -v wget)" ]]; then - echo_green "Success" + echo_green "完成" else Red_Error "[x] 没有安装 git, tar 和 wget, 请先在安装MCSManager前安装它们!" fi From 830baccda07e6d0f19705aa333eef888a7f91de1 Mon Sep 17 00:00:00 2001 From: Capslock800000 Date: Mon, 1 Sep 2025 20:12:39 +0800 Subject: [PATCH 265/338] =?UTF-8?q?=E6=B1=89=E5=8C=96=E4=BA=86=E4=B8=AD?= =?UTF-8?q?=E6=96=87=E5=AE=89=E8=A3=85=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup_cn.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setup_cn.sh b/setup_cn.sh index c3b09f9..e7ec82b 100644 --- a/setup_cn.sh +++ b/setup_cn.sh @@ -8,7 +8,7 @@ node="v20.12.2" arch=$(uname -m) if [ "$(id -u)" -ne 0 ]; then - echo "这个脚本必须使用root权限运行! 请使用 \"sudo bash\" instead." + echo "此脚本必须以 root 身份运行,请使用“sudo bash”代替" exit 1 fi @@ -49,11 +49,11 @@ Install_Node() { return fi - echo_cyan "[+] 正在安装l Node.JS..." + echo_cyan "[+] 正在安装 Node.JS..." rm -irf "$node_install_path" - cd /opt || Red_Error "[x] 未能进入 /opt目录" + cd /opt || Red_Error "[x] 未能进入 /opt 目录" rm -rf "node-$node-linux-$arch.tar.gz" @@ -67,7 +67,7 @@ Install_Node() { if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then echo_green "Success" else - Red_Error "[x] Node.JS 安装失败!" + Red_Error "[x] Node.js 安装失败!" fi echo From d13778f57e8b1a3bb422f6d049a16f9dbf0982d8 Mon Sep 17 00:00:00 2001 From: yumao233 Date: Mon, 1 Sep 2025 21:06:07 +0800 Subject: [PATCH 266/338] feat: add default image --- templates.json | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) diff --git a/templates.json b/templates.json index f2fb252..8cbd314 100644 --- a/templates.json +++ b/templates.json @@ -23,6 +23,7 @@ "remark": "Only Purpur included", "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.8-2481.jar", "author": "purpurmc.org", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/purpur", "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.8-2481.jar nogui", @@ -44,6 +45,7 @@ "remark": "Only Purpur included", "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.6-2465.jar", "author": "purpurmc.org", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/purpur", "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.6-2465.jar nogui", @@ -65,6 +67,7 @@ "remark": "Only Purpur included", "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.5-2450.jar", "author": "purpurmc.org", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/purpur", "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.5-2450.jar nogui", @@ -86,6 +89,7 @@ "remark": "Only Purpur included", "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.4-2416.jar", "author": "purpurmc.org", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/purpur", "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.4-2416.jar nogui", @@ -107,6 +111,7 @@ "remark": "Only Purpur included", "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.3-2358.jar", "author": "purpurmc.org", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/purpur", "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.3-2358.jar nogui", @@ -128,6 +133,7 @@ "remark": "Only Purpur included", "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.1-2329.jar", "author": "purpurmc.org", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/purpur", "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.1-2329.jar nogui", @@ -149,6 +155,7 @@ "remark": "Only Purpur included", "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.20.6-2233.jar", "author": "purpurmc.org", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/purpur", "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.20.6-2233.jar nogui", @@ -170,6 +177,7 @@ "remark": "Only Purpur included", "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.20.4-2176.jar", "author": "purpurmc.org", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/purpur", "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.20.4-2176.jar nogui", @@ -191,6 +199,7 @@ "remark": "Only Purpur included", "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.20.1-2062.jar", "author": "purpurmc.org", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/purpur", "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.20.1-2062.jar nogui", @@ -212,6 +221,7 @@ "remark": "Only Purpur included", "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.19.2-1858.jar", "author": "purpurmc.org", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/purpur", "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.19.2-1858.jar nogui", @@ -233,6 +243,7 @@ "remark": "Only Purpur included", "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.18.2-1632.jar", "author": "purpurmc.org", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/purpur", "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.18.2-1632.jar nogui", @@ -254,6 +265,7 @@ "remark": "Only Purpur included", "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.17.1-1428.jar", "author": "purpurmc.org", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/purpur", "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.17.1-1428.jar nogui", @@ -275,6 +287,7 @@ "remark": "Only Purpur included", "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.16.5-1171.jar", "author": "purpurmc.org", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/purpur", "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.16.5-1171.jar nogui", @@ -296,6 +309,7 @@ "remark": "Only Paper included", "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.8/builds/10/downloads/paper-1.21.8-10.jar", "author": "papermc.io", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/paper", "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.8-10.jar nogui", @@ -317,6 +331,7 @@ "remark": "Only Paper included", "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.6/builds/48/downloads/paper-1.21.4-48.jar", "author": "papermc.io", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/paper", "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.6-48.jar nogui", @@ -338,6 +353,7 @@ "remark": "Only Paper included", "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/232/downloads/paper-1.21.4-232.jar", "author": "papermc.io", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/paper", "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.4-232.jar nogui", @@ -359,6 +375,7 @@ "remark": "Only Paper included", "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.3/builds/82/downloads/paper-1.21.3-82.jar", "author": "papermc.io", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/paper", "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.3-82.jar nogui", @@ -380,6 +397,7 @@ "remark": "Only Paper included", "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.1/builds/132/downloads/paper-1.21.1-132.jar", "author": "papermc.io", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/paper", "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.1-132.jar nogui", @@ -401,6 +419,7 @@ "remark": "Only Paper included", "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.20.6/builds/151/downloads/paper-1.20.6-151.jar", "author": "papermc.io", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/paper", "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.20.6-151.jar nogui", @@ -422,6 +441,7 @@ "remark": "Only Paper included", "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.20.4/builds/499/downloads/paper-1.20.4-499.jar", "author": "papermc.io", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/paper", "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.20.4-499.jar nogui", @@ -443,6 +463,7 @@ "remark": "Includes some basic plugins", "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.20.2/builds/318/downloads/paper-1.20.2-318.jar", "author": "papermc.io", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/paper", "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.20.2-318.jar nogui", @@ -464,6 +485,7 @@ "remark": "Includes some basic plugins", "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.20.1/builds/196/downloads/paper-1.20.1-196.jar", "author": "papermc.io", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/paper", "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.20.1-196.jar nogui", @@ -485,6 +507,7 @@ "remark": "Only Paper included", "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.19.4/builds/550/downloads/paper-1.19.4-550.jar", "author": "papermc.io", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/paper", "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.19.4-550.jar nogui", @@ -506,6 +529,7 @@ "remark": "Only Paper included", "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.19.2/builds/307/downloads/paper-1.19.2-307.jar", "author": "papermc.io", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/paper", "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.19.2-307.jar nogui", @@ -527,6 +551,7 @@ "remark": "Only Paper included", "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.18.2/builds/388/downloads/paper-1.18.2-388.jar", "author": "papermc.io", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java", "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.18.2-388.jar nogui", @@ -548,6 +573,7 @@ "remark": "Only Paper included", "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.17.1/builds/411/downloads/paper-1.17.1-411.jar", "author": "papermc.io", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/paper", "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.17.1-411.jar nogui", @@ -569,6 +595,7 @@ "remark": "Only Paper included", "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.16.5/builds/794/downloads/paper-1.16.5-794.jar", "author": "papermc.io", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/paper", "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.16.5-794.jar nogui", @@ -590,6 +617,7 @@ "remark": "Only Paper included", "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.12.2/builds/1620/downloads/paper-1.12.2-1620.jar", "author": "papermc.io", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/paper", "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.12.2-1620.jar nogui", @@ -611,6 +639,7 @@ "remark": "Only Paper included", "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.8.8/builds/445/downloads/paper-1.8.8-445.jar", "author": "papermc.io", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/paper", "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.8.8-445.jar nogui", @@ -632,6 +661,7 @@ "remark": "Minecraft NeoForge", "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.8.4-beta/neoforge-21.8.4-beta-installer.jar", "author": "neoforged.net", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java", "startCommand": "sh ./run.sh", @@ -653,6 +683,7 @@ "remark": "Minecraft NeoForge", "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.6.20-beta/neoforge-21.6.20-beta-installer.jar", "author": "neoforged.net", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java", "startCommand": "sh ./run.sh", @@ -674,6 +705,7 @@ "remark": "Minecraft NeoForge", "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.5.87/neoforge-21.5.87-installer.jar", "author": "neoforged.net", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java", "startCommand": "sh ./run.sh", @@ -695,6 +727,7 @@ "remark": "Minecraft NeoForge", "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.4.147/neoforge-21.4.147-installer.jar", "author": "neoforged.net", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java", "startCommand": "sh ./run.sh", @@ -716,6 +749,7 @@ "remark": "Minecraft NeoForge", "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.1.193/neoforge-21.1.193-installer.jar", "author": "neoforged.net", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java", "startCommand": "sh ./run.sh", @@ -737,6 +771,7 @@ "remark": "Minecraft NeoForge", "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/20.6.137/neoforge-20.6.137-installer.jar", "author": "neoforged.net", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java", "startCommand": "sh ./run.sh", @@ -758,6 +793,7 @@ "remark": "Minecraft NeoForge", "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/20.4.248/neoforge-20.4.248-installer.jar", "author": "neoforged.net", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java", "startCommand": "sh ./run.sh", @@ -779,6 +815,7 @@ "remark": "Minecraft NeoForge", "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/20.2.93/neoforge-20.2.93-installer.jar", "author": "neoforged.net", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java", "startCommand": "sh ./run.sh", @@ -800,6 +837,7 @@ "remark": "Minecraft Forge", "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.8-58.0.0/forge-1.21.8-58.0.0-installer.jar", "author": "minecraftforge.net", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", @@ -821,6 +859,7 @@ "remark": "Minecraft Forge", "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.6-56.0.9/forge-1.21.6-56.0.9-installer.jar", "author": "minecraftforge.net", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", @@ -842,6 +881,7 @@ "remark": "Minecraft Forge", "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.5-55.0.23/forge-1.21.5-55.0.23-installer.jar", "author": "minecraftforge.net", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", @@ -863,6 +903,7 @@ "remark": "Minecraft Forge", "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.4-54.1.3/forge-1.21.4-54.1.3-installer.jar", "author": "minecraftforge.net", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", @@ -884,6 +925,7 @@ "remark": "Minecraft Forge", "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.1-52.1.1/forge-1.21.1-52.1.1-installer.jar", "author": "minecraftforge.net", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", @@ -905,6 +947,7 @@ "remark": "Minecraft Forge", "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.6-50.2.0/forge-1.20.6-50.2.0-installer.jar", "author": "minecraftforge.net", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", @@ -926,6 +969,7 @@ "remark": "Minecraft Forge", "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.4-49.2.0/forge-1.20.4-49.2.0-installer.jar", "author": "minecraftforge.net", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", @@ -947,6 +991,7 @@ "remark": "Minecraft Forge", "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.1-47.4.4/forge-1.20.1-47.4.4-installer.jar", "author": "minecraftforge.net", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", @@ -968,6 +1013,7 @@ "remark": "Minecraft Forge", "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.19.4-45.4.0/forge-1.19.4-45.4.0-installer.jar", "author": "minecraftforge.net", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", @@ -989,6 +1035,7 @@ "remark": "Minecraft Forge", "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.19.2-43.5.0/forge-1.19.2-43.5.0-installer.jar", "author": "minecraftforge.net", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", @@ -1010,6 +1057,7 @@ "remark": "Minecraft Forge", "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.18.2-40.3.9/forge-1.18.2-40.3.9-installer.jar", "author": "minecraftforge.net", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", @@ -1031,6 +1079,7 @@ "remark": "Minecraft Forge", "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.17.1-37.1.1/forge-1.17.1-37.1.1-installer.jar", "author": "minecraftforge.net", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", @@ -1052,6 +1101,7 @@ "remark": "Minecraft Forge", "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.16.5-36.2.42/forge-1.16.5-36.2.42-installer.jar", "author": "minecraftforge.net", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", @@ -1073,6 +1123,7 @@ "remark": "Minecraft Forge", "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.12.2-14.23.5.2860/forge-1.12.2-14.23.5.2860-installer.jar", "author": "minecraftforge.net", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", @@ -1094,6 +1145,7 @@ "remark": "Minecraft Forge", "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.8.9-11.15.1.2318-1.8.9/forge-1.8.9-11.15.1.2318-1.8.9-installer.jar", "author": "minecraftforge.net", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", @@ -1115,6 +1167,7 @@ "remark": "Minecraft Forge", "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.7.10-10.13.4.1614-1.7.10/forge-1.7.10-10.13.4.1614-1.7.10-installer.jar", "author": "minecraftforge.net", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", @@ -1136,6 +1189,7 @@ "remark": "Minecraft Fabric", "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", "author": "fabricmc.net", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", @@ -1157,6 +1211,7 @@ "remark": "Minecraft Fabric", "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", "author": "fabricmc.net", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", @@ -1178,6 +1233,7 @@ "remark": "Minecraft Fabric", "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", "author": "fabricmc.net", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", @@ -1199,6 +1255,7 @@ "remark": "Minecraft Fabric", "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", "author": "fabricmc.net", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", @@ -1220,6 +1277,7 @@ "remark": "Minecraft Fabric", "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", "author": "fabricmc.net", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", @@ -1241,6 +1299,7 @@ "remark": "Minecraft Fabric", "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", "author": "fabricmc.net", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", @@ -1262,6 +1321,7 @@ "remark": "Minecraft Fabric", "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", "author": "fabricmc.net", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", @@ -1283,6 +1343,7 @@ "remark": "Minecraft Fabric", "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", "author": "fabricmc.net", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", @@ -1304,6 +1365,7 @@ "remark": "Minecraft Fabric", "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", "author": "fabricmc.net", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", @@ -1325,6 +1387,7 @@ "remark": "Minecraft Fabric", "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", "author": "fabricmc.net", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", @@ -1346,6 +1409,7 @@ "remark": "Minecraft Fabric", "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", "author": "fabricmc.net", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", @@ -1367,6 +1431,7 @@ "remark": "Minecraft Fabric", "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", "author": "fabricmc.net", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", @@ -1388,6 +1453,7 @@ "remark": "Minecraft Fabric", "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", "author": "fabricmc.net", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", @@ -1409,6 +1475,7 @@ "remark": "Minecraft Fabric", "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", "author": "fabricmc.net", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", @@ -1430,6 +1497,7 @@ "remark": "Minecraft Fabric", "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", "author": "fabricmc.net", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", @@ -1451,6 +1519,7 @@ "remark": "Minecraft Java", "targetLink": "https://piston-data.mojang.com/v1/objects/6bce4ef400e4efaa63a13d5e6f6b500be969ef81/server.jar", "author": "Mojang Studios", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java", "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", @@ -1472,6 +1541,7 @@ "remark": "Minecraft Java", "targetLink": "https://piston-data.mojang.com/v1/objects/6e64dcabba3c01a7271b4fa6bd898483b794c59b/server.jar", "author": "Mojang Studios", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java", "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", @@ -1493,6 +1563,7 @@ "remark": "Minecraft Java", "targetLink": "https://piston-data.mojang.com/v1/objects/e6ec2f64e6080b9b5d9b471b291c33cc7f509733/server.jar", "author": "Mojang Studios", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java", "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", @@ -1514,6 +1585,7 @@ "remark": "Minecraft Java", "targetLink": "https://piston-data.mojang.com/v1/objects/4707d00eb834b446575d89a61a11b5d548d8c001/server.jar", "author": "Mojang Studios", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java", "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", @@ -1535,6 +1607,7 @@ "remark": "Minecraft Java", "targetLink": "https://piston-data.mojang.com/v1/objects/59353fb40c36d304f2035d51e7d6e6baa98dc05c/server.jar", "author": "Mojang Studios", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java", "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", @@ -1556,6 +1629,7 @@ "remark": "Minecraft Java", "targetLink": "https://piston-data.mojang.com/v1/objects/145ff0858209bcfc164859ba735d4199aafa1eea/server.jar", "author": "Mojang Studios", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java", "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", @@ -1577,6 +1651,7 @@ "remark": "Minecraft Java", "targetLink": "https://piston-data.mojang.com/v1/objects/8dd1a28015f51b1803213892b50b7b4fc76e594d/server.jar", "author": "Mojang Studios", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java", "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", @@ -1598,6 +1673,7 @@ "remark": "Minecraft Java", "targetLink": "https://piston-data.mojang.com/v1/objects/84194a2f286ef7c14ed7ce0090dba59902951553/server.jar", "author": "Mojang Studios", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java", "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", @@ -1619,6 +1695,7 @@ "remark": "Minecraft Java", "targetLink": "https://piston-data.mojang.com/v1/objects/8f3112a1049751cc472ec13e397eade5336ca7ae/server.jar", "author": "Mojang Studios", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java", "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", @@ -1640,6 +1717,7 @@ "remark": "Minecraft Java", "targetLink": "https://piston-data.mojang.com/v1/objects/c8f83c5655308435b3dcf03c06d9fe8740a77469/server.jar", "author": "Mojang Studios", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java", "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", @@ -1661,6 +1739,7 @@ "remark": "Minecraft Java", "targetLink": "https://piston-data.mojang.com/v1/objects/a16d67e5807f57fc4e550299cf20226194497dc2/server.jar", "author": "Mojang Studios", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java", "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", @@ -1682,6 +1761,7 @@ "remark": "Minecraft Java", "targetLink": "https://piston-data.mojang.com/v1/objects/1b557e7b033b583cd9f66746b7a9ab1ec1673ced/server.jar", "author": "Mojang Studios", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java", "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", @@ -1703,6 +1783,7 @@ "remark": "Minecraft Java", "targetLink": "https://piston-data.mojang.com/v1/objects/886945bfb2b978778c3a0288fd7fab09d315b25f/server.jar", "author": "Mojang Studios", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java", "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", @@ -1724,6 +1805,7 @@ "remark": "Minecraft Java", "targetLink": "https://launcher.mojang.com/v1/objects/b58b2ceb36e01bcd8dbf49c8fb66c55a9f0676cd/server.jar", "author": "Mojang Studios", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java", "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", @@ -1745,6 +1827,7 @@ "remark": "包含基础插件,萌新快速开服!低配机器专属!", "targetLink": "https://cloud.alongw.cn/f/DzvHK/Paper-1.21.1-ZH.zip", "author": "alongw.cn", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java", "startCommand": "java -Xms4096M -Xmx4096M -jar server.jar nogui", @@ -1766,6 +1849,7 @@ "remark": "支持插件,最低 8GB 内存要求", "targetLink": "https://url.alww.top/mcsm/paper1.20.4.zip", "author": "alongw.cn", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java", "startCommand": "java -Xms6144M -Xmx6144M -jar server.jar nogui", @@ -1787,6 +1871,7 @@ "remark": "Only Paper included", "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.8/builds/10/downloads/paper-1.21.8-10.jar", "author": "papermc.io", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/paper", "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.8-10.jar nogui", @@ -1808,6 +1893,7 @@ "remark": "Only Paper included", "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.6/builds/48/downloads/paper-1.21.4-48.jar", "author": "papermc.io", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/paper", "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.6-48.jar nogui", @@ -1829,6 +1915,7 @@ "remark": "Only Paper included", "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/232/downloads/paper-1.21.4-232.jar", "author": "papermc.io", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/paper", "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.4-232.jar nogui", @@ -1850,6 +1937,7 @@ "remark": "Only Paper included", "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.3/builds/82/downloads/paper-1.21.3-82.jar", "author": "papermc.io", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/paper", "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.3-82.jar nogui", @@ -1871,6 +1959,7 @@ "remark": "Only Paper included", "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.1/builds/132/downloads/paper-1.21.1-132.jar", "author": "papermc.io", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/paper", "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.1-132.jar nogui", @@ -1892,6 +1981,7 @@ "remark": "Only Paper included", "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.20.6/builds/151/downloads/paper-1.20.6-151.jar", "author": "papermc.io", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/paper", "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.20.6-151.jar nogui", @@ -1913,6 +2003,7 @@ "remark": "Only Paper included", "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.20.4/builds/499/downloads/paper-1.20.4-499.jar", "author": "papermc.io", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/paper", "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.20.4-499.jar nogui", @@ -1934,6 +2025,7 @@ "remark": "Includes some basic plugins", "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.20.2/builds/318/downloads/paper-1.20.2-318.jar", "author": "papermc.io", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/paper", "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.20.2-318.jar nogui", @@ -1955,6 +2047,7 @@ "remark": "Includes some basic plugins", "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.20.1/builds/196/downloads/paper-1.20.1-196.jar", "author": "papermc.io", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/paper", "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.20.1-196.jar nogui", @@ -1976,6 +2069,7 @@ "remark": "Minecraft Forge", "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.1-47.3.33/forge-1.20.1-47.3.33-installer.jar", "author": "minecraftforge.net", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", @@ -1997,6 +2091,7 @@ "remark": "Minecraft Forge", "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.6-50.1.48/forge-1.20.6-50.1.48-installer.jar", "author": "minecraftforge.net", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", @@ -2018,6 +2113,7 @@ "remark": "Minecraft Forge", "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.19.2-43.4.20/forge-1.19.2-43.4.20-installer.jar", "author": "minecraftforge.net", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", From 3c027882ca0dc6ed1ad4f3b751b7c09c52fb0f9c Mon Sep 17 00:00:00 2001 From: Capslock800000 Date: Tue, 2 Sep 2025 12:15:08 +0800 Subject: [PATCH 267/338] =?UTF-8?q?=E6=B1=89=E5=8C=96=E4=BA=86=E5=AE=89?= =?UTF-8?q?=E8=A3=85=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- daemon/setup_cn.sh | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/daemon/setup_cn.sh b/daemon/setup_cn.sh index aacb7b4..a3a4113 100644 --- a/daemon/setup_cn.sh +++ b/daemon/setup_cn.sh @@ -8,7 +8,7 @@ node="v20.12.2" arch=$(uname -m) if [ "$(id -u)" -ne 0 ]; then - echo "This script must be run as root. Please use \"sudo bash\" instead." + echo "这个脚本必须使用root权限运行。 请使用 \"sudo bash\" 替代它" exit 1 fi @@ -32,7 +32,7 @@ echo_yellow() { # script info echo_cyan "+---------------------------------------------------------------------- -| MCSManager 安装脚本 (MCSManager Installer) +| MCSManager Daemon安装脚本 (MCSManager Installer) +---------------------------------------------------------------------- " @@ -44,25 +44,25 @@ Red_Error() { } Install_Node() { - echo_cyan_n "[+] Install Node.JS environment...\n" + echo_cyan_n "[+] 安装 Node.JS...\n" rm -irf "$node_install_path" - cd /opt || Red_Error "[x] Failed to enter /opt" + cd /opt || Red_Error "[x] 未能进入 /opt" rm -rf "node-$node-linux-$arch.tar.gz" # wget "https://nodejs.org/dist/$node/node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to download node release" - wget "https://registry.npmmirror.com/-/binary/node/$node/node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to download node release" + wget "https://registry.npmmirror.com/-/binary/node/$node/node-$node-linux-$arch.tar.gz" || Red_Error "[x] 未能下载node" tar -zxf "node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to untar node" rm -rf "node-$node-linux-$arch.tar.gz" if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then - echo_green "Success" + echo_green "完成" else - Red_Error "[x] Node installation failed!" + Red_Error "[x] Node 安装失败!" fi echo @@ -76,7 +76,7 @@ Install_Node() { } Install_MCSManager() { - echo_cyan "[+] Install MCSManager..." + echo_cyan "[+] 安装 MCSManager..." # stop service systemctl disable --now mcsm-{web,daemon} @@ -85,13 +85,13 @@ Install_MCSManager() { rm -rf /etc/systemd/system/mcsm-daemon.service systemctl daemon-reload - mkdir -p "${mcsmanager_install_path}" || Red_Error "[x] Failed to create ${mcsmanager_install_path}" + mkdir -p "${mcsmanager_install_path}" || Red_Error "[x] 未能创建 ${mcsmanager_install_path}" # cd /opt/mcsmanager - cd "${mcsmanager_install_path}" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}" + cd "${mcsmanager_install_path}" || Red_Error "[x] 未能进入 ${mcsmanager_install_path}" # download MCSManager release - wget "${mcsmanager_download_addr}" -O "${package_name}" || Red_Error "[x] Failed to download MCSManager" + wget "${mcsmanager_download_addr}" -O "${package_name}" || Red_Error "[x] 未能下载 MCSManager" tar -zxf ${package_name} -o || Red_Error "[x] Failed to untar ${package_name}" rm -rf "${mcsmanager_install_path}/${package_name}" @@ -104,7 +104,7 @@ Install_MCSManager() { # echo "[→] cd daemon" cd "${mcsmanager_install_path}/daemon" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/daemon" - echo_cyan "[+] Install MCSManager-Daemon dependencies..." + echo_cyan "[+] 安装 MCSManager-Daemon 依赖库..." env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --registry=https://registry.npmmirror.com --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${mcsmanager_install_path}/daemon" echo @@ -112,7 +112,7 @@ Install_MCSManager() { echo_green "Daemon: ${mcsmanager_install_path}/daemon" echo_yellow "=============== MCSManager ===============" echo - echo_green "[+] MCSManager installation success!" + echo_green "[+] MCSManager 安装完成!" chmod -R 755 "$mcsmanager_install_path" @@ -120,7 +120,7 @@ Install_MCSManager() { } Create_Service() { - echo_cyan "[+] Create MCSManager service..." + echo_cyan "[+] 创建 MCSManager 服务..." echo "[Unit] Description=MCSManager-Daemon @@ -177,17 +177,17 @@ elif [[ $arch == s390x ]]; then arch=s390x #echo "[-] IBM LinuxONE architecture detected" else - Red_Error "[x] Sorry, this architecture is not supported yet!\n[x]Please try to install manually: https://github.com/MCSManager/MCSManager#linux" + Red_Error "[x] 对不起,这个架构目前还不受支持!\n[x]请尝试手动安装: https://github.com/MCSManager/MCSManager#linux" fi # Define the variable Node installation directory node_install_path="/opt/node-$node-linux-$arch" # Check network connection -echo_cyan "[-] Architecture: $arch" +echo_cyan "[-] 架构: $arch" # Install related software -echo_cyan_n "[+] Installing dependent software (git, tar, wget)... " +echo_cyan_n "[+] 正在安装依赖软件 (git, tar, wget)... " if [[ -x "$(command -v yum)" ]]; then yum install -y git tar wget elif [[ -x "$(command -v apt-get)" ]]; then @@ -197,14 +197,14 @@ elif [[ -x "$(command -v pacman)" ]]; then elif [[ -x "$(command -v zypper)" ]]; then zypper --non-interactive install git tar wget else - echo_red "[!] Cannot find your package manager! You may need to install git, tar and wget manually!" + echo_red "[!] 找不到你的软件包管理器! 你需要去安装 git, tar 和 wget!" fi # Determine whether the relevant software is installed successfully if [[ -x "$(command -v git)" && -x "$(command -v tar)" && -x "$(command -v wget)" ]]; then - echo_green "Success" + echo_green "完成" else - Red_Error "[x] Failed to find git, tar and wget, please install them manually!" + Red_Error "[x] 找不到 git, tar 和 wget, 请先安装它们!" fi # Install the Node environment From d4e488227b4b99576815ff6cc82ecc6a914343a9 Mon Sep 17 00:00:00 2001 From: SkyKingPX Date: Mon, 15 Sep 2025 20:02:36 +0200 Subject: [PATCH 268/338] Updated Versions & Removed Outdated ones --- market.json | 44 +++--- templates.json | 394 +++++++------------------------------------------ 2 files changed, 76 insertions(+), 362 deletions(-) diff --git a/market.json b/market.json index 1becb16..f2a22a1 100644 --- a/market.json +++ b/market.json @@ -481,12 +481,12 @@ "runtime": "Java 21+", "hardware": "RAM 8G+", "size": "100MB", - "remark": "Paper version only", - "targetLink": "https://fill-data.papermc.io/v1/objects/d310c61899acc608b683515c5c7ef929774bfd1b90262dac965e76c7e9ea8d22/paper-1.21.8-30.jar", + "remark": "Minecraft Paper", + "targetLink": "https://fill-data.papermc.io/v1/objects/8de7c52c3b02403503d16fac58003f1efef7dd7a0256786843927fa92ee57f1e/paper-1.21.8-60.jar", "author": "papermc.io", "setupInfo": { "type": "minecraft/java/paper", - "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.8-30.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.8-60.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -504,7 +504,7 @@ "runtime": "Java 21+", "hardware": "RAM 8G+", "size": "100MB", - "remark": "Paper version only", + "remark": "Minecraft Paper", "targetLink": "https://fill-data.papermc.io/v1/objects/234a9b32098100c6fc116664d64e36ccdb58b5b649af0f80bcccb08b0255eaea/paper-1.20.1-196.jar", "author": "papermc.io", "setupInfo": { @@ -521,18 +521,18 @@ "language": "en_us", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp", "gameType": "Minecraft", - "description": "[Purpur] Minecraft 1.21.8 Purpur", - "title": "Minecraft 1.21.8", + "description": "Minecraft 1.21.8 Purpur Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support", + "title": "Purpur Minecraft 1.21.8 Quick Server Setup", "category": "mc-purpur", "runtime": "Java 21+", "hardware": "RAM 8G+", "size": "55MB", - "remark": "Only Purpur included", - "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.8-2481.jar", + "remark": "Minecraft Purpur", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.8-2496.jar", "author": "purpurmc.org", "setupInfo": { "type": "minecraft/java/purpur", - "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.8-2481.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.8-2496.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -551,13 +551,13 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.1-52.1.1/forge-1.21.1-52.1.1-installer.jar", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.1-52.1.3/forge-1.21.1-52.1.3-installer.jar", "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar forge-1.21.1-52.1.1-installer.jar --installServer", + "updateCommand": "java -jar forge-1.21.1-52.1.3-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -574,13 +574,13 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.1-52.1.1/forge-1.21.1-52.1.1-installer.jar", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.1-52.1.3/forge-1.21.1-52.1.3-installer.jar", "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "start.bat", "stopCommand": "stop", - "updateCommand": "java -jar forge-1.21.1-52.1.1-installer.jar --installServer", + "updateCommand": "java -jar forge-1.21.1-52.1.3-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -619,7 +619,7 @@ "runtime": "Java 21+", "hardware": "RAM 8G+", "size": "50MB", - "remark": "Only Paper included", + "remark": "Minecraft Paper", "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/232/downloads/paper-1.21.4-232.jar", "author": "papermc.io", "setupInfo": { @@ -689,13 +689,13 @@ "hardware": "RAM 8G+", "size": "5MB", "remark": "Minecraft Fabric", - "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar", "author": "fabricmc.net", "setupInfo": { "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.21.4 -downloadMinecraft -noprofile", + "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.21.4 -downloadMinecraft -noprofile", "ie": "utf-8", "oe": "utf-8" } @@ -712,13 +712,13 @@ "hardware": "RAM 8G+", "size": "5MB", "remark": "Minecraft Fabric", - "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar", "author": "fabricmc.net", "setupInfo": { "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.21.8 -downloadMinecraft -noprofile", + "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.21.8 -downloadMinecraft -noprofile", "ie": "utf-8", "oe": "utf-8" } @@ -730,7 +730,7 @@ "description": "森林之子服务器,适用于 Windows 系统", "image": "https://shared.cdn.queniuqe.com/store_item_assets/steam/apps/1326470/header.jpg?t=1708624856", "remark": "请在防火墙放行8766(UDP) 27016(UDP) 9700(UDP)端口", - "gameType": "Son Of The Forest", + "gameType": "Sons Of The Forest", "category": "最新版本", "runtime": "Windows 10+", "hardware": "RAM 8G+", @@ -774,13 +774,13 @@ } }, { - "title": "Son Of The Forest Official Server", + "title": "Sons Of The Forest Official Server", "language": "en_us", "platform": "Windows", - "description": "Son Of The Forest Server for Windows system.", + "description": "Sons Of The Forest Server for Windows system.", "image": "https://shared.cdn.queniuqe.com/store_item_assets/steam/apps/1326470/header.jpg?t=1708624856", "remark": "Please allow port 8766 (UDP) 27016 (UDP) 9700 (UDP) to pass through the firewall.", - "gameType": "Son Of The Forest", + "gameType": "Sons Of The Forest", "category": "latest", "runtime": "Windows 10+", "hardware": "RAM 8G+", diff --git a/templates.json b/templates.json index 8cbd314..e54a464 100644 --- a/templates.json +++ b/templates.json @@ -21,12 +21,12 @@ "hardware": "RAM 4G+", "size": "55MB", "remark": "Only Purpur included", - "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.8-2481.jar", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.8-2496.jar", "author": "purpurmc.org", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/purpur", - "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.8-2481.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.8-2496.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -307,12 +307,12 @@ "hardware": "RAM 4G+", "size": "50MB", "remark": "Only Paper included", - "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.8/builds/10/downloads/paper-1.21.8-10.jar", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.8/builds/60/downloads/paper-1.21.8-60.jar", "author": "papermc.io", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/paper", - "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.8-10.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.8-60.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -329,7 +329,7 @@ "hardware": "RAM 4G+", "size": "50MB", "remark": "Only Paper included", - "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.6/builds/48/downloads/paper-1.21.4-48.jar", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.6/builds/48/downloads/paper-1.21.6-48.jar", "author": "papermc.io", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { @@ -451,28 +451,6 @@ "oe": "utf-8" } }, - { - "language": "en_us", - "gameType": "Minecraft", - "description": "[Paper] Minecraft 1.20.2 Paper", - "title": "Minecraft 1.20.2", - "category": "mc-paper", - "runtime": "Java 17+", - "hardware": "RAM 4G+", - "size": "150MB", - "remark": "Includes some basic plugins", - "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.20.2/builds/318/downloads/paper-1.20.2-318.jar", - "author": "papermc.io", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "setupInfo": { - "type": "minecraft/java/paper", - "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.20.2-318.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, { "language": "en_us", "gameType": "Minecraft", @@ -495,160 +473,6 @@ "oe": "utf-8" } }, - { - "language": "en_us", - "gameType": "Minecraft", - "description": "[Paper] Minecraft 1.19.4 Paper", - "title": "Minecraft 1.19.4", - "category": "mc-paper", - "runtime": "Java 17+", - "hardware": "RAM 4G+", - "size": "50MB", - "remark": "Only Paper included", - "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.19.4/builds/550/downloads/paper-1.19.4-550.jar", - "author": "papermc.io", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "setupInfo": { - "type": "minecraft/java/paper", - "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.19.4-550.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "gameType": "Minecraft", - "description": "[Paper] Minecraft 1.19.2 Paper", - "title": "Minecraft 1.19.2", - "category": "mc-paper", - "runtime": "Java 17+", - "hardware": "RAM 4G+", - "size": "50MB", - "remark": "Only Paper included", - "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.19.2/builds/307/downloads/paper-1.19.2-307.jar", - "author": "papermc.io", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "setupInfo": { - "type": "minecraft/java/paper", - "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.19.2-307.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "gameType": "Minecraft", - "description": "[Paper] Minecraft 1.18.2 Paper", - "title": "Minecraft 1.18.2", - "category": "mc-paper", - "runtime": "Java 17+", - "hardware": "RAM 4G+", - "size": "50MB", - "remark": "Only Paper included", - "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.18.2/builds/388/downloads/paper-1.18.2-388.jar", - "author": "papermc.io", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.18.2-388.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "gameType": "Minecraft", - "description": "[Paper] Minecraft 1.17.1 Paper", - "title": "Minecraft 1.17.1", - "category": "mc-paper", - "runtime": "Java 16+", - "hardware": "RAM 4G+", - "size": "60MB", - "remark": "Only Paper included", - "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.17.1/builds/411/downloads/paper-1.17.1-411.jar", - "author": "papermc.io", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "setupInfo": { - "type": "minecraft/java/paper", - "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.17.1-411.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "gameType": "Minecraft", - "description": "[Paper] Minecraft 1.16.5 Paper", - "title": "Minecraft 1.16.5", - "category": "mc-paper", - "runtime": "Java 8+", - "hardware": "RAM 4G+", - "size": "50MB", - "remark": "Only Paper included", - "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.16.5/builds/794/downloads/paper-1.16.5-794.jar", - "author": "papermc.io", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "setupInfo": { - "type": "minecraft/java/paper", - "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.16.5-794.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "gameType": "Minecraft", - "description": "[Paper] Minecraft 1.12.2 Paper", - "title": "Minecraft 1.12.2", - "category": "mc-paper", - "runtime": "Java 8+", - "hardware": "RAM 4G+", - "size": "50MB", - "remark": "Only Paper included", - "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.12.2/builds/1620/downloads/paper-1.12.2-1620.jar", - "author": "papermc.io", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "setupInfo": { - "type": "minecraft/java/paper", - "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.12.2-1620.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "gameType": "Minecraft", - "description": "[Paper] Minecraft 1.8.8 Paper", - "title": "Minecraft 1.8.8", - "category": "mc-paper", - "runtime": "Java 7+", - "hardware": "RAM 4G+", - "size": "20MB", - "remark": "Only Paper included", - "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.8.8/builds/445/downloads/paper-1.8.8-445.jar", - "author": "papermc.io", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "setupInfo": { - "type": "minecraft/java/paper", - "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.8.8-445.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, { "language": "en_us", "gameType": "Minecraft", @@ -659,14 +483,14 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft NeoForge", - "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.8.4-beta/neoforge-21.8.4-beta-installer.jar", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.8.47/neoforge-21.8.47-installer.jar", "author": "neoforged.net", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar neoforge-21.8.4-beta-installer.jar --installServer", + "updateCommand": "java -jar neoforge-21.8.47-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -703,14 +527,14 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft NeoForge", - "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.5.87/neoforge-21.5.87-installer.jar", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.5.95/neoforge-21.5.95-installer.jar", "author": "neoforged.net", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar neoforge-21.5.87-installer.jar --installServer", + "updateCommand": "java -jar neoforge-21.5.95-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -725,14 +549,14 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft NeoForge", - "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.4.147/neoforge-21.4.147-installer.jar", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.4.154/neoforge-21.4.154-installer.jar", "author": "neoforged.net", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar neoforge-21.4.147-installer.jar --installServer", + "updateCommand": "java -jar neoforge-21.4.154-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -747,14 +571,14 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft NeoForge", - "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.1.193/neoforge-21.1.193-installer.jar", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.1.209/neoforge-21.1.209-installer.jar", "author": "neoforged.net", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar neoforge-21.1.193-installer.jar --installServer", + "updateCommand": "java -jar neoforge-21.1.209-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -769,14 +593,14 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft NeoForge", - "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/20.6.137/neoforge-20.6.137-installer.jar", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/20.6.138/neoforge-20.6.138-installer.jar", "author": "neoforged.net", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar neoforge-20.6.137-installer.jar --installServer", + "updateCommand": "java -jar neoforge-20.6.138-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -791,36 +615,14 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft NeoForge", - "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/20.4.248/neoforge-20.4.248-installer.jar", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/20.4.250/neoforge-20.4.250-installer.jar", "author": "neoforged.net", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar neoforge-20.4.248-installer.jar --installServer", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "gameType": "Minecraft", - "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "title": "NeoForge 1.20.2 (Supports Mods)", - "category": "mc-neoforge", - "runtime": "Java 21+", - "hardware": "RAM 8G+", - "size": "7MB", - "remark": "Minecraft NeoForge", - "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/20.2.93/neoforge-20.2.93-installer.jar", - "author": "neoforged.net", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "setupInfo": { - "type": "minecraft/java", - "startCommand": "sh ./run.sh", - "stopCommand": "stop", - "updateCommand": "java -jar neoforge-20.2.93-installer.jar --installServer", + "updateCommand": "java -jar neoforge-20.4.250-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -835,14 +637,14 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.8-58.0.0/forge-1.21.8-58.0.0-installer.jar", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.8-58.1.1/forge-1.21.8-58.1.1-installer.jar", "author": "minecraftforge.net", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar forge-1.21.8-58.0.0-installer.jar --installServer", + "updateCommand": "java -jar forge-1.21.8-58.1.1-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -879,14 +681,14 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.5-55.0.23/forge-1.21.5-55.0.23-installer.jar", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.5-55.1.0/forge-1.21.5-55.1.0-installer.jar", "author": "minecraftforge.net", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar forge-1.21.5-55.0.23-installer.jar --installServer", + "updateCommand": "java -jar forge-1.21.5-55.1.0-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -901,14 +703,14 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.4-54.1.3/forge-1.21.4-54.1.3-installer.jar", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.4-54.1.6/forge-1.21.4-54.1.6-installer.jar", "author": "minecraftforge.net", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar forge-1.21.4-54.1.3-installer.jar --installServer", + "updateCommand": "java -jar forge-1.21.4-54.1.6-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -923,14 +725,14 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.1-52.1.1/forge-1.21.1-52.1.1-installer.jar", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.1-52.1.3/forge-1.21.1-52.1.3-installer.jar", "author": "minecraftforge.net", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar forge-1.21.1-52.1.1-installer.jar --installServer", + "updateCommand": "java -jar forge-1.21.1-52.1.3-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -945,14 +747,14 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.6-50.2.0/forge-1.20.6-50.2.0-installer.jar", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.6-50.2.1/forge-1.20.6-50.2.1-installer.jar", "author": "minecraftforge.net", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar forge-1.20.6-50.2.0-installer.jar --installServer", + "updateCommand": "java -jar forge-1.20.6-50.2.1-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -1023,28 +825,6 @@ "oe": "utf-8" } }, - { - "language": "en_us", - "gameType": "Minecraft", - "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "title": "Forge 1.19.2 (Supports Mods)", - "category": "mc-forge", - "runtime": "Java 17+", - "hardware": "RAM 8G+", - "size": "7MB", - "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.19.2-43.5.0/forge-1.19.2-43.5.0-installer.jar", - "author": "minecraftforge.net", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "setupInfo": { - "type": "minecraft/java/forge", - "startCommand": "sh ./run.sh", - "stopCommand": "stop", - "updateCommand": "java -jar forge-1.19.2-43.5.0-installer.jar --installServer", - "ie": "utf-8", - "oe": "utf-8" - } - }, { "language": "en_us", "gameType": "Minecraft", @@ -1187,14 +967,14 @@ "hardware": "RAM 4G+", "size": "5MB", "remark": "Minecraft Fabric", - "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar", "author": "fabricmc.net", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.21.8 -downloadMinecraft -noprofile", + "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.21.8 -downloadMinecraft -noprofile", "ie": "utf-8", "oe": "utf-8" } @@ -1209,14 +989,14 @@ "hardware": "RAM 4G+", "size": "5MB", "remark": "Minecraft Fabric", - "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar", "author": "fabricmc.net", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.21.6 -downloadMinecraft -noprofile", + "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.21.6 -downloadMinecraft -noprofile", "ie": "utf-8", "oe": "utf-8" } @@ -1231,14 +1011,14 @@ "hardware": "RAM 4G+", "size": "5MB", "remark": "Minecraft Fabric", - "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar", "author": "fabricmc.net", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.21.5 -downloadMinecraft -noprofile", + "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.21.5 -downloadMinecraft -noprofile", "ie": "utf-8", "oe": "utf-8" } @@ -1253,14 +1033,14 @@ "hardware": "RAM 4G+", "size": "5MB", "remark": "Minecraft Fabric", - "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar", "author": "fabricmc.net", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.21.4 -downloadMinecraft -noprofile", + "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.21.4 -downloadMinecraft -noprofile", "ie": "utf-8", "oe": "utf-8" } @@ -1275,14 +1055,14 @@ "hardware": "RAM 4G+", "size": "5MB", "remark": "Minecraft Fabric", - "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar", "author": "fabricmc.net", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.21.1 -downloadMinecraft -noprofile", + "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.21.1 -downloadMinecraft -noprofile", "ie": "utf-8", "oe": "utf-8" } @@ -1297,14 +1077,14 @@ "hardware": "RAM 4G+", "size": "5MB", "remark": "Minecraft Fabric", - "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar", "author": "fabricmc.net", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.20.6 -downloadMinecraft -noprofile", + "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.20.6 -downloadMinecraft -noprofile", "ie": "utf-8", "oe": "utf-8" } @@ -1319,14 +1099,14 @@ "hardware": "RAM 4G+", "size": "5MB", "remark": "Minecraft Fabric", - "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar", "author": "fabricmc.net", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.20.4 -downloadMinecraft -noprofile", + "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.20.4 -downloadMinecraft -noprofile", "ie": "utf-8", "oe": "utf-8" } @@ -1341,14 +1121,14 @@ "hardware": "RAM 4G+", "size": "5MB", "remark": "Minecraft Fabric", - "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar", "author": "fabricmc.net", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.20.1 -downloadMinecraft -noprofile", + "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.20.1 -downloadMinecraft -noprofile", "ie": "utf-8", "oe": "utf-8" } @@ -1363,36 +1143,14 @@ "hardware": "RAM 4G+", "size": "5MB", "remark": "Minecraft Fabric", - "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar", "author": "fabricmc.net", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.19.4 -downloadMinecraft -noprofile", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "gameType": "Minecraft", - "description": "Minecraft 1.19.2 with Fabric Loader", - "title": "Fabric 1.19.2 (Supports Mods)", - "category": "mc-fabric", - "runtime": "Java 17+", - "hardware": "RAM 4G+", - "size": "5MB", - "remark": "Minecraft Fabric", - "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", - "author": "fabricmc.net", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "setupInfo": { - "type": "minecraft/java/fabric", - "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", - "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.19.2 -downloadMinecraft -noprofile", + "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.19.4 -downloadMinecraft -noprofile", "ie": "utf-8", "oe": "utf-8" } @@ -1407,14 +1165,14 @@ "hardware": "RAM 4G+", "size": "5MB", "remark": "Minecraft Fabric", - "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar", "author": "fabricmc.net", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.18.2 -downloadMinecraft -noprofile", + "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.18.2 -downloadMinecraft -noprofile", "ie": "utf-8", "oe": "utf-8" } @@ -1429,14 +1187,14 @@ "hardware": "RAM 4G+", "size": "5MB", "remark": "Minecraft Fabric", - "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar", "author": "fabricmc.net", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.17.1 -downloadMinecraft -noprofile", + "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.17.1 -downloadMinecraft -noprofile", "ie": "utf-8", "oe": "utf-8" } @@ -1451,58 +1209,14 @@ "hardware": "RAM 4G+", "size": "5MB", "remark": "Minecraft Fabric", - "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", - "author": "fabricmc.net", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "setupInfo": { - "type": "minecraft/java/fabric", - "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", - "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.16.5 -downloadMinecraft -noprofile", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "gameType": "Minecraft", - "description": "Minecraft 1.15.2 with Fabric Loader", - "title": "Fabric 1.15.2 (Supports Mods)", - "category": "mc-fabric", - "runtime": "Java 8+", - "hardware": "RAM 4G+", - "size": "5MB", - "remark": "Minecraft Fabric", - "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", - "author": "fabricmc.net", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "setupInfo": { - "type": "minecraft/java/fabric", - "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", - "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.15.2 -downloadMinecraft -noprofile", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "gameType": "Minecraft", - "description": "Minecraft 1.14.4 with Fabric Loader", - "title": "Fabric 1.14.4 (Supports Mods)", - "category": "mc-fabric", - "runtime": "Java 8+", - "hardware": "RAM 4G+", - "size": "5MB", - "remark": "Minecraft Fabric", - "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar", "author": "fabricmc.net", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.0.3.jar server -mcversion 1.14.4 -downloadMinecraft -noprofile", + "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.16.5 -downloadMinecraft -noprofile", "ie": "utf-8", "oe": "utf-8" } @@ -1869,12 +1583,12 @@ "hardware": "RAM 4G+", "size": "50MB", "remark": "Only Paper included", - "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.8/builds/10/downloads/paper-1.21.8-10.jar", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.8/builds/60/downloads/paper-1.21.8-60.jar", "author": "papermc.io", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { "type": "minecraft/java/paper", - "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.8-10.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.8-60.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -1891,7 +1605,7 @@ "hardware": "RAM 4G+", "size": "50MB", "remark": "Only Paper included", - "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.6/builds/48/downloads/paper-1.21.4-48.jar", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.6/builds/48/downloads/paper-1.21.6-48.jar", "author": "papermc.io", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "setupInfo": { From 63eb7418de5be3eb13e9eb06c7003c9a56317ecc Mon Sep 17 00:00:00 2001 From: YuMao233 Date: Sun, 21 Sep 2025 13:31:12 +0800 Subject: [PATCH 269/338] =?UTF-8?q?fix:=20=E5=88=A0=E9=99=A4=E5=A4=9A?= =?UTF-8?q?=E4=BD=99=E9=85=8D=E7=BD=AE=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- market.json | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/market.json b/market.json index f2a22a1..d984da1 100644 --- a/market.json +++ b/market.json @@ -166,9 +166,6 @@ "{mcsm_workspace}/ZomboidConfig|/home/steam/Zomboid", "{mcsm_workspace}/ZomboidDedicatedServer|/home/steam/ZomboidDedicatedServer" ], - "memory": 4096, - "networkMode": "bridge", - "cpuUsage": 100, "workingDir": "", "env": [], "changeWorkdir": false @@ -204,9 +201,6 @@ "containerName": "endstone-server", "ports": ["{mcsm_port1}:19132/udp"], "extraVolumes": [], - "memory": 2048, - "networkMode": "bridge", - "cpuUsage": 100, "workingDir": "", "env": [], "changeWorkdir": true @@ -381,9 +375,6 @@ "containerName": "terraria-server", "ports": ["{mcsm_port1}:7777/tcp"], "extraVolumes": [], - "memory": 4096, - "networkMode": "bridge", - "cpuUsage": 100, "workingDir": "/root/.local/share/Terraria/Worlds", "env": [], "changeWorkdir": false @@ -460,9 +451,6 @@ "{mcsm_workspace}/ZomboidConfig|/home/steam/Zomboid", "{mcsm_workspace}/ZomboidDedicatedServer|/home/steam/ZomboidDedicatedServer" ], - "memory": 4096, - "networkMode": "bridge", - "cpuUsage": 100, "workingDir": "", "env": [], "changeWorkdir": false @@ -852,9 +840,6 @@ "containerName": "endstone-server", "ports": ["{mcsm_port1}:19132/udp"], "extraVolumes": [], - "memory": 2048, - "networkMode": "bridge", - "cpuUsage": 100, "workingDir": "", "env": [], "changeWorkdir": true @@ -989,9 +974,6 @@ "extraVolumes": [ "{mcsm_workspace}/SquadConfig|/home/steam/squad-dedicated/SquadGame/ServerConfig/" ], - "memory": 8192, - "networkMode": "bridge", - "cpuUsage": 100, "workingDir": "", "env": [], "changeWorkdir": false @@ -1029,9 +1011,6 @@ "extraVolumes": [ "{mcsm_workspace}/SquadConfig|/home/steam/squad-dedicated/SquadGame/ServerConfig/" ], - "memory": 8192, - "networkMode": "bridge", - "cpuUsage": 100, "workingDir": "", "env": [], "changeWorkdir": false @@ -1071,9 +1050,6 @@ "{mcsm_workspace}/config:/app/.config/unity3d/Facepunch/Rust", "{mcsm_workspace}/data:/data" ], - "memory": 16384, - "networkMode": "bridge", - "cpuUsage": 100, "workingDir": "", "env": [], "changeWorkdir": false @@ -1113,9 +1089,6 @@ "{mcsm_workspace}/config:/app/.config/unity3d/Facepunch/Rust", "{mcsm_workspace}/data:/data" ], - "memory": 16384, - "networkMode": "bridge", - "cpuUsage": 100, "workingDir": "", "env": [], "changeWorkdir": false From 259345703c904dbbe3a04ce97e243e2f3ff5d691 Mon Sep 17 00:00:00 2001 From: SkyKingPX Date: Tue, 23 Sep 2025 12:33:07 +0200 Subject: [PATCH 270/338] Updated Versions & Descriptions fix: Fixed Windows start command Added NeoForge Versions --- market.json | 410 ++++++++++++++++++++++++++++++++++++++++--------- templates.json | 236 ++++++++++------------------ 2 files changed, 420 insertions(+), 226 deletions(-) diff --git a/market.json b/market.json index d984da1..f91b492 100644 --- a/market.json +++ b/market.json @@ -15,10 +15,10 @@ { "language": "zh_cn", "platform": "ALL", - "description": " Minecraft 1.21.1 快速开服", + "description": " Minecraft 1.21.1 快速开服 ", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/wallpaper.webp", "gameType": "Minecraft", - "title": "Minecraft 1.21.1 快速开服", + "title": "[PaperMC] Minecraft 1.21.1 快速开服", "category": "mc-paper", "runtime": "Java 17+", "hardware": "RAM 8G+", @@ -41,7 +41,7 @@ "description": " 中小型互通服推荐,1.20.4 版本,快速开服,包含ESS、锁箱子、操作回滚、领地商店等基础插件。", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/wallpaper.webp", "gameType": "Minecraft", - "title": "Minecraft 1.20.4", + "title": "[PaperMC] Minecraft 1.20.4", "category": "mc-paper", "runtime": "Java 21+", "hardware": "RAM 6G+", @@ -213,7 +213,7 @@ "gameType": "Minecraft", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "description": "Paper Minecraft 1.21.8 快速开服,性能强,占用少,支持插件,不支持模组", - "title": "Minecraft 1.21.8 Paper 快速开服", + "title": "[PaperMC] Minecraft 1.21.8 快速开服", "category": "mc-paper", "runtime": "Java 21+", "hardware": "RAM 8G+", @@ -236,7 +236,7 @@ "gameType": "Minecraft", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "description": "Paper Minecraft 1.20.1 快速开服,性能强,占用少,支持插件,不支持模组", - "title": "Minecraft 1.20.1 Paper 快速开服", + "title": "[PaperMC] Minecraft 1.20.1 快速开服", "category": "mc-paper", "runtime": "Java 21+", "hardware": "RAM 8G+", @@ -260,7 +260,7 @@ "description": "Minecraft Forge 1.20.1 服务器,支持 Forge 模组!", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-mod.webp", "gameType": "Minecraft", - "title": "Forge 1.20.1 Java 版 (支持模组)", + "title": "[Forge] Minecraft 1.20.1 Java 版 (支持模组)", "category": "mc-forge", "runtime": "Java 17+", "hardware": "RAM 8G+", @@ -283,7 +283,7 @@ "description": "Minecraft Forge 1.20.1 服务器,支持 Forge 模组!", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-mod.webp", "gameType": "Minecraft", - "title": "Forge 1.20.1 Java 版 (支持模组)", + "title": "[Forge] Minecraft 1.20.1 Java 版 (支持模组)", "category": "mc-forge", "runtime": "Java 17+", "hardware": "RAM 8G+", @@ -293,7 +293,7 @@ "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", - "startCommand": "start.bat", + "startCommand": ".\\run.bat", "stopCommand": "stop", "updateCommand": "java -jar forge-1.20.1-47.3.33-installer.jar --installServer", "ie": "utf-8", @@ -306,7 +306,7 @@ "description": "适用于 Windows 系统,支持 Minecraft Forge 模组,快速开服!", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-mod.webp", "gameType": "Minecraft", - "title": "Forge 1.20.6 Java 版 (支持模组)", + "title": "[Forge] Minecraft 1.20.6 Java 版 (支持模组)", "category": "mc-forge", "runtime": "Java 21+", "hardware": "RAM 8G+", @@ -316,7 +316,7 @@ "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", - "startCommand": "start.bat", + "startCommand": ".\\run.bat", "stopCommand": "stop", "updateCommand": "java -jar forge-1.20.6-50.1.48-installer.jar --installServer", "ie": "utf-8", @@ -329,7 +329,7 @@ "description": "适用于 Windows 系统,支持 Minecraft Forge 模组,快速开服!", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-mod.webp", "gameType": "Minecraft", - "title": "Forge 1.19.2 Java 版 (支持模组)", + "title": "[Forge] Minecraft 1.19.2 Java 版 (支持模组)", "category": "mc-forge", "runtime": "Java 17+", "hardware": "RAM 8G+", @@ -339,7 +339,7 @@ "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", - "startCommand": "start.bat", + "startCommand": ".\\run.bat", "stopCommand": "stop", "updateCommand": "java -jar forge-1.19.2-43.4.20-installer.jar --installServer", "ie": "utf-8", @@ -458,13 +458,14 @@ } }, + { "platform": "ALL", "language": "en_us", "gameType": "Minecraft", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "description": "Minecraft 1.21.8 Paper Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support", - "title": "Paper Minecraft 1.21.8 Quick Server Setup", + "title": "[PaperMC] Minecraft 1.21.8", "category": "mc-paper", "runtime": "Java 21+", "hardware": "RAM 8G+", @@ -481,13 +482,36 @@ "oe": "utf-8" } }, + { + "platform": "ALL", + "language": "en_us", + "gameType": "Minecraft", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "description": "Minecraft 1.21.4 Paper Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support", + "title": "[PaperMC] Minecraft 1.21.4", + "category": "mc-paper", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "50MB", + "remark": "Minecraft Paper", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/232/downloads/paper-1.21.4-232.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java/paper", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.4-232.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "platform": "ALL", "language": "en_us", "gameType": "Minecraft", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "description": "Minecraft 1.20.1 Paper Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support", - "title": "Paper Minecraft 1.20.1 Quick Server Setup", + "title": "[PaperMC] Minecraft 1.20.1", "category": "mc-paper", "runtime": "Java 21+", "hardware": "RAM 8G+", @@ -504,13 +528,14 @@ "oe": "utf-8" } }, + { "platform": "ALL", "language": "en_us", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", "description": "Minecraft 1.21.8 Purpur Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support", - "title": "Purpur Minecraft 1.21.8 Quick Server Setup", + "title": "[PurpurMC] Minecraft 1.21.8", "category": "mc-purpur", "runtime": "Java 21+", "hardware": "RAM 8G+", @@ -527,13 +552,129 @@ "oe": "utf-8" } }, + { + "platform": "ALL", + "language": "en_us", + "gameType": "Minecraft", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "description": "Minecraft 1.21.4 Purpur Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support", + "title": "[PurpurMC] Minecraft 1.21.4", + "category": "mc-purpur", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "50MB", + "remark": "Only Purpur included", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.4-2416.jar", + "author": "purpurmc.org", + "setupInfo": { + "type": "minecraft/java/purpur", + "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.4-2416.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { "platform": "Linux", "language": "en_us", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-mod.webp", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp", + "gameType": "Minecraft", + "description": "Minecraft 1.21.8 Forge Quick Server Setup, Mod Support for Linux", + "title": "[Forge] Minecraft 1.21.8", + "category": "mc-forge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.8-58.1.4/forge-1.21.8-58.1.4-installer.jar", + "author": "minecraftforge.net", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.21.8-58.1.4-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "Windows", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp", "gameType": "Minecraft", - "description": "Forge 1.21.1 Server for Linux", - "title": "Forge 1.21.1 (Supports Mods)", + "description": "Minecraft 1.21.8 Forge Quick Server Setup, Mod Support for Windows", + "title": "[Forge] Minecraft 1.21.8", + "category": "mc-forge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.8-58.1.4/forge-1.21.8-58.1.4-installer.jar", + "author": "minecraftforge.net", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": ".\\run.bat", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.21.8-58.1.4-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "Linux", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp", + "gameType": "Minecraft", + "description": "Minecraft 1.21.4 Forge Quick Server Setup, Mod Support for Linux", + "title": "[Forge] Minecraft 1.21.4", + "category": "mc-forge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.4-54.1.7/forge-1.21.4-54.1.7-installer.jar", + "author": "minecraftforge.net", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.21.4-54.1.7-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "Windows", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp", + "gameType": "Minecraft", + "description": "Minecraft 1.21.4 Forge Quick Server Setup, Mod Support for Windows", + "title": "[Forge] Minecraft 1.21.4", + "category": "mc-forge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.4-54.1.7/forge-1.21.4-54.1.7-installer.jar", + "author": "minecraftforge.net", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": ".\\run.bat", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.21.4-54.1.7-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "Linux", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp", + "gameType": "Minecraft", + "description": "Minecraft 1.21.1 Forge Quick Server Setup, Mod Support for Linux", + "title": "[Forge] Minecraft 1.21.1", "category": "mc-forge", "runtime": "Java 21+", "hardware": "RAM 8G+", @@ -553,10 +694,10 @@ { "platform": "Windows", "language": "en_us", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-mod.webp", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp", "gameType": "Minecraft", - "description": "Forge 1.21.1 Server for Windows", - "title": "Forge 1.21.1 (Supports Mods)", + "description": "Minecraft 1.21.1 Forge Quick Server Setup, Mod Support for Windows", + "title": "[Forge] Minecraft 1.21.1", "category": "mc-forge", "runtime": "Java 21+", "hardware": "RAM 8G+", @@ -566,101 +707,172 @@ "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", - "startCommand": "start.bat", + "startCommand": ".\\run.bat", "stopCommand": "stop", "updateCommand": "java -jar forge-1.21.1-52.1.3-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } }, + { - "platform": "ALL", + "platform": "Linux", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "gameType": "Minecraft", + "description": "Minecraft 1.21.8 NeoForge Quick Server Setup, Mod Support for Linux", + "title": "[NeoForge] Minecraft 1.21.8", + "category": "mc-neoforge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft NeoForge", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.8.47/neoforge-21.8.47-installer.jar", + "author": "neoforged.net", + "setupInfo": { + "type": "minecraft/java/neoforge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar neoforge-21.8.47-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "Windows", "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", + "description": "Minecraft 1.21.8 NeoForge Quick Server Setup, Mod Support for Windows", + "title": "[NeoForge] Minecraft 1.21.8", + "category": "mc-neoforge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft NeoForge", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.8.47/neoforge-21.8.47-installer.jar", + "author": "neoforged.net", + "setupInfo": { + "type": "minecraft/java/neoforge", + "startCommand": ".\\run.bat", + "stopCommand": "stop", + "updateCommand": "java -jar neoforge-21.8.47-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "Linux", + "language": "en_us", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "description": "[Purpur] Minecraft 1.21.4 Purpur", - "title": "Minecraft 1.21.4", - "category": "mc-purpur", + "gameType": "Minecraft", + "description": "Minecraft 1.21.4 NeoForge Quick Server Setup, Mod Support for Linux", + "title": "[NeoForge] Minecraft 1.21.4", + "category": "mc-neoforge", "runtime": "Java 21+", "hardware": "RAM 8G+", - "size": "50MB", - "remark": "Only Purpur included", - "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.4-2416.jar", - "author": "purpurmc.org", + "size": "7MB", + "remark": "Minecraft NeoForge", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.4.154/neoforge-21.4.154-installer.jar", + "author": "neoforged.net", "setupInfo": { - "type": "minecraft/java/purpur", - "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.4-2416.jar nogui", + "type": "minecraft/java/neoforge", + "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "", + "updateCommand": "java -jar neoforge-21.4.154-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } }, { - "platform": "ALL", + "platform": "Windows", "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", + "description": "Minecraft 1.21.4 NeoForge Quick Server Setup, Mod Support for Windows", + "title": "[NeoForge] Minecraft 1.21.4", + "category": "mc-neoforge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft NeoForge", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.4.154/neoforge-21.4.154-installer.jar", + "author": "neoforged.net", + "setupInfo": { + "type": "minecraft/java/neoforge", + "startCommand": ".\\run.bat", + "stopCommand": "stop", + "updateCommand": "java -jar neoforge-21.4.154-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "Linux", + "language": "en_us", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "description": "Minecraft 1.21.4 Paper", - "title": "Minecraft 1.21.4", - "category": "mc-paper", + "gameType": "Minecraft", + "description": "Minecraft 1.21.1 NeoForge Quick Server Setup, Mod Support for Linux", + "title": "[NeoForge] Minecraft 1.21.1", + "category": "mc-neoforge", "runtime": "Java 21+", "hardware": "RAM 8G+", - "size": "50MB", - "remark": "Minecraft Paper", - "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/232/downloads/paper-1.21.4-232.jar", - "author": "papermc.io", + "size": "7MB", + "remark": "Minecraft NeoForge", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.1.209/neoforge-21.1.209-installer.jar", + "author": "neoforged.net", "setupInfo": { - "type": "minecraft/java/paper", - "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.4-232.jar nogui", + "type": "minecraft/java/neoforge", + "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "", + "updateCommand": "java -jar neoforge-21.1.209-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } }, { - "platform": "ALL", + "platform": "Windows", "language": "en_us", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", - "description": "[Vanilla] Minecraft 1.21.8", - "title": "Minecraft 1.21.8", - "category": "mc-vanilla", + "description": "Minecraft 1.21.1 NeoForge Quick Server Setup, Mod Support for Windows", + "title": "[NeoForge] Minecraft 1.21.1", + "category": "mc-neoforge", "runtime": "Java 21+", - "hardware": "RAM 2G+", - "size": "55MB", - "remark": "Minecraft Java", - "targetLink": "https://piston-data.mojang.com/v1/objects/6bce4ef400e4efaa63a13d5e6f6b500be969ef81/server.jar", - "author": "Mojang Studios", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft NeoForge", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.1.209/neoforge-21.1.209-installer.jar", + "author": "neoforged.net", "setupInfo": { - "type": "minecraft/java", - "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", + "type": "minecraft/java/neoforge", + "startCommand": ".\\run.bat", "stopCommand": "stop", - "updateCommand": "", + "updateCommand": "java -jar neoforge-21.1.209-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } }, + { "platform": "ALL", "language": "en_us", - "gameType": "Minecraft", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "description": "[Vanilla] Minecraft 1.21.4", - "title": "Minecraft 1.21.4", - "category": "mc-vanilla", + "gameType": "Minecraft", + "description": "Minecraft 1.21.8 Fabric Quick Server Setup, Mod Support", + "title": "[FabricMC] Minecraft 1.21.8", + "category": "mc-fabric", "runtime": "Java 21+", - "hardware": "RAM 2G+", - "size": "55MB", - "remark": "Minecraft Java", - "targetLink": "https://piston-data.mojang.com/v1/objects/4707d00eb834b446575d89a61a11b5d548d8c001/server.jar", - "author": "Mojang Studios", + "hardware": "RAM 8G+", + "size": "5MB", + "remark": "Minecraft Fabric", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar", + "author": "fabricmc.net", "setupInfo": { - "type": "minecraft/java", - "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", + "type": "minecraft/java/fabric", + "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", "stopCommand": "stop", - "updateCommand": "", + "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.21.8 -downloadMinecraft -noprofile", "ie": "utf-8", "oe": "utf-8" } @@ -670,8 +882,8 @@ "language": "en_us", "gameType": "Minecraft", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "description": "Minecraft 1.21.4 with Fabric Loader", - "title": "Fabric 1.21.4 (Supports Mods)", + "description": "Minecraft 1.21.4 Fabric Quick Server Setup, Mod Support", + "title": "[FabricMC] Minecraft 1.21.4", "category": "mc-fabric", "runtime": "Java 21+", "hardware": "RAM 8G+", @@ -691,10 +903,10 @@ { "platform": "ALL", "language": "en_us", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", "gameType": "Minecraft", - "description": "Minecraft 1.21.8 with Fabric Loader", - "title": "Fabric 1.21.8 (Supports Mods)", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "description": "Minecraft 1.21.1 Fabric Quick Server Setup, Mod Support", + "title": "[FabricMC] Minecraft 1.21.1", "category": "mc-fabric", "runtime": "Java 21+", "hardware": "RAM 8G+", @@ -706,11 +918,59 @@ "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", "stopCommand": "stop", - "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.21.8 -downloadMinecraft -noprofile", + "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.21.1 -downloadMinecraft -noprofile", + "ie": "utf-8", + "oe": "utf-8" + } + }, + + { + "platform": "ALL", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "gameType": "Minecraft", + "description": "Standard Vanilla Minecraft 1.21.8 Server Setup (Official) - No Mod/Plugin Support", + "title": "[Vanilla] Minecraft 1.21.8", + "category": "mc-vanilla", + "runtime": "Java 21+", + "hardware": "RAM 2G+", + "size": "55MB", + "remark": "Minecraft Java", + "targetLink": "https://piston-data.mojang.com/v1/objects/6bce4ef400e4efaa63a13d5e6f6b500be969ef81/server.jar", + "author": "Mojang Studios", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "ALL", + "language": "en_us", + "gameType": "Minecraft", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "description": "Standard Vanilla Minecraft 1.21.4 Server Setup (Official) - No Mod/Plugin Support", + "title": "[Vanilla] Minecraft 1.21.4", + "category": "mc-vanilla", + "runtime": "Java 21+", + "hardware": "RAM 2G+", + "size": "55MB", + "remark": "Minecraft Java", + "targetLink": "https://piston-data.mojang.com/v1/objects/4707d00eb834b446575d89a61a11b5d548d8c001/server.jar", + "author": "Mojang Studios", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", + "stopCommand": "stop", + "updateCommand": "", "ie": "utf-8", "oe": "utf-8" } }, + { "title": "森林之子 服务器", "language": "zh_cn", diff --git a/templates.json b/templates.json index e54a464..156065c 100644 --- a/templates.json +++ b/templates.json @@ -14,8 +14,8 @@ { "language": "en_us", "gameType": "Minecraft", - "description": "[Purpur] Minecraft 1.21.8 Purpur", - "title": "Minecraft 1.21.8", + "description": "Minecraft 1.21.8 Purpur Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support", + "title": "[PurpurMC] Minecraft 1.21.8", "category": "mc-purpur", "runtime": "Java 21+", "hardware": "RAM 4G+", @@ -36,8 +36,8 @@ { "language": "en_us", "gameType": "Minecraft", - "description": "[Purpur] Minecraft 1.21.6 Purpur", - "title": "Minecraft 1.21.6", + "description": "Minecraft 1.21.6 Purpur Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support", + "title": "[PurpurMC] Minecraft 1.21.6", "category": "mc-purpur", "runtime": "Java 21+", "hardware": "RAM 4G+", @@ -58,30 +58,8 @@ { "language": "en_us", "gameType": "Minecraft", - "description": "[Purpur] Minecraft 1.21.5 Purpur", - "title": "Minecraft 1.21.5", - "category": "mc-purpur", - "runtime": "Java 21+", - "hardware": "RAM 4G+", - "size": "55MB", - "remark": "Only Purpur included", - "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.5-2450.jar", - "author": "purpurmc.org", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "setupInfo": { - "type": "minecraft/java/purpur", - "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.5-2450.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "gameType": "Minecraft", - "description": "[Purpur] Minecraft 1.21.4 Purpur", - "title": "Minecraft 1.21.4", + "description": "Minecraft 1.21.4 Purpur Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support", + "title": "[PurpurMC] Minecraft 1.21.4", "category": "mc-purpur", "runtime": "Java 21+", "hardware": "RAM 4G+", @@ -102,8 +80,8 @@ { "language": "en_us", "gameType": "Minecraft", - "description": "[Purpur] Minecraft 1.21.3 Purpur", - "title": "Minecraft 1.21.3", + "description": "Minecraft 1.21.3 Purpur Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support", + "title": "[PurpurMC] Minecraft 1.21.3", "category": "mc-purpur", "runtime": "Java 21+", "hardware": "RAM 4G+", @@ -124,8 +102,8 @@ { "language": "en_us", "gameType": "Minecraft", - "description": "[Purpur] Minecraft 1.21.1 Purpur", - "title": "Minecraft 1.21.1", + "description": "Minecraft 1.21.1 Purpur Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support", + "title": "[PurpurMC] Minecraft 1.21.1", "category": "mc-purpur", "runtime": "Java 21+", "hardware": "RAM 4G+", @@ -147,7 +125,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "[Purpur] Minecraft 1.20.6 Purpur", - "title": "Minecraft 1.20.6", + "title": "[PurpurMC] Minecraft 1.20.6", "category": "mc-purpur", "runtime": "Java 21+", "hardware": "RAM 4G+", @@ -169,7 +147,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "[Purpur] Minecraft 1.20.4 Purpur", - "title": "Minecraft 1.20.4", + "title": "[PurpurMC] Minecraft 1.20.4", "category": "mc-purpur", "runtime": "Java 21+", "hardware": "RAM 4G+", @@ -191,7 +169,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "[Purpur] Minecraft 1.20.1 Purpur", - "title": "Minecraft 1.20.1", + "title": "[PurpurMC] Minecraft 1.20.1", "category": "mc-purpur", "runtime": "Java 17+", "hardware": "RAM 4G+", @@ -213,7 +191,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "[Purpur] Minecraft 1.19.2 Purpur", - "title": "Minecraft 1.19.2", + "title": "[PurpurMC] Minecraft 1.19.2", "category": "mc-purpur", "runtime": "Java 17+", "hardware": "RAM 4G+", @@ -235,7 +213,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "[Purpur] Minecraft 1.18.2 Purpur", - "title": "Minecraft 1.18.2", + "title": "[PurpurMC] Minecraft 1.18.2", "category": "mc-purpur", "runtime": "Java 17+", "hardware": "RAM 4G+", @@ -253,55 +231,11 @@ "oe": "utf-8" } }, - { - "language": "en_us", - "gameType": "Minecraft", - "description": "[Purpur] Minecraft 1.17.1 Purpur", - "title": "Minecraft 1.17.1", - "category": "mc-purpur", - "runtime": "Java 16+", - "hardware": "RAM 4G+", - "size": "50MB", - "remark": "Only Purpur included", - "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.17.1-1428.jar", - "author": "purpurmc.org", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "setupInfo": { - "type": "minecraft/java/purpur", - "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.17.1-1428.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, - { - "language": "en_us", - "gameType": "Minecraft", - "description": "[Purpur] Minecraft 1.16.5 Purpur", - "title": "Minecraft 1.16.5", - "category": "mc-purpur", - "runtime": "Java 8+", - "hardware": "RAM 4G+", - "size": "50MB", - "remark": "Only Purpur included", - "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.16.5-1171.jar", - "author": "purpurmc.org", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "setupInfo": { - "type": "minecraft/java/purpur", - "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.16.5-1171.jar nogui", - "stopCommand": "stop", - "updateCommand": "", - "ie": "utf-8", - "oe": "utf-8" - } - }, { "language": "en_us", "gameType": "Minecraft", "description": "[Paper] Minecraft 1.21.8 Paper", - "title": "Minecraft 1.21.8", + "title": "[PaperMC] Minecraft 1.21.8", "category": "mc-paper", "runtime": "Java 21+", "hardware": "RAM 4G+", @@ -323,7 +257,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "[Paper] Minecraft 1.21.6 Paper", - "title": "Minecraft 1.21.6", + "title": "[PaperMC] Minecraft 1.21.6", "category": "mc-paper", "runtime": "Java 21+", "hardware": "RAM 4G+", @@ -345,7 +279,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "[Paper] Minecraft 1.21.4 Paper", - "title": "Minecraft 1.21.4", + "title": "[PaperMC] Minecraft 1.21.4", "category": "mc-paper", "runtime": "Java 21+", "hardware": "RAM 4G+", @@ -367,7 +301,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "[Paper] Minecraft 1.21.3 Paper", - "title": "Minecraft 1.21.3", + "title": "[PaperMC] Minecraft 1.21.3", "category": "mc-paper", "runtime": "Java 21+", "hardware": "RAM 4G+", @@ -389,7 +323,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "[Paper] Minecraft 1.21.1 Paper", - "title": "Minecraft 1.21.1", + "title": "[PaperMC] Minecraft 1.21.1", "category": "mc-paper", "runtime": "Java 21+", "hardware": "RAM 4G+", @@ -411,7 +345,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "[Paper] Minecraft 1.20.6 Paper", - "title": "Minecraft 1.20.6", + "title": "[PaperMC] Minecraft 1.20.6", "category": "mc-paper", "runtime": "Java 21+", "hardware": "RAM 4G+", @@ -433,7 +367,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "[Paper] Minecraft 1.20.4 Paper", - "title": "Minecraft 1.20.4", + "title": "[PaperMC] Minecraft 1.20.4", "category": "mc-paper", "runtime": "Java 21+", "hardware": "RAM 4G+", @@ -455,7 +389,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "[Paper] Minecraft 1.20.1 Paper", - "title": "Minecraft 1.20.1", + "title": "[PaperMC] Minecraft 1.20.1", "category": "mc-paper", "runtime": "Java 17+", "hardware": "RAM 4G+", @@ -477,7 +411,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "title": "NeoForge 1.21.8 (Supports Mods)", + "title": "[NeoForge] Minecraft 1.21.8", "category": "mc-neoforge", "runtime": "Java 21+", "hardware": "RAM 8G+", @@ -499,7 +433,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "title": "NeoForge 1.21.6 (Supports Mods)", + "title": "[NeoForge] Minecraft 1.21.6", "category": "mc-neoforge", "runtime": "Java 21+", "hardware": "RAM 8G+", @@ -521,7 +455,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "title": "NeoForge 1.21.5 (Supports Mods)", + "title": "[NeoForge] Minecraft 1.21.5", "category": "mc-neoforge", "runtime": "Java 21+", "hardware": "RAM 8G+", @@ -543,7 +477,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "title": "NeoForge 1.21.4 (Supports Mods)", + "title": "[NeoForge] Minecraft 1.21.4", "category": "mc-neoforge", "runtime": "Java 21+", "hardware": "RAM 8G+", @@ -565,7 +499,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "title": "NeoForge 1.21.1 (Supports Mods)", + "title": "[NeoForge] Minecraft 1.21.1", "category": "mc-neoforge", "runtime": "Java 21+", "hardware": "RAM 8G+", @@ -587,7 +521,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "title": "NeoForge 1.20.6 (Supports Mods)", + "title": "[NeoForge] Minecraft 1.20.6", "category": "mc-neoforge", "runtime": "Java 21+", "hardware": "RAM 8G+", @@ -609,7 +543,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "title": "NeoForge 1.20.4 (Supports Mods)", + "title": "[NeoForge] Minecraft 1.20.4", "category": "mc-neoforge", "runtime": "Java 21+", "hardware": "RAM 8G+", @@ -631,7 +565,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "title": "Forge 1.21.8 (Supports Mods)", + "title": "[Forge] Minecraft 1.21.8", "category": "mc-forge", "runtime": "Java 21+", "hardware": "RAM 8G+", @@ -653,7 +587,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "title": "Forge 1.21.6 (Supports Mods)", + "title": "[Forge] Minecraft 1.21.6", "category": "mc-forge", "runtime": "Java 21+", "hardware": "RAM 8G+", @@ -675,7 +609,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "title": "Forge 1.21.5 (Supports Mods)", + "title": "[Forge] Minecraft 1.21.5", "category": "mc-forge", "runtime": "Java 21+", "hardware": "RAM 8G+", @@ -697,7 +631,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "title": "Forge 1.21.4 (Supports Mods)", + "title": "[Forge] Minecraft 1.21.4", "category": "mc-forge", "runtime": "Java 21+", "hardware": "RAM 8G+", @@ -719,7 +653,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "title": "Forge 1.21.1 (Supports Mods)", + "title": "[Forge] Minecraft 1.21.1", "category": "mc-forge", "runtime": "Java 21+", "hardware": "RAM 8G+", @@ -741,7 +675,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "title": "Forge 1.20.6 (Supports Mods)", + "title": "[Forge] Minecraft 1.20.6", "category": "mc-forge", "runtime": "Java 21+", "hardware": "RAM 8G+", @@ -763,7 +697,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "title": "Forge 1.20.4 (Supports Mods)", + "title": "[Forge] Minecraft 1.20.4", "category": "mc-forge", "runtime": "Java 21+", "hardware": "RAM 8G+", @@ -785,7 +719,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "title": "Forge 1.20.1 (Supports Mods)", + "title": "[Forge] Minecraft 1.20.1", "category": "mc-forge", "runtime": "Java 17+", "hardware": "RAM 8G+", @@ -807,7 +741,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "title": "Forge 1.19.4 (Supports Mods)", + "title": "[Forge] Minecraft 1.19.4", "category": "mc-forge", "runtime": "Java 17+", "hardware": "RAM 8G+", @@ -829,7 +763,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "title": "Forge 1.18.2 (Supports Mods)", + "title": "[Forge] Minecraft 1.18.2", "category": "mc-forge", "runtime": "Java 17+", "hardware": "RAM 8G+", @@ -851,7 +785,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "title": "Forge 1.17.1 (Supports Mods)", + "title": "[Forge] Minecraft 1.17.1", "category": "mc-forge", "runtime": "Java 16+", "hardware": "RAM 8G+", @@ -873,7 +807,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "title": "Forge 1.16.5 (Supports Mods)", + "title": "[Forge] Minecraft 1.16.5", "category": "mc-forge", "runtime": "Java 8+", "hardware": "RAM 8G+", @@ -895,7 +829,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "title": "Forge 1.12.2 (Supports Mods)", + "title": "[Forge] Minecraft 1.12.2", "category": "mc-forge", "runtime": "Java 8+", "hardware": "RAM 8G+", @@ -917,7 +851,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "title": "Forge 1.8.9 (Supports Mods)", + "title": "[Forge] Minecraft 1.8.9", "category": "mc-forge", "runtime": "Java 7+", "hardware": "RAM 8G+", @@ -939,7 +873,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", - "title": "Forge 1.7.10 (Supports Mods)", + "title": "[Forge] Minecraft 1.7.10", "category": "mc-forge", "runtime": "Java 7+", "hardware": "RAM 8G+", @@ -961,7 +895,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "Minecraft 1.21.8 with Fabric Loader", - "title": "Fabric 1.21.8 (Supports Mods)", + "title": "[FabricMC] Minecraft 1.21.8", "category": "mc-fabric", "runtime": "Java 21+", "hardware": "RAM 4G+", @@ -983,7 +917,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "Minecraft 1.21.6 with Fabric Loader", - "title": "Fabric 1.21.6 (Supports Mods)", + "title": "[FabricMC] Minecraft 1.21.6", "category": "mc-fabric", "runtime": "Java 21+", "hardware": "RAM 4G+", @@ -1005,7 +939,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "Minecraft 1.21.5 with Fabric Loader", - "title": "Fabric 1.21.5 (Supports Mods)", + "title": "[FabricMC] Minecraft 1.21.5", "category": "mc-fabric", "runtime": "Java 21+", "hardware": "RAM 4G+", @@ -1027,7 +961,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "Minecraft 1.21.4 with Fabric Loader", - "title": "Fabric 1.21.4 (Supports Mods)", + "title": "[FabricMC] Minecraft 1.21.4", "category": "mc-fabric", "runtime": "Java 21+", "hardware": "RAM 4G+", @@ -1049,7 +983,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "Minecraft 1.21.1 with Fabric Loader", - "title": "Fabric 1.21.1 (Supports Mods)", + "title": "[FabricMC] Minecraft 1.21.1", "category": "mc-fabric", "runtime": "Java 21+", "hardware": "RAM 4G+", @@ -1071,7 +1005,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "Minecraft 1.20.6 with Fabric Loader", - "title": "Fabric 1.20.6 (Supports Mods)", + "title": "[FabricMC] Minecraft 1.20.6", "category": "mc-fabric", "runtime": "Java 21+", "hardware": "RAM 4G+", @@ -1093,7 +1027,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "Minecraft 1.20.4 with Fabric Loader", - "title": "Fabric 1.20.4 (Supports Mods)", + "title": "[FabricMC] Minecraft 1.20.4", "category": "mc-fabric", "runtime": "Java 21+", "hardware": "RAM 4G+", @@ -1115,7 +1049,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "Minecraft 1.20.1 with Fabric Loader", - "title": "Fabric 1.20.1 (Supports Mods)", + "title": "[FabricMC] Minecraft 1.20.1", "category": "mc-fabric", "runtime": "Java 17+", "hardware": "RAM 4G+", @@ -1137,7 +1071,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "Minecraft 1.19.4 with Fabric Loader", - "title": "Fabric 1.19.4 (Supports Mods)", + "title": "[FabricMC] Minecraft 1.19.4", "category": "mc-fabric", "runtime": "Java 17+", "hardware": "RAM 4G+", @@ -1159,7 +1093,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "Minecraft 1.18.2 with Fabric Loader", - "title": "Fabric 1.18.2 (Supports Mods)", + "title": "[FabricMC] Minecraft 1.18.2", "category": "mc-fabric", "runtime": "Java 17+", "hardware": "RAM 4G+", @@ -1181,7 +1115,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "Minecraft 1.17.1 with Fabric Loader", - "title": "Fabric 1.17.1 (Supports Mods)", + "title": "[FabricMC] Minecraft 1.17.1", "category": "mc-fabric", "runtime": "Java 16+", "hardware": "RAM 4G+", @@ -1203,7 +1137,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "Minecraft 1.16.5 with Fabric Loader", - "title": "Fabric 1.16.5 (Supports Mods)", + "title": "[FabricMC] Minecraft 1.16.5", "category": "mc-fabric", "runtime": "Java 8+", "hardware": "RAM 4G+", @@ -1225,7 +1159,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "[Vanilla] Minecraft 1.21.8", - "title": "Minecraft 1.21.8", + "title": "[Vanilla] Minecraft 1.21.8", "category": "mc-vanilla", "runtime": "Java 21+", "hardware": "RAM 2G+", @@ -1247,7 +1181,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "[Vanilla] Minecraft 1.21.6", - "title": "Minecraft 1.21.6", + "title": "[Vanilla] Minecraft 1.21.6", "category": "mc-vanilla", "runtime": "Java 21+", "hardware": "RAM 2G+", @@ -1269,7 +1203,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "[Vanilla] Minecraft 1.21.5", - "title": "Minecraft 1.21.5", + "title": "[Vanilla] Minecraft 1.21.5", "category": "mc-vanilla", "runtime": "Java 21+", "hardware": "RAM 2G+", @@ -1291,7 +1225,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "[Vanilla] Minecraft 1.21.4", - "title": "Minecraft 1.21.4", + "title": "[Vanilla] Minecraft 1.21.4", "category": "mc-vanilla", "runtime": "Java 21+", "hardware": "RAM 2G+", @@ -1313,7 +1247,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "[Vanilla] Minecraft 1.21.1", - "title": "Minecraft 1.21.1", + "title": "[Vanilla] Minecraft 1.21.1", "category": "mc-vanilla", "runtime": "Java 21+", "hardware": "RAM 2G+", @@ -1335,7 +1269,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "[Vanilla] Minecraft 1.20.6", - "title": "Minecraft 1.20.6", + "title": "[Vanilla] Minecraft 1.20.6", "category": "mc-vanilla", "runtime": "Java 21+", "hardware": "RAM 2G+", @@ -1357,7 +1291,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "[Vanilla] Minecraft 1.20.4", - "title": "Minecraft 1.20.4", + "title": "[Vanilla] Minecraft 1.20.4", "category": "mc-vanilla", "runtime": "Java 21+", "hardware": "RAM 2G+", @@ -1379,7 +1313,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "[Vanilla] Minecraft 1.20.1", - "title": "Minecraft 1.20.1", + "title": "[Vanilla] Minecraft 1.20.1", "category": "mc-vanilla", "runtime": "Java 17+", "hardware": "RAM 2G+", @@ -1401,7 +1335,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "[Vanilla] Minecraft 1.19.4", - "title": "Minecraft 1.19.4", + "title": "[Vanilla] Minecraft 1.19.4", "category": "mc-vanilla", "runtime": "Java 17+", "hardware": "RAM 2G+", @@ -1423,7 +1357,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "[Vanilla] Minecraft 1.18.2", - "title": "Minecraft 1.18.2", + "title": "[Vanilla] Minecraft 1.18.2", "category": "mc-vanilla", "runtime": "Java 17+", "hardware": "RAM 2G+", @@ -1445,7 +1379,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "[Vanilla] Minecraft 1.17.1", - "title": "Minecraft 1.17.1", + "title": "[Vanilla] Minecraft 1.17.1", "category": "mc-vanilla", "runtime": "Java 16+", "hardware": "RAM 2G+", @@ -1467,7 +1401,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "[Vanilla] Minecraft 1.16.5", - "title": "Minecraft 1.16.5", + "title": "[Vanilla] Minecraft 1.16.5", "category": "mc-vanilla", "runtime": "Java 8+", "hardware": "RAM 2G+", @@ -1489,7 +1423,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "[Vanilla] Minecraft 1.12.2", - "title": "Minecraft 1.12.2", + "title": "[Vanilla] Minecraft 1.12.2", "category": "mc-vanilla", "runtime": "Java 8+", "hardware": "RAM 2G+", @@ -1511,7 +1445,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "[Vanilla] Minecraft 1.8.9", - "title": "Minecraft 1.8.9", + "title": "[Vanilla] Minecraft 1.8.9", "category": "mc-vanilla", "runtime": "Java 7+", "hardware": "RAM 2G+", @@ -1533,7 +1467,7 @@ "language": "zh_cn", "gameType": "Minecraft", "description": "[Paper] Minecraft 1.21.1 快速开服", - "title": "Minecraft 1.20.1", + "title": "[PaperMC] Minecraft 1.20.1", "category": "mc-paper", "runtime": "Java 17+", "hardware": "RAM 4G+", @@ -1555,7 +1489,7 @@ "language": "zh_cn", "gameType": "Minecraft", "description": "[Paper] 中小型互通服推荐,1.20.4 版本,快速开服,包含ESS、锁箱子、操作回滚、领地商店等基础插件。", - "title": "Minecraft 1.20.4 (低配机器推荐)", + "title": "[PaperPC] Minecraft 1.20.4 (低配机器推荐)", "category": "mc-paper", "runtime": "Java 21+", "hardware": "RAM 6G+", @@ -1577,7 +1511,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "[Paper] Minecraft 1.21.8 Paper", - "title": "Minecraft 1.21.8", + "title": "[PaperMC] Minecraft 1.21.8", "category": "mc-paper", "runtime": "Java 21+", "hardware": "RAM 4G+", @@ -1599,7 +1533,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "[Paper] Minecraft 1.21.6 Paper", - "title": "Minecraft 1.21.6", + "title": "[PaperMC] Minecraft 1.21.6", "category": "mc-paper", "runtime": "Java 21+", "hardware": "RAM 4G+", @@ -1621,7 +1555,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "[Paper] Minecraft 1.21.4 Paper", - "title": "Minecraft 1.21.4", + "title": "[PaperMC] Minecraft 1.21.4", "category": "mc-paper", "runtime": "Java 21+", "hardware": "RAM 4G+", @@ -1643,7 +1577,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "[Paper] Minecraft 1.21.3 Paper", - "title": "Minecraft 1.21.3", + "title": "[PaperMC] Minecraft 1.21.3", "category": "mc-paper", "runtime": "Java 21+", "hardware": "RAM 4G+", @@ -1665,7 +1599,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "[Paper] Minecraft 1.21.1 Paper", - "title": "Minecraft 1.21.1", + "title": "[PaperMC] Minecraft 1.21.1", "category": "mc-paper", "runtime": "Java 21+", "hardware": "RAM 4G+", @@ -1687,7 +1621,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "[Paper] Minecraft 1.20.6 Paper", - "title": "Minecraft 1.20.6", + "title": "[PaperMC] Minecraft 1.20.6", "category": "mc-paper", "runtime": "Java 21+", "hardware": "RAM 4G+", @@ -1709,7 +1643,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "[Paper] Minecraft 1.20.4 Paper", - "title": "Minecraft 1.20.4", + "title": "[PaperMC] Minecraft 1.20.4", "category": "mc-paper", "runtime": "Java 21+", "hardware": "RAM 4G+", @@ -1731,7 +1665,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "[Paper] Minecraft 1.20.2 Paper", - "title": "Minecraft 1.20.2", + "title": "[PaperMC] Minecraft 1.20.2", "category": "mc-paper", "runtime": "Java 17+", "hardware": "RAM 4G+", @@ -1753,7 +1687,7 @@ "language": "en_us", "gameType": "Minecraft", "description": "[Paper] Minecraft 1.20.1 Paper", - "title": "Minecraft 1.20.1", + "title": "[PaperMC] Minecraft 1.20.1", "category": "mc-paper", "runtime": "Java 17+", "hardware": "RAM 4G+", @@ -1775,7 +1709,7 @@ "language": "zh_cn", "gameType": "Minecraft", "description": "注意:默认的启动命令是 \"sh ./run.sh\",如果需要在 Windows 上运行,请在安装后将命令修改为 \"start.bat\"", - "title": "Forge 1.20.1 Java 版 (支持模组)", + "title": "[Forge] Minecraft 1.20.1 Java 版 (支持模组)", "category": "mc-forge", "runtime": "Java 17+", "hardware": "RAM 8G+", @@ -1797,7 +1731,7 @@ "language": "zh_cn", "gameType": "Minecraft", "description": "注意:默认的启动命令是 \"sh ./run.sh\",如果需要在 Windows 上运行,请在安装后将命令修改为 \"start.bat\"", - "title": "Forge 1.20.6 Java 版 (支持模组)", + "title": "[Forge] Minecraft 1.20.6 Java 版 (支持模组)", "category": "mc-forge", "runtime": "Java 21+", "hardware": "RAM 8G+", @@ -1819,7 +1753,7 @@ "language": "zh_cn", "gameType": "Minecraft", "description": "注意:默认的启动命令是 \"sh ./run.sh\",如果需要在 Windows 上运行,请在安装后将命令修改为 \"start.bat\"", - "title": "Forge 1.19.2 Java 版 (支持模组)", + "title": "[Forge] Minecraft 1.19.2 Java 版 (支持模组)", "category": "mc-forge", "runtime": "Java 17+", "hardware": "RAM 8G+", From 51e624465c5facf300e180b51f8434b9030246af Mon Sep 17 00:00:00 2001 From: yumao233 Date: Mon, 29 Sep 2025 16:01:10 +0800 Subject: [PATCH 271/338] fix: memory --- market.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/market.json b/market.json index f91b492..4c507a0 100644 --- a/market.json +++ b/market.json @@ -87,7 +87,6 @@ "containerName": "terraria-server", "ports": ["{mcsm_port1}:7777/tcp"], "extraVolumes": [], - "memory": 4096, "networkMode": "bridge", "cpuUsage": 100, "workingDir": "/root/.local/share/Terraria/Worlds", @@ -458,7 +457,6 @@ } }, - { "platform": "ALL", "language": "en_us", From ef9fdaf860a7162b2e0e1d610ee77c95690f8ea8 Mon Sep 17 00:00:00 2001 From: yumao233 Date: Sun, 5 Oct 2025 12:14:32 +0800 Subject: [PATCH 272/338] fix: syntax error: unexpected end of file --- setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index 704e332..82ef7b3 100644 --- a/setup.sh +++ b/setup.sh @@ -1303,4 +1303,4 @@ main() { safe_run install_mcsm "Failed to install MCSManager" } -main "$@" \ No newline at end of file +main "$@" From 21f04dcd90383c1e3e9349b679bc16a6c1df934a Mon Sep 17 00:00:00 2001 From: yumao233 Date: Sun, 5 Oct 2025 12:18:19 +0800 Subject: [PATCH 273/338] fix: syntax error: unexpected end of file --- setup.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup.sh b/setup.sh index 82ef7b3..6c62918 100644 --- a/setup.sh +++ b/setup.sh @@ -1303,4 +1303,6 @@ main() { safe_run install_mcsm "Failed to install MCSManager" } + main "$@" +# End of file From 10d420af2092a9aa96e0847255844ea20bc527ba Mon Sep 17 00:00:00 2001 From: yumao233 Date: Sun, 5 Oct 2025 12:24:31 +0800 Subject: [PATCH 274/338] fix: by ai --- setup.sh | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/setup.sh b/setup.sh index 6c62918..4d0e09d 100644 --- a/setup.sh +++ b/setup.sh @@ -432,14 +432,6 @@ check_supported_os() { return 0 } -Install_Node() { - if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then - echo_green "Node.js version is up-to-date, skipping installation." - return - fi - - echo_cyan "[+] Install Node.JS environment..." - # Print with specified color and style, fallback to RESET if not supported. # Supported colors*: black|red|green|yellow|blue|magenta|cyan|white # Supported styles*: bold|underline|italic|clear_line|strikethrough @@ -506,7 +498,7 @@ cprint() { # Permission check before proceed with installation permission_barrier() { if [[ "$web_installed" == false && "$daemon_installed" == false ]]; then - cprint cyan "No components currently installed — skipping permission check." + cprint cyan "No components currently installed - skipping permission check." return 0 fi @@ -829,7 +821,7 @@ download_mcsm() { # Prepare user if needed prepare_user() { if [[ "$install_user" == "root" ]]; then - cprint cyan "install_user is 'root' — skipping user creation." + cprint cyan "install_user is 'root' - skipping user creation." return 0 fi @@ -847,7 +839,7 @@ prepare_user() { # Docker integration if command -v docker &>/dev/null; then - cprint cyan "Docker is installed — checking group assignment..." + cprint cyan "Docker is installed - checking group assignment..." if getent group docker &>/dev/null; then if id -nG "$install_user" | grep -qw docker; then @@ -864,7 +856,7 @@ prepare_user() { cprint red "Docker installed but 'docker' group not found. Skipping group assignment." fi else - cprint yellow "Docker not installed — skipping Docker group configuration." + cprint yellow "Docker not installed - skipping Docker group configuration." fi return 0 @@ -891,7 +883,7 @@ mcsm_install_prepare() { [[ "${install_dir}" != */ ]] && install_dir="${install_dir}/" if [[ "$web_installed" == false && "$daemon_installed" == false ]]; then - cprint cyan "No existing components detected — skipping data backup/cleanup." + cprint cyan "No existing components detected - skipping data backup/cleanup." return 0 fi @@ -923,7 +915,7 @@ mcsm_install_prepare() { } cprint green "Moved $data_dir → $backup_path" else - cprint yellow "No data directory found for $component — skipping backup." + cprint yellow "No data directory found for $component - skipping backup." fi cprint cyan "Removing old component directory: $component_path" @@ -957,7 +949,7 @@ install_component() { if [[ -e "$target_path" ]]; then cprint red bold "Target path already exists: $target_path" - cprint red " This should not happen — possible permission error or unclean install." + cprint red " This should not happen - possible permission error or unclean install." cleanup_install_tmp exit 1 fi @@ -985,7 +977,7 @@ install_component() { cprint green "Data directory restored: $target_data_path" else - cprint yellow "No backed-up data directory found for $component — fresh install assumed." + cprint yellow "No backed-up data directory found for $component - fresh install assumed." fi # Step 3: Install NPM dependencies @@ -1296,7 +1288,7 @@ main() { safe_run install_node "Node.js installation failed" fi - safe_run permission_barrier "Permission validation failed — aborting install" + safe_run permission_barrier "Permission validation failed - aborting install" safe_run download_mcsm "Failed to acquire MCSManager source" safe_run mcsm_install_prepare "Error while preparing for installation" From 24ec93b544ff4de1100bea8a67ae9a3a4cdd6eb0 Mon Sep 17 00:00:00 2001 From: yumao233 Date: Sun, 5 Oct 2025 12:26:22 +0800 Subject: [PATCH 275/338] fix: merge err --- setup.sh | 113 +++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 98 insertions(+), 15 deletions(-) diff --git a/setup.sh b/setup.sh index 4d0e09d..f1264ab 100644 --- a/setup.sh +++ b/setup.sh @@ -23,10 +23,75 @@ download_fallback_url="https://github.com/MCSManager/MCSManager/releases/latest/ # Name of the release package to download/detect package_name="mcsmanager_linux_release.tar.gz" -if [ "$(id -u)" -ne 0 ]; then - echo "This script must be run as root. Please use \"sudo bash\" instead." - exit 1 -fi +# Node.js version to be installed +# Keep the leading "v" +node_version="v20.12.2" + +# Node download base URL - primary +node_download_url_base="https://nodejs.org/dist/" + +# Node download URL - fallback. +# This is the URL points directly to the file, not the base. This can also be a local absolute path. +# Only supports https:// or http:// for web locations. +node_download_fallback="" + +# Node.js installation path (defaults to the MCSManager installation path. Can be overridden with --node-install-dir) +node_install_dir="$install_dir" + +# Temp dir for file extraction +tmp_dir="/tmp" + +# --------------- Global Variables ---------------# +# DO NOT MODIFY # + + +# Component installation options. +# For fresh installs, both daemon and web components are installed by default. +# For updates, behavior depends on detected existing components. +# Can be overridden with --install daemon/web/all +install_daemon=true +install_web=true + +# Install MCSM as (default: root). +# To install as a general user (e.g., "mcsm"), use the --user option: --user mcsm +# To ensure compatibility, only user mcsm is supported. +install_user="root" +# Installed user, for permission check +web_installed=false +daemon_installed=false +web_installed_user="" +daemon_installed_user="" + +# Service file locations +# the final dir = systemd_file + {web/daemon} + ".service" +systemd_file="/etc/systemd/system/mcsm-" +# Optional: Override the default installation source file. +# If --install-source is specified, the installer will use the provided +# "mcsmanager_linux_release.tar.gz" file instead of downloading it. +# Only support local absolute path. +install_source_path="" + +# temp path for extracted file(s) +install_tmp_dir="/opt/mcsmanager/mcsm_abcd" + +# dir name for data dir backup +# e.g. /opt/mcsmanager/daemon/data -> /opt/mcsmanager/data_bak_data +# only valid for when during an update +backup_prefix="data_bak_" + +# System architecture (detected automatically) +arch="" +version="" +distro="" + +# Supported OS versions (map-style structure) +# Format: supported_os["distro_name"]="version1 version2 version3 ..." +declare -A supported_os +supported_os["Ubuntu"]="18 20 22 24" +supported_os["Debian"]="10 11 12 13" +supported_os["CentOS"]="7 8 8-stream 9-stream 10-stream" +supported_os["RHEL"]="7 8 9 10" +supported_os["Arch"]="rolling" # Required system commands for installation # These will be checked before logic process @@ -432,6 +497,26 @@ check_supported_os() { return 0 } +# Check if all required commands are available +check_required_commands() { + local missing=0 + + for cmd in "${required_commands[@]}"; do + if ! command -v "$cmd" >/dev/null 2>&1; then + echo "Error: Required command '$cmd' is not available in PATH." + missing=1 + fi + done + + if [ "$missing" -ne 0 ]; then + echo "One or more required commands are missing. Please install them and try again." + return 1 + fi + + cprint green "All required commands are available." + return 0 +} + # Print with specified color and style, fallback to RESET if not supported. # Supported colors*: black|red|green|yellow|blue|magenta|cyan|white # Supported styles*: bold|underline|italic|clear_line|strikethrough @@ -498,7 +583,7 @@ cprint() { # Permission check before proceed with installation permission_barrier() { if [[ "$web_installed" == false && "$daemon_installed" == false ]]; then - cprint cyan "No components currently installed - skipping permission check." + cprint cyan "No components currently installed — skipping permission check." return 0 fi @@ -821,7 +906,7 @@ download_mcsm() { # Prepare user if needed prepare_user() { if [[ "$install_user" == "root" ]]; then - cprint cyan "install_user is 'root' - skipping user creation." + cprint cyan "install_user is 'root' — skipping user creation." return 0 fi @@ -839,7 +924,7 @@ prepare_user() { # Docker integration if command -v docker &>/dev/null; then - cprint cyan "Docker is installed - checking group assignment..." + cprint cyan "Docker is installed — checking group assignment..." if getent group docker &>/dev/null; then if id -nG "$install_user" | grep -qw docker; then @@ -856,7 +941,7 @@ prepare_user() { cprint red "Docker installed but 'docker' group not found. Skipping group assignment." fi else - cprint yellow "Docker not installed - skipping Docker group configuration." + cprint yellow "Docker not installed — skipping Docker group configuration." fi return 0 @@ -883,7 +968,7 @@ mcsm_install_prepare() { [[ "${install_dir}" != */ ]] && install_dir="${install_dir}/" if [[ "$web_installed" == false && "$daemon_installed" == false ]]; then - cprint cyan "No existing components detected - skipping data backup/cleanup." + cprint cyan "No existing components detected — skipping data backup/cleanup." return 0 fi @@ -915,7 +1000,7 @@ mcsm_install_prepare() { } cprint green "Moved $data_dir → $backup_path" else - cprint yellow "No data directory found for $component - skipping backup." + cprint yellow "No data directory found for $component — skipping backup." fi cprint cyan "Removing old component directory: $component_path" @@ -949,7 +1034,7 @@ install_component() { if [[ -e "$target_path" ]]; then cprint red bold "Target path already exists: $target_path" - cprint red " This should not happen - possible permission error or unclean install." + cprint red " This should not happen — possible permission error or unclean install." cleanup_install_tmp exit 1 fi @@ -977,7 +1062,7 @@ install_component() { cprint green "Data directory restored: $target_data_path" else - cprint yellow "No backed-up data directory found for $component - fresh install assumed." + cprint yellow "No backed-up data directory found for $component — fresh install assumed." fi # Step 3: Install NPM dependencies @@ -1288,13 +1373,11 @@ main() { safe_run install_node "Node.js installation failed" fi - safe_run permission_barrier "Permission validation failed - aborting install" + safe_run permission_barrier "Permission validation failed — aborting install" safe_run download_mcsm "Failed to acquire MCSManager source" safe_run mcsm_install_prepare "Error while preparing for installation" safe_run install_mcsm "Failed to install MCSManager" } - main "$@" -# End of file From 12cb0e39daf2c7e3655dd0b6a735106ea69cc4b1 Mon Sep 17 00:00:00 2001 From: yumao233 Date: Sun, 5 Oct 2025 12:34:41 +0800 Subject: [PATCH 276/338] fix: rollback --- setup.sh | 1521 +++++++---------------------------------------------- setup2.sh | 1383 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 1576 insertions(+), 1328 deletions(-) create mode 100644 setup2.sh diff --git a/setup.sh b/setup.sh index f1264ab..959b3b4 100644 --- a/setup.sh +++ b/setup.sh @@ -1,1383 +1,248 @@ #!/bin/bash -# Official MCSManager installation script. -# This script installs or updates the MCSManager Web and/or Daemon to the latest version. -# ------------------------------------------------------------------------------ -# Supported Linux distributions: -# This script supports the following mainstream Linux distributions: -# - Ubuntu: 18.04, 20.04, 22.04, 24.04 -# - Debian: 10, 11, 12, 13 -# - CentOS: 7, 8 Stream, 9 Stream, 10 Stream -# - RHEL: 7, 8, 9, 10 -# - Arch Linux: Support planned (TBD) -# ------------------------------------------------------------------------------ +# Official installation script. -# Target installation directory (can be overridden with --install-dir) -install_dir="/opt/mcsmanager" - -# Primary download URL bas. Full package URL = download_base_url + package_name -download_base_url="https://github.com/MCSManager/MCSManager/releases/latest/download/" - -# Fallback download URL (can also be a local directory or mirror) -download_fallback_url="https://github.com/MCSManager/MCSManager/releases/latest/download/" - -# Name of the release package to download/detect +mcsmanager_install_path="/opt/mcsmanager" +mcsmanager_download_addr="https://github.com/MCSManager/MCSManager/releases/latest/download/mcsmanager_linux_release.tar.gz" package_name="mcsmanager_linux_release.tar.gz" +node="v20.12.2" +arch=$(uname -m) -# Node.js version to be installed -# Keep the leading "v" -node_version="v20.12.2" - -# Node download base URL - primary -node_download_url_base="https://nodejs.org/dist/" - -# Node download URL - fallback. -# This is the URL points directly to the file, not the base. This can also be a local absolute path. -# Only supports https:// or http:// for web locations. -node_download_fallback="" - -# Node.js installation path (defaults to the MCSManager installation path. Can be overridden with --node-install-dir) -node_install_dir="$install_dir" - -# Temp dir for file extraction -tmp_dir="/tmp" - -# --------------- Global Variables ---------------# -# DO NOT MODIFY # - - -# Component installation options. -# For fresh installs, both daemon and web components are installed by default. -# For updates, behavior depends on detected existing components. -# Can be overridden with --install daemon/web/all -install_daemon=true -install_web=true - -# Install MCSM as (default: root). -# To install as a general user (e.g., "mcsm"), use the --user option: --user mcsm -# To ensure compatibility, only user mcsm is supported. -install_user="root" -# Installed user, for permission check -web_installed=false -daemon_installed=false -web_installed_user="" -daemon_installed_user="" - -# Service file locations -# the final dir = systemd_file + {web/daemon} + ".service" -systemd_file="/etc/systemd/system/mcsm-" -# Optional: Override the default installation source file. -# If --install-source is specified, the installer will use the provided -# "mcsmanager_linux_release.tar.gz" file instead of downloading it. -# Only support local absolute path. -install_source_path="" - -# temp path for extracted file(s) -install_tmp_dir="/opt/mcsmanager/mcsm_abcd" - -# dir name for data dir backup -# e.g. /opt/mcsmanager/daemon/data -> /opt/mcsmanager/data_bak_data -# only valid for when during an update -backup_prefix="data_bak_" - -# System architecture (detected automatically) -arch="" -version="" -distro="" - -# Supported OS versions (map-style structure) -# Format: supported_os["distro_name"]="version1 version2 version3 ..." -declare -A supported_os -supported_os["Ubuntu"]="18 20 22 24" -supported_os["Debian"]="10 11 12 13" -supported_os["CentOS"]="7 8 8-stream 9-stream 10-stream" -supported_os["RHEL"]="7 8 9 10" -supported_os["Arch"]="rolling" +if [ "$(id -u)" -ne 0 ]; then + echo "This script must be run as root. Please use \"sudo bash\" instead." + exit 1 +fi -# Required system commands for installation -# These will be checked before logic process -required_commands=( - chmod - chown - wget - tar - stat - useradd - usermod - date -) +printf "\033c" -# Node.js related sections -# Enable strict version checking (exact match) -# enabled -> strict requriement for defined node version -# false -> newer version allowed -# Older version is NEVER allowed -strict_node_version_check=false - -# Will be set based on actual node status -install_node=true -# Remove leading "v" from defined version -required_node_ver="${node_version#v}" - -# Holds absolute path for node & npm -node_bin_path="" -npm_bin_path="" -# Hold Node.js arch name, e.g. x86_64 -> x64 -node_arch="" -# Hold Node.js intallation path, e.g. ${node_install_dir}/node-${node_version}-linux-${arch} -node_path="" - -# For installation result -daemon_key="" -daemon_port="" -web_port="" -daemon_key_config_subpath="data/Config/global.json" -web_port_config_subpath="data/SystemConfig/config.json" - -# Terminal color & style related -# Default to false, auto check later -SUPPORTS_COLOR=false -SUPPORTS_STYLE=false -# Declare ANSI reset -RESET="\033[0m" - -# Foreground colors -declare -A FG_COLORS=( - [black]="\033[0;30m" - [red]="\033[0;31m" - [green]="\033[0;32m" - [yellow]="\033[0;33m" - [blue]="\033[0;34m" - [magenta]="\033[0;35m" - [cyan]="\033[0;36m" - [white]="\033[0;37m" -) - -# Font styles -declare -A STYLES=( - [bold]="\033[1m" - [underline]="\033[4m" - [italic]="\033[3m" # Often ignored - [clear_line]="\r\033[2K" - [strikethrough]="\033[9m" -) - - -### Helper Functions -# Execution wrapper, avoid unexpected crashes. -safe_run() { - local func="$1" - local err_msg="$2" - shift 2 - - if ! "$func" "$@"; then - echo "Error: $err_msg" - exit 1 - fi +echo_cyan() { + printf '\033[1;36m%b\033[0m\n' "$@" } - -# Function to ensure the script is run as root -check_root() { - # Using Bash's built-in EUID variable - if [ -n "$EUID" ]; then - if [ "$EUID" -ne 0 ]; then - cprint red "Error: This script must be run as root. Please use sudo or switch to the root user." - exit 1 - fi - else - # Fallback to using id -u if EUID is unavailable (e.g., non-Bash shell or misconfigured environment) - if [ "$(id -u)" -ne 0 ]; then - cprint red "Error: This script must be run as root. Please use sudo or switch to the root user." - exit 1 - fi - fi +echo_red() { + printf '\033[1;31m%b\033[0m\n' "$@" } - -# Function to check whether current terminal support color & style -detect_terminal_capabilities() { - SUPPORTS_COLOR=false - SUPPORTS_STYLE=false - - if [ -t 1 ] && command -v tput >/dev/null 2>&1; then - if [ "$(tput colors)" -ge 8 ]; then - SUPPORTS_COLOR=true - fi - if tput bold >/dev/null 2>&1 && tput smul >/dev/null 2>&1; then - SUPPORTS_STYLE=true - fi - fi - - if [ "$SUPPORTS_COLOR" = true ]; then - cprint green "[OK] Terminal supports colored output." - else - cprint yellow "Note: Terminal does not support colored output. Continuing without formatting." - fi - - if [ "$SUPPORTS_STYLE" = true ]; then - cprint green "[OK] Terminal supports bold and underline formatting." - else - cprint yellow "Note: Terminal does not support advanced text styles." - fi +echo_green() { + printf '\033[1;32m%b\033[0m\n' "$@" } - -# Check whether daemon or web is installed -is_component_installed() { - local component_name="$1" - local component_path="${install_dir}/${component_name}" - - if [[ -d "$component_path" ]]; then - cprint green "Component '$component_name' is already installed at $component_path" - - # Set corresponding global variable - if [[ "$component_name" == "daemon" ]]; then - daemon_installed=true - elif [[ "$component_name" == "web" ]]; then - web_installed=true - fi - - return 0 - else - cprint yellow "Component '$component_name' is not installed" - - # Set corresponding global variable - if [[ "$component_name" == "daemon" ]]; then - daemon_installed=false - elif [[ "$component_name" == "web" ]]; then - web_installed=false - fi - - return 1 - fi +echo_cyan_n() { + printf '\033[1;36m%b\033[0m' "$@" } - -check_component_permission() { - local component="$1" - local service_file="${systemd_file}${component}.service" - - if [[ ! -f "$service_file" ]]; then - cprint yellow "Service file not found: $service_file" - return 0 # nothing changed - fi - - # Extract the User= line if it exists - local user_line - user_line=$(grep -E '^User=' "$service_file" 2>/dev/null | head -1) - - local user - if [[ -z "$user_line" ]]; then - user="root" # default if no User= is defined - else - user="${user_line#User=}" - fi - - # Validate user - if [[ "$user" != "root" && "$user" != "mcsm" ]]; then - cprint red bold "Unsupported user '$user' in $service_file. Expected 'root' or 'mcsm'." - exit 1 - fi - - # Assign to appropriate global - if [[ "$component" == "web" ]]; then - web_installed_user="$user" - elif [[ "$component" == "daemon" ]]; then - daemon_installed_user="$user" - fi - - cprint cyan "Detected $component installed as user: $user" - return 0 +echo_yellow() { + printf '\033[1;33m%b\033[0m\n' "$@" } +# script info +echo_cyan "+---------------------------------------------------------------------- +| MCSManager Installer ++---------------------------------------------------------------------- +" - -parse_args() { - local explicit_install_flag=false - - while [[ $# -gt 0 ]]; do - case "$1" in - --install-dir) - if [[ -n "$2" ]]; then - install_dir="$2" - shift 2 - else - echo "Error: --install-dir requires a path argument." - exit 1 - fi - ;; - --node-install-dir) - if [[ -n "$2" ]]; then - node_install_dir="$2" - shift 2 - else - echo "Error: --node-install-dir requires a path argument." - exit 1 - fi - ;; - --install) - explicit_install_flag=true - if [[ -n "$2" && "$2" != --* ]]; then - case "$2" in - daemon) - install_daemon=true - is_component_installed "daemon" - install_web=false - check_component_permission "daemon" - ;; - web) - install_daemon=false - is_component_installed "web" - install_web=true - check_component_permission "web" - ;; - all) - install_daemon=true - install_web=true - is_component_installed "daemon" - is_component_installed "web" - check_component_permission "daemon" - check_component_permission "web" - ;; - *) - echo "Error: Invalid value for --install. Expected 'daemon', 'web', or 'all'." - echo "Usage: --install daemon|web|all" - exit 1 - ;; - esac - shift 2 - else - echo "Error: --install flag provided but no value. Please specify: daemon, web, or all." - echo "Usage: --install daemon|web|all" - exit 1 - fi - ;; - --user) - if [[ -n "$2" ]]; then - case "$2" in - root) - install_user="root" - ;; - mcsm) - install_user="mcsm" - ;; - *) - echo "Error: Invalid user '$2'. Only 'root' and 'mcsm' are supported." - echo "Usage: --user root|mcsm" - exit 1 - ;; - esac - shift 2 - else - echo "Error: --user requires a value (root or mcsm)." - exit 1 - fi - ;; - --install-source) - if [[ -n "$2" ]]; then - install_source_path="$2" - shift 2 - else - echo "Error: --install-source requires a file path." - exit 1 - fi - ;; - *) - echo "Error: Unknown argument: $1" - exit 1 - ;; - esac - done - - # Auto-detect branch: only run if --install was not explicitly passed - if [[ "$explicit_install_flag" == false ]]; then - daemon_installed=false - web_installed=false - - if is_component_installed "daemon"; then - daemon_installed=true - check_component_permission "daemon" - fi - if is_component_installed "web"; then - web_installed=true - check_component_permission "web" - fi - - # When only one component installed, we wanted to process that one only. - if [[ "$daemon_installed" == true && "$web_installed" == false ]]; then - install_daemon=true - install_web=false - elif [[ "$daemon_installed" == false && "$web_installed" == true ]]; then - install_daemon=false - install_web=true - else - install_daemon=true - install_web=true - fi - fi +Red_Error() { + echo '=================================================' + printf '\033[1;31;40m%b\033[0m\n' "$@" + echo '=================================================' + exit 1 } - -# Get Distribution & Architecture Info -detect_os_info() { - distro="Unknown" - version="Unknown" - arch=$(uname -m) - - # Try primary source - if [ -f /etc/os-release ]; then - . /etc/os-release - distro_id="${ID,,}" - version_id="${VERSION_ID,,}" - - case "$distro_id" in - ubuntu) - distro="Ubuntu" - version="$version_id" - ;; - debian) - distro="Debian" - version="$version_id" - ;; - centos) - distro="CentOS" - version="$version_id" - ;; - rhel*) - distro="RHEL" - version="$version_id" - ;; - arch) - distro="Arch" - version="rolling" - ;; - *) - distro="${ID:-Unknown}" - version="$version_id" - ;; - esac - fi - - # Fallbacks for missing or invalid version - if [[ -z "$version" || "$version" == "unknown" || "$version" == "" ]]; then - if [ -f /etc/issue ]; then - version_guess=$(grep -oP '[0-9]+(\.[0-9]+)*' /etc/issue | head -1) - if [[ -n "$version_guess" ]]; then - version="$version_guess" - fi - fi - fi - - # Normalize version: keep only major version - version_full="$version" - if [[ "$version" =~ ^[0-9]+(\.[0-9]+)*$ ]]; then - version="${version%%.*}" - else - echo "Warning: Could not detect a clean numeric version. Defaulting to unknown." - version="unknown" +Install_Node() { + if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then + echo_green "Node.js version is up-to-date, skipping installation." + return fi - cprint cyan "Detected OS: $distro $version_full" - cprint cyan "Detected Architecture: $arch" -} - - -# Check if current OS is supported -check_supported_os() { - local supported_versions="${supported_os[$distro]}" + echo_cyan "[+] Install Node.JS environment..." - if [[ -z "$supported_versions" ]]; then - echo "Error: Distribution '$distro' is not supported by this installer." - return 1 - fi + rm -irf "$node_install_path" - if [[ "$supported_versions" != *"$version"* ]]; then - echo "Error: Version '$version' of '$distro' is not supported." - echo "Supported versions are: $supported_versions" - return 1 - fi + cd /opt || Red_Error "[x] Failed to enter /opt" - cprint green "OS compatibility check passed." - return 0 -} + rm -rf "node-$node-linux-$arch.tar.gz" -# Check if all required commands are available -check_required_commands() { - local missing=0 + wget "https://nodejs.org/dist/$node/node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to download node release" - for cmd in "${required_commands[@]}"; do - if ! command -v "$cmd" >/dev/null 2>&1; then - echo "Error: Required command '$cmd' is not available in PATH." - missing=1 - fi - done + tar -zxf "node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to untar node" - if [ "$missing" -ne 0 ]; then - echo "One or more required commands are missing. Please install them and try again." - return 1 - fi + rm -rf "node-$node-linux-$arch.tar.gz" - cprint green "All required commands are available." - return 0 -} - -# Print with specified color and style, fallback to RESET if not supported. -# Supported colors*: black|red|green|yellow|blue|magenta|cyan|white -# Supported styles*: bold|underline|italic|clear_line|strikethrough -# *Note: some style may not necessarily work on all terminals. -# Example usage: -# cprint green bold "Installation completed successfully." -# cprint red underline "Failed to detect required command: wget" -# cprint yellow "Warning: Disk space is low." -# cprint underline "Failed to detect required command: wget" -# cprint bold green underline"Installation completed successfully." - -cprint() { - local color="" - local text="" - local styles="" - local disable_prefix=false - local disable_newline=false - - while [[ $# -gt 1 ]]; do - case "$1" in - black|red|green|yellow|blue|magenta|cyan|white) - color="$1" - ;; - bold|underline|italic|clear_line|strikethrough) - styles+="${STYLES[$1]}" - ;; - noprefix) - disable_prefix=true - ;; - nonl) - disable_newline=true - ;; - esac - shift - done - - text="$1" - - local prefix_text="" - if [[ "$disable_prefix" != true ]]; then - local timestamp="[$(date +%H:%M:%S)]" - local label="[MCSM Installer]" - prefix_text="${FG_COLORS[white]}$timestamp $label${RESET} " - fi - - local prefix="" - if [[ -n "$color" && "$SUPPORTS_COLOR" = true ]]; then - prefix+="${FG_COLORS[$color]}" - fi - if [[ "$SUPPORTS_STYLE" = true || "$styles" == *"${STYLES[clear_line]}"* ]]; then - prefix="$styles$prefix" - fi - - if [[ "$disable_newline" == true ]]; then - printf "%b%b%s%b" "$prefix_text" "$prefix" "$text" "$RESET" + if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then + echo_green "Success" else - printf "%b%b%s%b\n" "$prefix_text" "$prefix" "$text" "$RESET" - fi -} - - - - -# Permission check before proceed with installation -permission_barrier() { - if [[ "$web_installed" == false && "$daemon_installed" == false ]]; then - cprint cyan "No components currently installed — skipping permission check." - return 0 - fi - - for component in web daemon; do - local is_installed_var="${component}_installed" - local installed_user_var="${component}_installed_user" - - if [[ "${!is_installed_var}" == true ]]; then - local installed_user="${!installed_user_var}" - - # Step 0: Ensure installed user is detected - if [[ -z "$installed_user" ]]; then - cprint red bold "Detected that '$component' is installed but could not determine the user from its systemd service file." - cprint red "This may indicate a custom or unsupported service file setup." - cprint red "Refusing to proceed to avoid potential conflicts." - exit 1 - fi - - # Step 1: User match check - if [[ "$installed_user" != "$install_user" ]]; then - cprint red bold "Permission mismatch for '$component':" - cprint red "Installed as user: $installed_user" - cprint red "Current install target user: $install_user" - cprint red "Unable to proceed due to ownership conflict." - exit 1 - fi - fi - done - - # Step 2: Directory ownership check - local dir_owner - dir_owner=$(stat -c '%U' "$install_dir" 2>/dev/null) - - if [[ -z "$dir_owner" ]]; then - cprint red bold "Unable to determine owner of install_dir: $install_dir" - exit 1 + Red_Error "[x] Node installation failed!" fi - if [[ "$dir_owner" != "$install_user" ]]; then - cprint red bold "Install directory ownership mismatch:" - cprint red " Directory: $install_dir" - cprint red " Owned by: $dir_owner" - cprint red " Expected: $install_user" - exit 1 - fi + echo + echo_yellow "=============== Node.JS Version ===============" + echo_yellow " node: $("$node_install_path"/bin/node -v)" + echo_yellow " npm: v$(env "$node_install_path"/bin/node "$node_install_path"/bin/npm -v)" + echo_yellow "=============== Node.JS Version ===============" + echo - cprint green bold "Permissions and ownership validated. Proceeding." - return 0 + sleep 3 } +Install_MCSManager() { + echo_cyan "[+] Install MCSManager..." + # stop service + systemctl disable --now mcsm-{web,daemon} -# Map OS arch with actual Node.js Arch name -# This function should be placed after var arch has been assigned a valid value. -resolve_node_arch() { - case "$arch" in - x86_64) - node_arch="x64" - ;; - aarch64) - node_arch="arm64" - ;; - armv7l) - node_arch="armv7l" - ;; - *) - cprint red bold "Unsupported architecture for Node.js: $arch" - return 1 - ;; - esac + # delete service + rm -rf /etc/systemd/system/mcsm-{daemon,web}.service + systemctl daemon-reload - # Assign node_path based on resolved arch and current version/install dir - node_path="${node_install_dir}/node-${node_version}-linux-${node_arch}" + mkdir -p "${mcsmanager_install_path}" || Red_Error "[x] Failed to create ${mcsmanager_install_path}" - cprint cyan "Resolved Node.js architecture: $node_arch" - cprint cyan "Computed Node.js install path: $node_path" -} + # cd /opt/mcsmanager + cd "${mcsmanager_install_path}" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}" -# Check if Node.js at PATH is valid. -# This function check Node.js version + NPM (if Node.js valid) -verify_node_at_path() { - local node_path="$1" - # Assign value to vlobal variables when verifying - node_bin_path="$node_path/bin/node" - npm_bin_path="$node_path/bin/npm" + # download MCSManager release + wget "${mcsmanager_download_addr}" -O "${package_name}" || Red_Error "[x] Failed to download MCSManager" + tar -zxf ${package_name} -o || Red_Error "[x] Failed to untar ${package_name}" + rm -rf "${mcsmanager_install_path}/${package_name}" - # Node binary missing - if [ ! -x "$node_bin_path" ]; then - return 1 + # compatible with tar.gz packages of different formats + if [ -d "/opt/mcsmanager/mcsmanager" ]; then + cp -rf /opt/mcsmanager/mcsmanager/* /opt/mcsmanager/ + rm -rf /opt/mcsmanager/mcsmanager fi - local installed_ver - installed_ver="$("$node_bin_path" -v 2>/dev/null | sed 's/^v//')" + # echo "[→] cd daemon" + cd "${mcsmanager_install_path}/daemon" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/daemon" - # Node exists but version not returned - if [[ -z "$installed_ver" ]]; then - return 1 - fi + echo_cyan "[+] Install MCSManager-Daemon dependencies..." + env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${mcsmanager_install_path}/daemon" - # Version mismatch, even if newer - if [ "$strict_node_version_check" = true ]; then - if [[ "$installed_ver" != "$required_node_ver" ]]; then - return 3 - fi - else - # Version mismatch, too old. - local cmp - cmp=$(printf "%s\n%s\n" "$required_node_ver" "$installed_ver" | sort -V | head -1) - if [[ "$cmp" != "$required_node_ver" ]]; then - return 2 - fi - fi + # echo "[←] cd .." + cd "${mcsmanager_install_path}/web" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/web" - # node cmd valid, but npm is missing or broken. - if [ ! -x "$npm_bin_path" ] || ! "$npm_bin_path" --version >/dev/null 2>&1; then - return 4 - fi + echo_cyan "[+] Install MCSManager-Web dependencies..." + env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${mcsmanager_install_path}/web" - return 0 -} + echo + echo_yellow "=============== MCSManager ===============" + echo_green "Daemon: ${mcsmanager_install_path}/daemon" + echo_green "Web: ${mcsmanager_install_path}/web" + echo_yellow "=============== MCSManager ===============" + echo + echo_green "[+] MCSManager installation success!" -# Node.js pre-check. check if we need to install Node.js before installer run. -# Use postcheck_node_after_install() to check after install. -check_node_installed() { - verify_node_at_path "$node_path" - local result=$? + chmod -R 755 "$mcsmanager_install_path" - case $result in - 0) - cprint green bold "Node.js and npm found at $node_path (version $required_node_ver or compatible)" - install_node=false - ;; - 1) - cprint yellow bold "Node.js binary not found or unusable at $node_path" - install_node=true - ;; - 2) - cprint red bold "Node.js version at $node_path is too old. Required: >= $required_node_ver" - install_node=true - ;; - 3) - cprint red bold "Node.js version mismatch. Required: $required_node_ver, found something else." - install_node=true - ;; - 4) - cprint red bold "Node.js is present but npm is missing or broken." - install_node=true - ;; - *) - cprint red bold "Unexpected error in node verification." - install_node=true - ;; - esac + sleep 3 } -# Node.js post-check. check if Node.js is valid after install. -postcheck_node_after_install() { - verify_node_at_path "$node_path" - if [[ $? -ne 0 ]]; then - cprint red bold "Node.js installation failed or is invalid at $node_path" - return 1 - else - cprint green bold "Node.js is installed and functioning at $node_path" - return 0 - fi -} - -# Install Node.js and check -install_node() { - local archive_name="node-${node_version}-linux-${node_arch}.tar.xz" - local target_dir="${node_install_dir}/node-${node_version}-linux-${node_arch}" - local archive_path="${node_install_dir}/${archive_name}" - local download_url="${node_download_url_base}${node_version}/${archive_name}" - local fallback="$node_download_fallback" - - cprint cyan bold "Installing Node.js $node_version for arch: $node_arch" - - mkdir -p "$node_install_dir" || { - cprint red bold "Failed to create node install directory: $node_install_dir" - return 1 - } - - # Download - cprint cyan "Downloading Node.js from: $download_url" - if ! wget --progress=bar:force -O "$archive_path" "$download_url"; then - cprint yellow "Primary download failed. Attempting fallback..." - - if [[ -n "$fallback" ]]; then - if [[ "$fallback" =~ ^https?:// ]]; then - cprint cyan "Downloading from fallback URL: $fallback" - if ! wget --progress=bar:force -O "$archive_path" "$fallback"; then - cprint red bold "Fallback download failed from: $fallback" - return 1 - fi - elif [ -f "$fallback" ]; then - cprint cyan "Copying from local fallback: $fallback" - cp "$fallback" "$archive_path" || { - cprint red bold "Failed to copy fallback Node.js archive from $fallback" - return 1 - } - else - cprint red bold "Invalid fallback path: $fallback" - return 1 - fi - else - cprint red bold "No fallback source configured. Cannot proceed." - return 1 - fi - fi - - # Extract archive - cprint cyan "Extracting Node.js archive..." - if ! tar -xf "$archive_path" -C "$node_install_dir"; then - cprint red bold "Failed to extract Node.js archive." - return 1 - fi - - chmod -R a+rx "$target_dir" || { - cprint red bold "Failed to set execute permissions on Node.js files." - return 1 - } - - verify_node_at_path "$target_dir" - local result=$? - if [[ $result -ne 0 ]]; then - cprint red bold "Node.js installation failed verification." - return 1 - fi - - cprint cyan "Cleaning up archive..." - rm -f "$archive_path" +Create_Service() { + echo_cyan "[+] Create MCSManager service..." - cprint green bold "Node.js $node_version installed successfully at $target_dir" - # Save resolved binary paths to global variables - node_bin_path="${target_dir}/bin/node" - npm_bin_path="${target_dir}/bin/npm" - - cprint green "Node.js binary: $node_bin_path" - cprint green "npm binary: $npm_bin_path" - return 0 -} - -# Function to download MCSM package. fetch from primary URL first, then fallback URL. -# This function only put extracted file(s) into install_dir, it does not perform the actual update. -download_mcsm() { - local archive_name="$package_name" - local archive_path="${tmp_dir}/${archive_name}" - local primary_url="${download_base_url}${archive_name}" - local fallback="$download_fallback_url" - - cprint cyan bold "Downloading MCSManager package..." - - # Step 1: Try downloading from primary URL - if ! wget --progress=bar:force -O "$archive_path" "$primary_url"; then - cprint yellow "Primary download failed. Attempting fallback source..." - - if [[ -z "$fallback" ]]; then - cprint red bold "No fallback URL or path specified." - return 1 - fi - - if [[ "$fallback" =~ ^https?:// ]]; then - if ! wget --progress=bar:force -O "$archive_path" "$fallback"; then - cprint red bold "Fallback download failed from $fallback" - return 1 - fi - elif [[ -f "$fallback" ]]; then - cp "$fallback" "$archive_path" || { - cprint red bold "Failed to copy fallback archive from $fallback" - return 1 - } - else - cprint red bold "Fallback path is invalid: $fallback" - return 1 - fi - fi - - # Step 2: Generate extract directory - local suffix - suffix=$(tr -dc 'a-z0-9' /dev/null; then - cprint green "User '$install_user' already exists." - else - cprint cyan "Creating system user: $install_user (nologin, no password)..." - if ! useradd --system --home "$install_dir" --shell /usr/sbin/nologin "$install_user"; then - cprint red bold "Failed to create user: $install_user" - exit 1 - fi - cprint green "User '$install_user' created." - fi - - # Docker integration - if command -v docker &>/dev/null; then - cprint cyan "Docker is installed — checking group assignment..." - - if getent group docker &>/dev/null; then - if id -nG "$install_user" | grep -qw docker; then - cprint green "User '$install_user' is already in the 'docker' group." - else - cprint cyan "Adding user '$install_user' to 'docker' group..." - if usermod -aG docker "$install_user"; then - cprint green "Docker group access granted to '$install_user'." - else - cprint red "Failed to add '$install_user' to 'docker' group. Docker may not be usable by this user." - fi - fi - else - cprint red "Docker installed but 'docker' group not found. Skipping group assignment." - fi - else - cprint yellow "Docker not installed — skipping Docker group configuration." - fi - - return 0 -} - -# Prepare file & permissions before install. -mcsm_install_prepare() { - # Prepare the user first - prepare_user - - if [[ ! -d "$install_tmp_dir" ]]; then - cprint red bold "install_tmp_dir does not exist: $install_tmp_dir" - exit 1 - fi - - cprint cyan "Changing ownership of $install_tmp_dir to user '$install_user'..." - chown -R "$install_user":"$install_user" "$install_tmp_dir" || { - cprint red bold "Failed to change ownership of $install_tmp_dir" - cleanup_install_tmp - exit 1 - } - - # Normalize install_dir to ensure it ends with a slash - [[ "${install_dir}" != */ ]] && install_dir="${install_dir}/" - - if [[ "$web_installed" == false && "$daemon_installed" == false ]]; then - cprint cyan "No existing components detected — skipping data backup/cleanup." - return 0 - fi - - for component in web daemon; do - local is_installed_var="${component}_installed" - if [[ "${!is_installed_var}" == true ]]; then - local component_path="${install_dir}${component}" - local data_dir="${component_path}/data" - local backup_path="${install_dir}${backup_prefix}${component}" - - if [[ ! -d "$component_path" ]]; then - cprint yellow "Expected installed component directory not found: $component_path" - continue - fi - - if [[ -d "$data_dir" ]]; then - if [[ -e "$backup_path" ]]; then - cprint red bold "Backup destination already exists: $backup_path" - cprint red "Please resolve this conflict manually before continuing." - cleanup_install_tmp - exit 1 - fi - - cprint cyan "Backing up data directory for $component..." - mv "$data_dir" "$backup_path" || { - cprint red bold "Failed to move $data_dir to $backup_path" - cleanup_install_tmp - exit 1 - } - cprint green "Moved $data_dir → $backup_path" - else - cprint yellow "No data directory found for $component — skipping backup." - fi - - cprint cyan "Removing old component directory: $component_path" - rm -rf "$component_path" || { - cprint red bold "Failed to remove old component directory: $component_path" - cleanup_install_tmp - exit 1 - } - fi - done - - cprint green bold "Existing components prepared successfully." - return 0 -} - -# Install or update a component -install_component() { - local component="$1" - local target_path="${install_dir}${component}" - local backup_data_path="${install_dir}${backup_prefix}${component}" - local source_path="${install_tmp_dir}/mcsmanager/${component}" - - cprint cyan bold "Installing/Updating component: $component" - - # Step 1: Move new component to install_dir - if [[ ! -d "$source_path" ]]; then - cprint red bold "Source directory not found: $source_path" - cleanup_install_tmp - exit 1 - fi - - if [[ -e "$target_path" ]]; then - cprint red bold "Target path already exists: $target_path" - cprint red " This should not happen — possible permission error or unclean install." - cleanup_install_tmp - exit 1 - fi - - mv "$source_path" "$target_path" || { - cprint red bold "Failed to move $source_path → $target_path" - cleanup_install_tmp - exit 1 - } - - cprint green "Moved $component to $target_path" - - # Step 2: Restore backed-up data directory if present - if [[ -d "$backup_data_path" ]]; then - local target_data_path="${target_path}/data" - - cprint cyan "Restoring backed-up data directory for $component..." - - rm -rf "$target_data_path" # Ensure no conflict - mv "$backup_data_path" "$target_data_path" || { - cprint red bold "Failed to restore data directory to $target_data_path" - cleanup_install_tmp - exit 1 - } - - cprint green "Data directory restored: $target_data_path" - else - cprint yellow "No backed-up data directory found for $component — fresh install assumed." - fi - - # Step 3: Install NPM dependencies - if [[ ! -x "$npm_bin_path" ]]; then - cprint red bold "npm binary not found or not executable: $npm_bin_path" - cleanup_install_tmp - exit 1 - fi - - cprint cyan "Installing dependencies for $component using npm..." - pushd "$target_path" >/dev/null || { - cprint red bold "Failed to change directory to $target_path" - cleanup_install_tmp - exit 1 - } - - if ! "$npm_bin_path" install --no-audit --no-fund --loglevel=warn; then - cprint red bold "NPM dependency installation failed for $component" - popd >/dev/null - cleanup_install_tmp - exit 1 - fi - - popd >/dev/null - cprint green bold "Component '$component' installed/updated successfully." -} - -# Create systemd service for a given component. -# This will overwrite the existing service file. -create_systemd_service() { - local component="$1" - local service_path="${systemd_file}${component}.service" - local working_dir="${install_dir}${component}" - local exec="${node_bin_path} app.js" - - if [[ ! -d "$working_dir" ]]; then - cprint red bold "Component directory not found: $working_dir" - cleanup_install_tmp - return 1 - fi - - cprint cyan "Creating systemd service for '$component'..." - - cat > "$service_path" </dev/null | awk '{print $1}') - [[ -z "$ip_address" ]] && ip_address="YOUR-IP" - - # Daemon info - if [[ "$install_daemon" == true ]]; then - local daemon_address="ws://$ip_address:${daemon_port:-Failed to Retrieve from Config file}" - local daemon_key_display="${daemon_key:-Failed to Retrieve from Config file}" - - cprint yellow noprefix "Daemon Address:" - cprint white noprefix " $daemon_address" - cprint yellow noprefix "Daemon Key:" - cprint white noprefix " $daemon_key_display" - echo "" - fi +" >/etc/systemd/system/mcsm-daemon.service - # Web info - if [[ "$install_web" == true ]]; then - local web_address="http://$ip_address:${web_port:-Failed to Retrieve from Config file}" - cprint yellow noprefix "HTTP Web Interface:" - cprint white noprefix nonl " $web_address " - cprint yellow noprefix "(open in browser)" - echo "" - fi - - # Port guidance - cprint yellow noprefix "NOTE:" - cprint white noprefix " Make sure to expose the above ports through your firewall." - cprint white noprefix " If accessing from outside your network, you may need to configure port forwarding on your router." - echo "" - - # Service management help - cprint yellow noprefix "Service Management Commands:" - if [[ "$install_daemon" == true ]]; then - cprint white noprefix nonl " systemctl start " - cprint yellow noprefix "mcsm-daemon.service" - cprint white noprefix nonl " systemctl stop " - cprint yellow noprefix "mcsm-daemon.service" - cprint white noprefix nonl " systemctl restart " - cprint yellow noprefix "mcsm-daemon.service" - cprint white noprefix nonl " systemctl status " - cprint yellow noprefix "mcsm-daemon.service" - fi - if [[ "$install_web" == true ]]; then - cprint white noprefix nonl " systemctl start " - cprint yellow noprefix "mcsm-web.service" - cprint white noprefix nonl " systemctl stop " - cprint yellow noprefix "mcsm-web.service" - cprint white noprefix nonl " systemctl restart " - cprint yellow noprefix "mcsm-web.service" - cprint white noprefix nonl " systemctl status " - cprint yellow noprefix "mcsm-web.service" - fi - echo "" - - # Official doc - cprint yellow noprefix "Official Documentation:" - cprint white noprefix " https://docs.mcsmanager.com/" - echo "" + echo "[Unit] +Description=MCSManager-Web - # HTTPS support - cprint yellow noprefix "Need HTTPS?" - cprint white noprefix " To enable secure HTTPS access, configure a reverse proxy:" - cprint white noprefix " https://docs.mcsmanager.com/ops/proxy_https.html" - echo "" - - # Closing message - cprint green noprefix "Installation completed. Enjoy managing your servers with MCSManager!" - echo "" -} - -install_mcsm() { - local components=() - - if [[ "$install_web" == true ]]; then - install_component "web" - create_systemd_service "web" - components+=("web") - fi - - if [[ "$install_daemon" == true ]]; then - install_component "daemon" - create_systemd_service "daemon" - components+=("daemon") - fi - - # Reload systemd after any service file changes - if (( ${#components[@]} > 0 )); then - cprint cyan "Reloading systemd daemon..." - # systemctl daemon-reexec - systemctl daemon-reload - - for comp in "${components[@]}"; do - local svc="mcsm-${comp}.service" - - cprint cyan "Enabling service: $svc" - if systemctl enable "$svc" &>/dev/null; then - cprint green "Enabled service: $svc" - else - cprint red bold "Failed to enable service: $svc" - cleanup_install_tmp - exit 1 - fi - done - fi - - # Clean tmp dir - cleanup_install_tmp - # Extract installed component info - safe_run extract_component_info "Failed to extract runtime info from installed services" - safe_run print_install_result "Failed to print installation result" - -} +[Service] +WorkingDirectory=${mcsmanager_install_path}/web +ExecStart=${node_install_path}/bin/node app.js +ExecReload=/bin/kill -s QUIT \$MAINPID +ExecStop=/bin/kill -s QUIT \$MAINPID +Environment=\"PATH=${PATH}\" -main() { - trap 'echo "Unexpected error occurred."; exit 99' ERR - safe_run detect_terminal_capabilities "Failed to detect terminal capabilities" - safe_run check_root "Script must be run as root" - safe_run parse_args "Failed to parse arguments" "$@" - safe_run detect_os_info "Failed to detect OS" - safe_run check_supported_os "Unsupported OS or version" - # To be moved to a master pre check function. - safe_run resolve_node_arch "Failed to resolve Node.js architecture" - - safe_run check_required_commands "Missing required system commands" - - safe_run check_node_installed "Failed to detect Node.js or npm at expected path. Node.js will be installed." - if [ "$install_node" = true ]; then - safe_run install_node "Node.js installation failed" - fi - - safe_run permission_barrier "Permission validation failed — aborting install" - - safe_run download_mcsm "Failed to acquire MCSManager source" - safe_run mcsm_install_prepare "Error while preparing for installation" - - safe_run install_mcsm "Failed to install MCSManager" -} -main "$@" +[Install] +WantedBy=multi-user.target +" >/etc/systemd/system/mcsm-web.service + + systemctl daemon-reload + systemctl enable --now mcsm-{daemon,web}.service + echo_green "Registered!" + + sleep 2 + + printf "\n\n\n\n" + + echo_yellow "==================================================================" + echo_green "Installation is complete! Welcome to the MCSManager!!!" + echo_yellow " " + echo_cyan_n "HTTP Web Service: " + echo_yellow "http://:23333 (Browser)" + echo_cyan_n "Daemon Address: " + echo_yellow "ws://:24444 (Cluster)" + echo_red "You must expose ports " + echo_yellow "23333" + echo_red " and " + echo_yellow "24444" + echo_red " to use the service properly on the Internet." + echo_yellow " " + echo_cyan "Usage:" + echo_cyan "systemctl start mcsm-{daemon,web}.service" + echo_cyan "systemctl stop mcsm-{daemon,web}.service" + echo_cyan "systemctl restart mcsm-{daemon,web}.service" + echo_yellow " " + echo_green "Official Document: https://docs.mcsmanager.com/" + echo_yellow "==================================================================" +} + +# Environmental inspection +if [[ "$arch" == x86_64 ]]; then + arch=x64 + #echo "[-] x64 architecture detected" +elif [[ $arch == aarch64 ]]; then + arch=arm64 + #echo "[-] 64-bit ARM architecture detected" +elif [[ $arch == arm ]]; then + arch=armv7l + #echo "[-] 32-bit ARM architecture detected" +elif [[ $arch == ppc64le ]]; then + arch=ppc64le + #echo "[-] IBM POWER architecture detected" +elif [[ $arch == s390x ]]; then + arch=s390x + #echo "[-] IBM LinuxONE architecture detected" +else + Red_Error "[x] Sorry, this architecture is not supported yet!\n[x]Please try to install manually: https://github.com/MCSManager/MCSManager#linux" +fi + +# Define the variable Node installation directory +node_install_path="/opt/node-$node-linux-$arch" + +# Check network connection +echo_cyan "[-] Architecture: $arch" + +# Install related software +echo_cyan_n "[+] Installing dependent software (git, tar, wget)... " +if [[ -x "$(command -v yum)" ]]; then + yum install -y git tar wget +elif [[ -x "$(command -v apt-get)" ]]; then + apt-get install -y git tar wget +elif [[ -x "$(command -v pacman)" ]]; then + pacman -S --noconfirm --needed git tar wget +elif [[ -x "$(command -v zypper)" ]]; then + zypper --non-interactive install git tar wget +else + echo_red "[!] Cannot find your package manager! You may need to install git, tar and wget manually!" +fi + +# Determine whether the relevant software is installed successfully +if [[ -x "$(command -v git)" && -x "$(command -v tar)" && -x "$(command -v wget)" ]]; then + echo_green "Success" +else + Red_Error "[x] Failed to find git, tar and wget, please install them manually!" +fi + +# Install the Node environment +Install_Node + +# Install MCSManager +Install_MCSManager + +# Create MCSManager background service +Create_Service \ No newline at end of file diff --git a/setup2.sh b/setup2.sh new file mode 100644 index 0000000..f1264ab --- /dev/null +++ b/setup2.sh @@ -0,0 +1,1383 @@ +#!/bin/bash +# Official MCSManager installation script. +# This script installs or updates the MCSManager Web and/or Daemon to the latest version. +# ------------------------------------------------------------------------------ +# Supported Linux distributions: +# This script supports the following mainstream Linux distributions: +# - Ubuntu: 18.04, 20.04, 22.04, 24.04 +# - Debian: 10, 11, 12, 13 +# - CentOS: 7, 8 Stream, 9 Stream, 10 Stream +# - RHEL: 7, 8, 9, 10 +# - Arch Linux: Support planned (TBD) +# ------------------------------------------------------------------------------ + +# Target installation directory (can be overridden with --install-dir) +install_dir="/opt/mcsmanager" + +# Primary download URL bas. Full package URL = download_base_url + package_name +download_base_url="https://github.com/MCSManager/MCSManager/releases/latest/download/" + +# Fallback download URL (can also be a local directory or mirror) +download_fallback_url="https://github.com/MCSManager/MCSManager/releases/latest/download/" + +# Name of the release package to download/detect +package_name="mcsmanager_linux_release.tar.gz" + +# Node.js version to be installed +# Keep the leading "v" +node_version="v20.12.2" + +# Node download base URL - primary +node_download_url_base="https://nodejs.org/dist/" + +# Node download URL - fallback. +# This is the URL points directly to the file, not the base. This can also be a local absolute path. +# Only supports https:// or http:// for web locations. +node_download_fallback="" + +# Node.js installation path (defaults to the MCSManager installation path. Can be overridden with --node-install-dir) +node_install_dir="$install_dir" + +# Temp dir for file extraction +tmp_dir="/tmp" + +# --------------- Global Variables ---------------# +# DO NOT MODIFY # + + +# Component installation options. +# For fresh installs, both daemon and web components are installed by default. +# For updates, behavior depends on detected existing components. +# Can be overridden with --install daemon/web/all +install_daemon=true +install_web=true + +# Install MCSM as (default: root). +# To install as a general user (e.g., "mcsm"), use the --user option: --user mcsm +# To ensure compatibility, only user mcsm is supported. +install_user="root" +# Installed user, for permission check +web_installed=false +daemon_installed=false +web_installed_user="" +daemon_installed_user="" + +# Service file locations +# the final dir = systemd_file + {web/daemon} + ".service" +systemd_file="/etc/systemd/system/mcsm-" +# Optional: Override the default installation source file. +# If --install-source is specified, the installer will use the provided +# "mcsmanager_linux_release.tar.gz" file instead of downloading it. +# Only support local absolute path. +install_source_path="" + +# temp path for extracted file(s) +install_tmp_dir="/opt/mcsmanager/mcsm_abcd" + +# dir name for data dir backup +# e.g. /opt/mcsmanager/daemon/data -> /opt/mcsmanager/data_bak_data +# only valid for when during an update +backup_prefix="data_bak_" + +# System architecture (detected automatically) +arch="" +version="" +distro="" + +# Supported OS versions (map-style structure) +# Format: supported_os["distro_name"]="version1 version2 version3 ..." +declare -A supported_os +supported_os["Ubuntu"]="18 20 22 24" +supported_os["Debian"]="10 11 12 13" +supported_os["CentOS"]="7 8 8-stream 9-stream 10-stream" +supported_os["RHEL"]="7 8 9 10" +supported_os["Arch"]="rolling" + +# Required system commands for installation +# These will be checked before logic process +required_commands=( + chmod + chown + wget + tar + stat + useradd + usermod + date +) + +# Node.js related sections +# Enable strict version checking (exact match) +# enabled -> strict requriement for defined node version +# false -> newer version allowed +# Older version is NEVER allowed +strict_node_version_check=false + +# Will be set based on actual node status +install_node=true +# Remove leading "v" from defined version +required_node_ver="${node_version#v}" + +# Holds absolute path for node & npm +node_bin_path="" +npm_bin_path="" +# Hold Node.js arch name, e.g. x86_64 -> x64 +node_arch="" +# Hold Node.js intallation path, e.g. ${node_install_dir}/node-${node_version}-linux-${arch} +node_path="" + +# For installation result +daemon_key="" +daemon_port="" +web_port="" +daemon_key_config_subpath="data/Config/global.json" +web_port_config_subpath="data/SystemConfig/config.json" + +# Terminal color & style related +# Default to false, auto check later +SUPPORTS_COLOR=false +SUPPORTS_STYLE=false +# Declare ANSI reset +RESET="\033[0m" + +# Foreground colors +declare -A FG_COLORS=( + [black]="\033[0;30m" + [red]="\033[0;31m" + [green]="\033[0;32m" + [yellow]="\033[0;33m" + [blue]="\033[0;34m" + [magenta]="\033[0;35m" + [cyan]="\033[0;36m" + [white]="\033[0;37m" +) + +# Font styles +declare -A STYLES=( + [bold]="\033[1m" + [underline]="\033[4m" + [italic]="\033[3m" # Often ignored + [clear_line]="\r\033[2K" + [strikethrough]="\033[9m" +) + + +### Helper Functions +# Execution wrapper, avoid unexpected crashes. +safe_run() { + local func="$1" + local err_msg="$2" + shift 2 + + if ! "$func" "$@"; then + echo "Error: $err_msg" + exit 1 + fi +} + +# Function to ensure the script is run as root +check_root() { + # Using Bash's built-in EUID variable + if [ -n "$EUID" ]; then + if [ "$EUID" -ne 0 ]; then + cprint red "Error: This script must be run as root. Please use sudo or switch to the root user." + exit 1 + fi + else + # Fallback to using id -u if EUID is unavailable (e.g., non-Bash shell or misconfigured environment) + if [ "$(id -u)" -ne 0 ]; then + cprint red "Error: This script must be run as root. Please use sudo or switch to the root user." + exit 1 + fi + fi +} + +# Function to check whether current terminal support color & style +detect_terminal_capabilities() { + SUPPORTS_COLOR=false + SUPPORTS_STYLE=false + + if [ -t 1 ] && command -v tput >/dev/null 2>&1; then + if [ "$(tput colors)" -ge 8 ]; then + SUPPORTS_COLOR=true + fi + if tput bold >/dev/null 2>&1 && tput smul >/dev/null 2>&1; then + SUPPORTS_STYLE=true + fi + fi + + if [ "$SUPPORTS_COLOR" = true ]; then + cprint green "[OK] Terminal supports colored output." + else + cprint yellow "Note: Terminal does not support colored output. Continuing without formatting." + fi + + if [ "$SUPPORTS_STYLE" = true ]; then + cprint green "[OK] Terminal supports bold and underline formatting." + else + cprint yellow "Note: Terminal does not support advanced text styles." + fi +} + +# Check whether daemon or web is installed +is_component_installed() { + local component_name="$1" + local component_path="${install_dir}/${component_name}" + + if [[ -d "$component_path" ]]; then + cprint green "Component '$component_name' is already installed at $component_path" + + # Set corresponding global variable + if [[ "$component_name" == "daemon" ]]; then + daemon_installed=true + elif [[ "$component_name" == "web" ]]; then + web_installed=true + fi + + return 0 + else + cprint yellow "Component '$component_name' is not installed" + + # Set corresponding global variable + if [[ "$component_name" == "daemon" ]]; then + daemon_installed=false + elif [[ "$component_name" == "web" ]]; then + web_installed=false + fi + + return 1 + fi +} + +check_component_permission() { + local component="$1" + local service_file="${systemd_file}${component}.service" + + if [[ ! -f "$service_file" ]]; then + cprint yellow "Service file not found: $service_file" + return 0 # nothing changed + fi + + # Extract the User= line if it exists + local user_line + user_line=$(grep -E '^User=' "$service_file" 2>/dev/null | head -1) + + local user + if [[ -z "$user_line" ]]; then + user="root" # default if no User= is defined + else + user="${user_line#User=}" + fi + + # Validate user + if [[ "$user" != "root" && "$user" != "mcsm" ]]; then + cprint red bold "Unsupported user '$user' in $service_file. Expected 'root' or 'mcsm'." + exit 1 + fi + + # Assign to appropriate global + if [[ "$component" == "web" ]]; then + web_installed_user="$user" + elif [[ "$component" == "daemon" ]]; then + daemon_installed_user="$user" + fi + + cprint cyan "Detected $component installed as user: $user" + return 0 +} + + + +parse_args() { + local explicit_install_flag=false + + while [[ $# -gt 0 ]]; do + case "$1" in + --install-dir) + if [[ -n "$2" ]]; then + install_dir="$2" + shift 2 + else + echo "Error: --install-dir requires a path argument." + exit 1 + fi + ;; + --node-install-dir) + if [[ -n "$2" ]]; then + node_install_dir="$2" + shift 2 + else + echo "Error: --node-install-dir requires a path argument." + exit 1 + fi + ;; + --install) + explicit_install_flag=true + if [[ -n "$2" && "$2" != --* ]]; then + case "$2" in + daemon) + install_daemon=true + is_component_installed "daemon" + install_web=false + check_component_permission "daemon" + ;; + web) + install_daemon=false + is_component_installed "web" + install_web=true + check_component_permission "web" + ;; + all) + install_daemon=true + install_web=true + is_component_installed "daemon" + is_component_installed "web" + check_component_permission "daemon" + check_component_permission "web" + ;; + *) + echo "Error: Invalid value for --install. Expected 'daemon', 'web', or 'all'." + echo "Usage: --install daemon|web|all" + exit 1 + ;; + esac + shift 2 + else + echo "Error: --install flag provided but no value. Please specify: daemon, web, or all." + echo "Usage: --install daemon|web|all" + exit 1 + fi + ;; + --user) + if [[ -n "$2" ]]; then + case "$2" in + root) + install_user="root" + ;; + mcsm) + install_user="mcsm" + ;; + *) + echo "Error: Invalid user '$2'. Only 'root' and 'mcsm' are supported." + echo "Usage: --user root|mcsm" + exit 1 + ;; + esac + shift 2 + else + echo "Error: --user requires a value (root or mcsm)." + exit 1 + fi + ;; + --install-source) + if [[ -n "$2" ]]; then + install_source_path="$2" + shift 2 + else + echo "Error: --install-source requires a file path." + exit 1 + fi + ;; + *) + echo "Error: Unknown argument: $1" + exit 1 + ;; + esac + done + + # Auto-detect branch: only run if --install was not explicitly passed + if [[ "$explicit_install_flag" == false ]]; then + daemon_installed=false + web_installed=false + + if is_component_installed "daemon"; then + daemon_installed=true + check_component_permission "daemon" + fi + if is_component_installed "web"; then + web_installed=true + check_component_permission "web" + fi + + # When only one component installed, we wanted to process that one only. + if [[ "$daemon_installed" == true && "$web_installed" == false ]]; then + install_daemon=true + install_web=false + elif [[ "$daemon_installed" == false && "$web_installed" == true ]]; then + install_daemon=false + install_web=true + else + install_daemon=true + install_web=true + fi + fi +} + + +# Get Distribution & Architecture Info +detect_os_info() { + distro="Unknown" + version="Unknown" + arch=$(uname -m) + + # Try primary source + if [ -f /etc/os-release ]; then + . /etc/os-release + distro_id="${ID,,}" + version_id="${VERSION_ID,,}" + + case "$distro_id" in + ubuntu) + distro="Ubuntu" + version="$version_id" + ;; + debian) + distro="Debian" + version="$version_id" + ;; + centos) + distro="CentOS" + version="$version_id" + ;; + rhel*) + distro="RHEL" + version="$version_id" + ;; + arch) + distro="Arch" + version="rolling" + ;; + *) + distro="${ID:-Unknown}" + version="$version_id" + ;; + esac + fi + + # Fallbacks for missing or invalid version + if [[ -z "$version" || "$version" == "unknown" || "$version" == "" ]]; then + if [ -f /etc/issue ]; then + version_guess=$(grep -oP '[0-9]+(\.[0-9]+)*' /etc/issue | head -1) + if [[ -n "$version_guess" ]]; then + version="$version_guess" + fi + fi + fi + + # Normalize version: keep only major version + version_full="$version" + if [[ "$version" =~ ^[0-9]+(\.[0-9]+)*$ ]]; then + version="${version%%.*}" + else + echo "Warning: Could not detect a clean numeric version. Defaulting to unknown." + version="unknown" + fi + + cprint cyan "Detected OS: $distro $version_full" + cprint cyan "Detected Architecture: $arch" +} + + +# Check if current OS is supported +check_supported_os() { + local supported_versions="${supported_os[$distro]}" + + if [[ -z "$supported_versions" ]]; then + echo "Error: Distribution '$distro' is not supported by this installer." + return 1 + fi + + if [[ "$supported_versions" != *"$version"* ]]; then + echo "Error: Version '$version' of '$distro' is not supported." + echo "Supported versions are: $supported_versions" + return 1 + fi + + cprint green "OS compatibility check passed." + return 0 +} + +# Check if all required commands are available +check_required_commands() { + local missing=0 + + for cmd in "${required_commands[@]}"; do + if ! command -v "$cmd" >/dev/null 2>&1; then + echo "Error: Required command '$cmd' is not available in PATH." + missing=1 + fi + done + + if [ "$missing" -ne 0 ]; then + echo "One or more required commands are missing. Please install them and try again." + return 1 + fi + + cprint green "All required commands are available." + return 0 +} + +# Print with specified color and style, fallback to RESET if not supported. +# Supported colors*: black|red|green|yellow|blue|magenta|cyan|white +# Supported styles*: bold|underline|italic|clear_line|strikethrough +# *Note: some style may not necessarily work on all terminals. +# Example usage: +# cprint green bold "Installation completed successfully." +# cprint red underline "Failed to detect required command: wget" +# cprint yellow "Warning: Disk space is low." +# cprint underline "Failed to detect required command: wget" +# cprint bold green underline"Installation completed successfully." + +cprint() { + local color="" + local text="" + local styles="" + local disable_prefix=false + local disable_newline=false + + while [[ $# -gt 1 ]]; do + case "$1" in + black|red|green|yellow|blue|magenta|cyan|white) + color="$1" + ;; + bold|underline|italic|clear_line|strikethrough) + styles+="${STYLES[$1]}" + ;; + noprefix) + disable_prefix=true + ;; + nonl) + disable_newline=true + ;; + esac + shift + done + + text="$1" + + local prefix_text="" + if [[ "$disable_prefix" != true ]]; then + local timestamp="[$(date +%H:%M:%S)]" + local label="[MCSM Installer]" + prefix_text="${FG_COLORS[white]}$timestamp $label${RESET} " + fi + + local prefix="" + if [[ -n "$color" && "$SUPPORTS_COLOR" = true ]]; then + prefix+="${FG_COLORS[$color]}" + fi + if [[ "$SUPPORTS_STYLE" = true || "$styles" == *"${STYLES[clear_line]}"* ]]; then + prefix="$styles$prefix" + fi + + if [[ "$disable_newline" == true ]]; then + printf "%b%b%s%b" "$prefix_text" "$prefix" "$text" "$RESET" + else + printf "%b%b%s%b\n" "$prefix_text" "$prefix" "$text" "$RESET" + fi +} + + + + +# Permission check before proceed with installation +permission_barrier() { + if [[ "$web_installed" == false && "$daemon_installed" == false ]]; then + cprint cyan "No components currently installed — skipping permission check." + return 0 + fi + + for component in web daemon; do + local is_installed_var="${component}_installed" + local installed_user_var="${component}_installed_user" + + if [[ "${!is_installed_var}" == true ]]; then + local installed_user="${!installed_user_var}" + + # Step 0: Ensure installed user is detected + if [[ -z "$installed_user" ]]; then + cprint red bold "Detected that '$component' is installed but could not determine the user from its systemd service file." + cprint red "This may indicate a custom or unsupported service file setup." + cprint red "Refusing to proceed to avoid potential conflicts." + exit 1 + fi + + # Step 1: User match check + if [[ "$installed_user" != "$install_user" ]]; then + cprint red bold "Permission mismatch for '$component':" + cprint red "Installed as user: $installed_user" + cprint red "Current install target user: $install_user" + cprint red "Unable to proceed due to ownership conflict." + exit 1 + fi + fi + done + + # Step 2: Directory ownership check + local dir_owner + dir_owner=$(stat -c '%U' "$install_dir" 2>/dev/null) + + if [[ -z "$dir_owner" ]]; then + cprint red bold "Unable to determine owner of install_dir: $install_dir" + exit 1 + fi + + if [[ "$dir_owner" != "$install_user" ]]; then + cprint red bold "Install directory ownership mismatch:" + cprint red " Directory: $install_dir" + cprint red " Owned by: $dir_owner" + cprint red " Expected: $install_user" + exit 1 + fi + + cprint green bold "Permissions and ownership validated. Proceeding." + return 0 +} + + + +# Map OS arch with actual Node.js Arch name +# This function should be placed after var arch has been assigned a valid value. +resolve_node_arch() { + case "$arch" in + x86_64) + node_arch="x64" + ;; + aarch64) + node_arch="arm64" + ;; + armv7l) + node_arch="armv7l" + ;; + *) + cprint red bold "Unsupported architecture for Node.js: $arch" + return 1 + ;; + esac + + # Assign node_path based on resolved arch and current version/install dir + node_path="${node_install_dir}/node-${node_version}-linux-${node_arch}" + + cprint cyan "Resolved Node.js architecture: $node_arch" + cprint cyan "Computed Node.js install path: $node_path" +} + +# Check if Node.js at PATH is valid. +# This function check Node.js version + NPM (if Node.js valid) +verify_node_at_path() { + local node_path="$1" + # Assign value to vlobal variables when verifying + node_bin_path="$node_path/bin/node" + npm_bin_path="$node_path/bin/npm" + + # Node binary missing + if [ ! -x "$node_bin_path" ]; then + return 1 + fi + + local installed_ver + installed_ver="$("$node_bin_path" -v 2>/dev/null | sed 's/^v//')" + + # Node exists but version not returned + if [[ -z "$installed_ver" ]]; then + return 1 + fi + + # Version mismatch, even if newer + if [ "$strict_node_version_check" = true ]; then + if [[ "$installed_ver" != "$required_node_ver" ]]; then + return 3 + fi + else + # Version mismatch, too old. + local cmp + cmp=$(printf "%s\n%s\n" "$required_node_ver" "$installed_ver" | sort -V | head -1) + if [[ "$cmp" != "$required_node_ver" ]]; then + return 2 + fi + fi + + # node cmd valid, but npm is missing or broken. + if [ ! -x "$npm_bin_path" ] || ! "$npm_bin_path" --version >/dev/null 2>&1; then + return 4 + fi + + return 0 +} + +# Node.js pre-check. check if we need to install Node.js before installer run. +# Use postcheck_node_after_install() to check after install. +check_node_installed() { + verify_node_at_path "$node_path" + local result=$? + + case $result in + 0) + cprint green bold "Node.js and npm found at $node_path (version $required_node_ver or compatible)" + install_node=false + ;; + 1) + cprint yellow bold "Node.js binary not found or unusable at $node_path" + install_node=true + ;; + 2) + cprint red bold "Node.js version at $node_path is too old. Required: >= $required_node_ver" + install_node=true + ;; + 3) + cprint red bold "Node.js version mismatch. Required: $required_node_ver, found something else." + install_node=true + ;; + 4) + cprint red bold "Node.js is present but npm is missing or broken." + install_node=true + ;; + *) + cprint red bold "Unexpected error in node verification." + install_node=true + ;; + esac +} + +# Node.js post-check. check if Node.js is valid after install. +postcheck_node_after_install() { + verify_node_at_path "$node_path" + if [[ $? -ne 0 ]]; then + cprint red bold "Node.js installation failed or is invalid at $node_path" + return 1 + else + cprint green bold "Node.js is installed and functioning at $node_path" + return 0 + fi +} + +# Install Node.js and check +install_node() { + local archive_name="node-${node_version}-linux-${node_arch}.tar.xz" + local target_dir="${node_install_dir}/node-${node_version}-linux-${node_arch}" + local archive_path="${node_install_dir}/${archive_name}" + local download_url="${node_download_url_base}${node_version}/${archive_name}" + local fallback="$node_download_fallback" + + cprint cyan bold "Installing Node.js $node_version for arch: $node_arch" + + mkdir -p "$node_install_dir" || { + cprint red bold "Failed to create node install directory: $node_install_dir" + return 1 + } + + # Download + cprint cyan "Downloading Node.js from: $download_url" + if ! wget --progress=bar:force -O "$archive_path" "$download_url"; then + cprint yellow "Primary download failed. Attempting fallback..." + + if [[ -n "$fallback" ]]; then + if [[ "$fallback" =~ ^https?:// ]]; then + cprint cyan "Downloading from fallback URL: $fallback" + if ! wget --progress=bar:force -O "$archive_path" "$fallback"; then + cprint red bold "Fallback download failed from: $fallback" + return 1 + fi + elif [ -f "$fallback" ]; then + cprint cyan "Copying from local fallback: $fallback" + cp "$fallback" "$archive_path" || { + cprint red bold "Failed to copy fallback Node.js archive from $fallback" + return 1 + } + else + cprint red bold "Invalid fallback path: $fallback" + return 1 + fi + else + cprint red bold "No fallback source configured. Cannot proceed." + return 1 + fi + fi + + # Extract archive + cprint cyan "Extracting Node.js archive..." + if ! tar -xf "$archive_path" -C "$node_install_dir"; then + cprint red bold "Failed to extract Node.js archive." + return 1 + fi + + chmod -R a+rx "$target_dir" || { + cprint red bold "Failed to set execute permissions on Node.js files." + return 1 + } + + verify_node_at_path "$target_dir" + local result=$? + if [[ $result -ne 0 ]]; then + cprint red bold "Node.js installation failed verification." + return 1 + fi + + cprint cyan "Cleaning up archive..." + rm -f "$archive_path" + + cprint green bold "Node.js $node_version installed successfully at $target_dir" + # Save resolved binary paths to global variables + node_bin_path="${target_dir}/bin/node" + npm_bin_path="${target_dir}/bin/npm" + + cprint green "Node.js binary: $node_bin_path" + cprint green "npm binary: $npm_bin_path" + return 0 +} + +# Function to download MCSM package. fetch from primary URL first, then fallback URL. +# This function only put extracted file(s) into install_dir, it does not perform the actual update. +download_mcsm() { + local archive_name="$package_name" + local archive_path="${tmp_dir}/${archive_name}" + local primary_url="${download_base_url}${archive_name}" + local fallback="$download_fallback_url" + + cprint cyan bold "Downloading MCSManager package..." + + # Step 1: Try downloading from primary URL + if ! wget --progress=bar:force -O "$archive_path" "$primary_url"; then + cprint yellow "Primary download failed. Attempting fallback source..." + + if [[ -z "$fallback" ]]; then + cprint red bold "No fallback URL or path specified." + return 1 + fi + + if [[ "$fallback" =~ ^https?:// ]]; then + if ! wget --progress=bar:force -O "$archive_path" "$fallback"; then + cprint red bold "Fallback download failed from $fallback" + return 1 + fi + elif [[ -f "$fallback" ]]; then + cp "$fallback" "$archive_path" || { + cprint red bold "Failed to copy fallback archive from $fallback" + return 1 + } + else + cprint red bold "Fallback path is invalid: $fallback" + return 1 + fi + fi + + # Step 2: Generate extract directory + local suffix + suffix=$(tr -dc 'a-z0-9' /dev/null; then + cprint green "User '$install_user' already exists." + else + cprint cyan "Creating system user: $install_user (nologin, no password)..." + if ! useradd --system --home "$install_dir" --shell /usr/sbin/nologin "$install_user"; then + cprint red bold "Failed to create user: $install_user" + exit 1 + fi + cprint green "User '$install_user' created." + fi + + # Docker integration + if command -v docker &>/dev/null; then + cprint cyan "Docker is installed — checking group assignment..." + + if getent group docker &>/dev/null; then + if id -nG "$install_user" | grep -qw docker; then + cprint green "User '$install_user' is already in the 'docker' group." + else + cprint cyan "Adding user '$install_user' to 'docker' group..." + if usermod -aG docker "$install_user"; then + cprint green "Docker group access granted to '$install_user'." + else + cprint red "Failed to add '$install_user' to 'docker' group. Docker may not be usable by this user." + fi + fi + else + cprint red "Docker installed but 'docker' group not found. Skipping group assignment." + fi + else + cprint yellow "Docker not installed — skipping Docker group configuration." + fi + + return 0 +} + +# Prepare file & permissions before install. +mcsm_install_prepare() { + # Prepare the user first + prepare_user + + if [[ ! -d "$install_tmp_dir" ]]; then + cprint red bold "install_tmp_dir does not exist: $install_tmp_dir" + exit 1 + fi + + cprint cyan "Changing ownership of $install_tmp_dir to user '$install_user'..." + chown -R "$install_user":"$install_user" "$install_tmp_dir" || { + cprint red bold "Failed to change ownership of $install_tmp_dir" + cleanup_install_tmp + exit 1 + } + + # Normalize install_dir to ensure it ends with a slash + [[ "${install_dir}" != */ ]] && install_dir="${install_dir}/" + + if [[ "$web_installed" == false && "$daemon_installed" == false ]]; then + cprint cyan "No existing components detected — skipping data backup/cleanup." + return 0 + fi + + for component in web daemon; do + local is_installed_var="${component}_installed" + if [[ "${!is_installed_var}" == true ]]; then + local component_path="${install_dir}${component}" + local data_dir="${component_path}/data" + local backup_path="${install_dir}${backup_prefix}${component}" + + if [[ ! -d "$component_path" ]]; then + cprint yellow "Expected installed component directory not found: $component_path" + continue + fi + + if [[ -d "$data_dir" ]]; then + if [[ -e "$backup_path" ]]; then + cprint red bold "Backup destination already exists: $backup_path" + cprint red "Please resolve this conflict manually before continuing." + cleanup_install_tmp + exit 1 + fi + + cprint cyan "Backing up data directory for $component..." + mv "$data_dir" "$backup_path" || { + cprint red bold "Failed to move $data_dir to $backup_path" + cleanup_install_tmp + exit 1 + } + cprint green "Moved $data_dir → $backup_path" + else + cprint yellow "No data directory found for $component — skipping backup." + fi + + cprint cyan "Removing old component directory: $component_path" + rm -rf "$component_path" || { + cprint red bold "Failed to remove old component directory: $component_path" + cleanup_install_tmp + exit 1 + } + fi + done + + cprint green bold "Existing components prepared successfully." + return 0 +} + +# Install or update a component +install_component() { + local component="$1" + local target_path="${install_dir}${component}" + local backup_data_path="${install_dir}${backup_prefix}${component}" + local source_path="${install_tmp_dir}/mcsmanager/${component}" + + cprint cyan bold "Installing/Updating component: $component" + + # Step 1: Move new component to install_dir + if [[ ! -d "$source_path" ]]; then + cprint red bold "Source directory not found: $source_path" + cleanup_install_tmp + exit 1 + fi + + if [[ -e "$target_path" ]]; then + cprint red bold "Target path already exists: $target_path" + cprint red " This should not happen — possible permission error or unclean install." + cleanup_install_tmp + exit 1 + fi + + mv "$source_path" "$target_path" || { + cprint red bold "Failed to move $source_path → $target_path" + cleanup_install_tmp + exit 1 + } + + cprint green "Moved $component to $target_path" + + # Step 2: Restore backed-up data directory if present + if [[ -d "$backup_data_path" ]]; then + local target_data_path="${target_path}/data" + + cprint cyan "Restoring backed-up data directory for $component..." + + rm -rf "$target_data_path" # Ensure no conflict + mv "$backup_data_path" "$target_data_path" || { + cprint red bold "Failed to restore data directory to $target_data_path" + cleanup_install_tmp + exit 1 + } + + cprint green "Data directory restored: $target_data_path" + else + cprint yellow "No backed-up data directory found for $component — fresh install assumed." + fi + + # Step 3: Install NPM dependencies + if [[ ! -x "$npm_bin_path" ]]; then + cprint red bold "npm binary not found or not executable: $npm_bin_path" + cleanup_install_tmp + exit 1 + fi + + cprint cyan "Installing dependencies for $component using npm..." + pushd "$target_path" >/dev/null || { + cprint red bold "Failed to change directory to $target_path" + cleanup_install_tmp + exit 1 + } + + if ! "$npm_bin_path" install --no-audit --no-fund --loglevel=warn; then + cprint red bold "NPM dependency installation failed for $component" + popd >/dev/null + cleanup_install_tmp + exit 1 + fi + + popd >/dev/null + cprint green bold "Component '$component' installed/updated successfully." +} + +# Create systemd service for a given component. +# This will overwrite the existing service file. +create_systemd_service() { + local component="$1" + local service_path="${systemd_file}${component}.service" + local working_dir="${install_dir}${component}" + local exec="${node_bin_path} app.js" + + if [[ ! -d "$working_dir" ]]; then + cprint red bold "Component directory not found: $working_dir" + cleanup_install_tmp + return 1 + fi + + cprint cyan "Creating systemd service for '$component'..." + + cat > "$service_path" </dev/null | awk '{print $1}') + [[ -z "$ip_address" ]] && ip_address="YOUR-IP" + + # Daemon info + if [[ "$install_daemon" == true ]]; then + local daemon_address="ws://$ip_address:${daemon_port:-Failed to Retrieve from Config file}" + local daemon_key_display="${daemon_key:-Failed to Retrieve from Config file}" + + cprint yellow noprefix "Daemon Address:" + cprint white noprefix " $daemon_address" + cprint yellow noprefix "Daemon Key:" + cprint white noprefix " $daemon_key_display" + echo "" + fi + + # Web info + if [[ "$install_web" == true ]]; then + local web_address="http://$ip_address:${web_port:-Failed to Retrieve from Config file}" + cprint yellow noprefix "HTTP Web Interface:" + cprint white noprefix nonl " $web_address " + cprint yellow noprefix "(open in browser)" + echo "" + fi + + # Port guidance + cprint yellow noprefix "NOTE:" + cprint white noprefix " Make sure to expose the above ports through your firewall." + cprint white noprefix " If accessing from outside your network, you may need to configure port forwarding on your router." + echo "" + + # Service management help + cprint yellow noprefix "Service Management Commands:" + if [[ "$install_daemon" == true ]]; then + cprint white noprefix nonl " systemctl start " + cprint yellow noprefix "mcsm-daemon.service" + cprint white noprefix nonl " systemctl stop " + cprint yellow noprefix "mcsm-daemon.service" + cprint white noprefix nonl " systemctl restart " + cprint yellow noprefix "mcsm-daemon.service" + cprint white noprefix nonl " systemctl status " + cprint yellow noprefix "mcsm-daemon.service" + fi + if [[ "$install_web" == true ]]; then + cprint white noprefix nonl " systemctl start " + cprint yellow noprefix "mcsm-web.service" + cprint white noprefix nonl " systemctl stop " + cprint yellow noprefix "mcsm-web.service" + cprint white noprefix nonl " systemctl restart " + cprint yellow noprefix "mcsm-web.service" + cprint white noprefix nonl " systemctl status " + cprint yellow noprefix "mcsm-web.service" + fi + echo "" + + # Official doc + cprint yellow noprefix "Official Documentation:" + cprint white noprefix " https://docs.mcsmanager.com/" + echo "" + + # HTTPS support + cprint yellow noprefix "Need HTTPS?" + cprint white noprefix " To enable secure HTTPS access, configure a reverse proxy:" + cprint white noprefix " https://docs.mcsmanager.com/ops/proxy_https.html" + echo "" + + # Closing message + cprint green noprefix "Installation completed. Enjoy managing your servers with MCSManager!" + echo "" +} + +install_mcsm() { + local components=() + + if [[ "$install_web" == true ]]; then + install_component "web" + create_systemd_service "web" + components+=("web") + fi + + if [[ "$install_daemon" == true ]]; then + install_component "daemon" + create_systemd_service "daemon" + components+=("daemon") + fi + + # Reload systemd after any service file changes + if (( ${#components[@]} > 0 )); then + cprint cyan "Reloading systemd daemon..." + # systemctl daemon-reexec + systemctl daemon-reload + + for comp in "${components[@]}"; do + local svc="mcsm-${comp}.service" + + cprint cyan "Enabling service: $svc" + if systemctl enable "$svc" &>/dev/null; then + cprint green "Enabled service: $svc" + else + cprint red bold "Failed to enable service: $svc" + cleanup_install_tmp + exit 1 + fi + done + fi + + # Clean tmp dir + cleanup_install_tmp + # Extract installed component info + safe_run extract_component_info "Failed to extract runtime info from installed services" + safe_run print_install_result "Failed to print installation result" + +} + +main() { + trap 'echo "Unexpected error occurred."; exit 99' ERR + safe_run detect_terminal_capabilities "Failed to detect terminal capabilities" + safe_run check_root "Script must be run as root" + safe_run parse_args "Failed to parse arguments" "$@" + safe_run detect_os_info "Failed to detect OS" + safe_run check_supported_os "Unsupported OS or version" + # To be moved to a master pre check function. + safe_run resolve_node_arch "Failed to resolve Node.js architecture" + + safe_run check_required_commands "Missing required system commands" + + safe_run check_node_installed "Failed to detect Node.js or npm at expected path. Node.js will be installed." + if [ "$install_node" = true ]; then + safe_run install_node "Node.js installation failed" + fi + + safe_run permission_barrier "Permission validation failed — aborting install" + + safe_run download_mcsm "Failed to acquire MCSManager source" + safe_run mcsm_install_prepare "Error while preparing for installation" + + safe_run install_mcsm "Failed to install MCSManager" +} +main "$@" From 5393bb3f7b3d16d681ae640bd84fe2427a6d6daf Mon Sep 17 00:00:00 2001 From: KevinLu Date: Mon, 6 Oct 2025 00:31:54 -0400 Subject: [PATCH 277/338] fix: detect npm using node --- setup.sh | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/setup.sh b/setup.sh index f6157fa..ed8162c 100644 --- a/setup.sh +++ b/setup.sh @@ -666,7 +666,6 @@ resolve_node_arch() { # This function check Node.js version + NPM (if Node.js valid) verify_node_at_path() { local node_path="$1" - # Assign value to vlobal variables when verifying node_bin_path="$node_path/bin/node" npm_bin_path="$node_path/bin/npm" @@ -678,18 +677,15 @@ verify_node_at_path() { local installed_ver installed_ver="$("$node_bin_path" -v 2>/dev/null | sed 's/^v//')" - # Node exists but version not returned if [[ -z "$installed_ver" ]]; then return 1 fi - # Version mismatch, even if newer if [ "$strict_node_version_check" = true ]; then if [[ "$installed_ver" != "$required_node_ver" ]]; then return 3 fi else - # Version mismatch, too old. local cmp cmp=$(printf "%s\n%s\n" "$required_node_ver" "$installed_ver" | sort -V | head -1) if [[ "$cmp" != "$required_node_ver" ]]; then @@ -697,14 +693,22 @@ verify_node_at_path() { fi fi - # node cmd valid, but npm is missing or broken. - if [ ! -x "$npm_bin_path" ] || ! "$npm_bin_path" --version >/dev/null 2>&1; then + # Check if npm exists and works using node (not $PATH/npm) + if [ ! -x "$npm_bin_path" ]; then + return 4 + fi + + # Use node to run npm.js directly, in case env is broken + local npm_version + npm_version="$("$node_bin_path" "$npm_bin_path" --version 2>/dev/null)" + if [[ -z "$npm_version" ]]; then return 4 fi return 0 } + # Node.js pre-check. check if we need to install Node.js before installer run. # Use postcheck_node_after_install() to check after install. check_node_installed() { @@ -1224,7 +1228,7 @@ print_install_result() { cprint white noprefix "/_/ /_/ \____/ /____/ /_/ /_/ \__,_/ /_/ /_/\__,_/ _\__, / \___//_/" echo "" # status summary - cprint yellow noprefix "Installed/Updated Components:" + cprint yellow noprefix "Installed/Updated Component(s):" if [[ "$install_daemon" == true && -n "$daemon_key" && -n "$daemon_port" ]]; then cprint white noprefix "Daemon" elif [[ "$install_daemon" == true ]]; then From 49c5ead583fb450ba29ed999d49c9d4a44f2b097 Mon Sep 17 00:00:00 2001 From: KevinLu Date: Mon, 6 Oct 2025 00:33:26 -0400 Subject: [PATCH 278/338] fix: execute npm using node --- setup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.sh b/setup.sh index ed8162c..97ecd5f 100644 --- a/setup.sh +++ b/setup.sh @@ -1083,10 +1083,10 @@ install_component() { exit 1 } - if ! "$npm_bin_path" install --no-audit --no-fund --loglevel=warn; then + if ! "$node_bin_path" "$npm_bin_path" install --no-audit --no-fund --loglevel=warn; then cprint red bold "NPM dependency installation failed for $component" popd >/dev/null - cleanup_install_tmp + cleanup_install_tmp exit 1 fi From e55a91ee36bc7e483f15de500a46beb20a8b648d Mon Sep 17 00:00:00 2001 From: KevinLu Date: Wed, 8 Oct 2025 02:47:09 -0400 Subject: [PATCH 279/338] updated .gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 250ffcc..1dc7e63 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,5 @@ bin-release/ cli_old.sh .idea + +design.txt \ No newline at end of file From 02d99865976eabeb1cfcac3e9c17e5637933bbdc Mon Sep 17 00:00:00 2001 From: KevinLu Date: Wed, 8 Oct 2025 02:52:46 -0400 Subject: [PATCH 280/338] feat: update logic - replace backup with file override --- setup.sh | 69 ++------------------------------------------------------ 1 file changed, 2 insertions(+), 67 deletions(-) diff --git a/setup.sh b/setup.sh index 529a70b..e094f3a 100644 --- a/setup.sh +++ b/setup.sh @@ -899,46 +899,6 @@ mcsm_install_prepare() { return 0 fi - for component in web daemon; do - local is_installed_var="${component}_installed" - if [[ "${!is_installed_var}" == true ]]; then - local component_path="${install_dir}${component}" - local data_dir="${component_path}/data" - local backup_path="${install_dir}${backup_prefix}${component}" - - if [[ ! -d "$component_path" ]]; then - cprint yellow "Expected installed component directory not found: $component_path" - continue - fi - - if [[ -d "$data_dir" ]]; then - if [[ -e "$backup_path" ]]; then - cprint red bold "Backup destination already exists: $backup_path" - cprint red "Please resolve this conflict manually before continuing." - cleanup_install_tmp - exit 1 - fi - - cprint cyan "Backing up data directory for $component..." - mv "$data_dir" "$backup_path" || { - cprint red bold "Failed to move $data_dir to $backup_path" - cleanup_install_tmp - exit 1 - } - cprint green "Moved $data_dir → $backup_path" - else - cprint yellow "No data directory found for $component — skipping backup." - fi - - cprint cyan "Removing old component directory: $component_path" - rm -rf "$component_path" || { - cprint red bold "Failed to remove old component directory: $component_path" - cleanup_install_tmp - exit 1 - } - fi - done - cprint green bold "Existing components prepared successfully." return 0 } @@ -959,39 +919,14 @@ install_component() { exit 1 fi - if [[ -e "$target_path" ]]; then - cprint red bold "Target path already exists: $target_path" - cprint red " This should not happen — possible permission error or unclean install." - cleanup_install_tmp - exit 1 - fi - mv "$source_path" "$target_path" || { + mv -f "$source_path" "$target_path" || { cprint red bold "Failed to move $source_path → $target_path" - cleanup_install_tmp + cleanup_install_tmp exit 1 } - cprint green "Moved $component to $target_path" - # Step 2: Restore backed-up data directory if present - if [[ -d "$backup_data_path" ]]; then - local target_data_path="${target_path}/data" - - cprint cyan "Restoring backed-up data directory for $component..." - - rm -rf "$target_data_path" # Ensure no conflict - mv "$backup_data_path" "$target_data_path" || { - cprint red bold "Failed to restore data directory to $target_data_path" - cleanup_install_tmp - exit 1 - } - - cprint green "Data directory restored: $target_data_path" - else - cprint yellow "No backed-up data directory found for $component — fresh install assumed." - fi - # Step 3: Install NPM dependencies if [[ ! -x "$npm_bin_path" ]]; then cprint red bold "npm binary not found or not executable: $npm_bin_path" From d1688081343fb4c59a48397f4de60c6792fed375 Mon Sep 17 00:00:00 2001 From: KevinLu Date: Wed, 8 Oct 2025 03:00:30 -0400 Subject: [PATCH 281/338] fix: fix EOL issue --- setup.sh | 102 ++++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 90 insertions(+), 12 deletions(-) diff --git a/setup.sh b/setup.sh index e094f3a..ea32fc6 100644 --- a/setup.sh +++ b/setup.sh @@ -23,10 +23,75 @@ download_fallback_url="https://github.com/MCSManager/MCSManager/releases/latest/ # Name of the release package to download/detect package_name="mcsmanager_linux_release.tar.gz" -if [ "$(id -u)" -ne 0 ]; then - echo "This script must be run as root. Please use \"sudo bash\" instead." - exit 1 -fi +# Node.js version to be installed +# Keep the leading "v" +node_version="v20.12.2" + +# Node download base URL - primary +node_download_url_base="https://nodejs.org/dist/" + +# Node download URL - fallback. +# This is the URL points directly to the file, not the base. This can also be a local absolute path. +# Only supports https:// or http:// for web locations. +node_download_fallback="" + +# Node.js installation path (defaults to the MCSManager installation path. Can be overridden with --node-install-dir) +node_install_dir="$install_dir" + +# Temp dir for file extraction +tmp_dir="/tmp" + +# --------------- Global Variables ---------------# +# DO NOT MODIFY # + + +# Component installation options. +# For fresh installs, both daemon and web components are installed by default. +# For updates, behavior depends on detected existing components. +# Can be overridden with --install daemon/web/all +install_daemon=true +install_web=true + +# Install MCSM as (default: root). +# To install as a general user (e.g., "mcsm"), use the --user option: --user mcsm +# To ensure compatibility, only user mcsm is supported. +install_user="root" +# Installed user, for permission check +web_installed=false +daemon_installed=false +web_installed_user="" +daemon_installed_user="" + +# Service file locations +# the final dir = systemd_file + {web/daemon} + ".service" +systemd_file="/etc/systemd/system/mcsm-" +# Optional: Override the default installation source file. +# If --install-source is specified, the installer will use the provided +# "mcsmanager_linux_release.tar.gz" file instead of downloading it. +# Only support local absolute path. +install_source_path="" + +# temp path for extracted file(s) +install_tmp_dir="/opt/mcsmanager/mcsm_abcd" + +# dir name for data dir backup +# e.g. /opt/mcsmanager/daemon/data -> /opt/mcsmanager/data_bak_data +# only valid for when during an update +backup_prefix="data_bak_" + +# System architecture (detected automatically) +arch="" +version="" +distro="" + +# Supported OS versions (map-style structure) +# Format: supported_os["distro_name"]="version1 version2 version3 ..." +declare -A supported_os +supported_os["Ubuntu"]="18 20 22 24" +supported_os["Debian"]="10 11 12 13" +supported_os["CentOS"]="7 8 8-stream 9-stream 10-stream" +supported_os["RHEL"]="7 8 9 10" +supported_os["Arch"]="rolling" # Required system commands for installation # These will be checked before logic process @@ -432,13 +497,25 @@ check_supported_os() { return 0 } -Install_Node() { - if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then - echo_green "Node.js version is up-to-date, skipping installation." - return +# Check if all required commands are available +check_required_commands() { + local missing=0 + + for cmd in "${required_commands[@]}"; do + if ! command -v "$cmd" >/dev/null 2>&1; then + echo "Error: Required command '$cmd' is not available in PATH." + missing=1 + fi + done + + if [ "$missing" -ne 0 ]; then + echo "One or more required commands are missing. Please install them and try again." + return 1 fi - echo_cyan "[+] Install Node.JS environment..." + cprint green "All required commands are available." + return 0 +} # Print with specified color and style, fallback to RESET if not supported. # Supported colors*: black|red|green|yellow|blue|magenta|cyan|white @@ -919,14 +996,15 @@ install_component() { exit 1 fi - mv -f "$source_path" "$target_path" || { - cprint red bold "Failed to move $source_path → $target_path" - cleanup_install_tmp + cprint red bold "Failed to move $source_path -> $target_path" + cleanup_install_tmp exit 1 } + cprint green "Moved $component to $target_path" + # Step 3: Install NPM dependencies if [[ ! -x "$npm_bin_path" ]]; then cprint red bold "npm binary not found or not executable: $npm_bin_path" From 3a846adb4b228e5f7887c0839ec8c28b1e48c653 Mon Sep 17 00:00:00 2001 From: KevinLu Date: Wed, 8 Oct 2025 03:01:01 -0400 Subject: [PATCH 282/338] feat: enforce node version check by default --- setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index ea32fc6..746a5ae 100644 --- a/setup.sh +++ b/setup.sh @@ -111,7 +111,7 @@ required_commands=( # enabled -> strict requriement for defined node version # false -> newer version allowed # Older version is NEVER allowed -strict_node_version_check=false +strict_node_version_check=true # Will be set based on actual node status install_node=true From 9d8a35959ef819cdfe9e623a603b4e1ec3671eb6 Mon Sep 17 00:00:00 2001 From: KevinLu Date: Wed, 8 Oct 2025 03:09:06 -0400 Subject: [PATCH 283/338] feat: stop web & daemon service before update --- setup.sh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/setup.sh b/setup.sh index 746a5ae..3500fce 100644 --- a/setup.sh +++ b/setup.sh @@ -950,11 +950,41 @@ prepare_user() { return 0 } +# Function to stop MCSM services if they exist +stop_mcsm_services() { + cprint yellow bold "Attempting to stop mcsm-web and mcsm-daemon services..." + + # Stop mcsm-web if the service exists + if systemctl list-units --full --all | grep -q '^mcsm-web\.service'; then + cprint blue "Stopping mcsm-web..." + if systemctl stop mcsm-web; then + cprint green "mcsm-web stopped successfully." + else + cprint red bold "Warning: Failed to stop mcsm-web." + fi + else + cprint cyan "mcsm-web service not found. Skipping." + fi + + # Stop mcsm-daemon if the service exists + if systemctl list-units --full --all | grep -q '^mcsm-daemon\.service'; then + cprint blue "Stopping mcsm-daemon..." + if systemctl stop mcsm-daemon; then + cprint green "mcsm-daemon stopped successfully." + else + cprint red bold "Warning: Failed to stop mcsm-daemon." + fi + else + cprint cyan "mcsm-daemon service not found. Skipping." + fi +} # Prepare file & permissions before install. mcsm_install_prepare() { # Prepare the user first prepare_user + # Stop service if existed + stop_mcsm_services if [[ ! -d "$install_tmp_dir" ]]; then cprint red bold "install_tmp_dir does not exist: $install_tmp_dir" From 6811701c4ef0cd92cb93560af72da85b8d5d2984 Mon Sep 17 00:00:00 2001 From: KevinLu Date: Wed, 8 Oct 2025 03:12:44 -0400 Subject: [PATCH 284/338] fix: file override issue & service detection --- setup.sh | 41 +++++++++++++++++------------------------ 1 file changed, 17 insertions(+), 24 deletions(-) diff --git a/setup.sh b/setup.sh index 3500fce..fdbc859 100644 --- a/setup.sh +++ b/setup.sh @@ -954,31 +954,22 @@ prepare_user() { stop_mcsm_services() { cprint yellow bold "Attempting to stop mcsm-web and mcsm-daemon services..." - # Stop mcsm-web if the service exists - if systemctl list-units --full --all | grep -q '^mcsm-web\.service'; then - cprint blue "Stopping mcsm-web..." - if systemctl stop mcsm-web; then - cprint green "mcsm-web stopped successfully." - else - cprint red bold "Warning: Failed to stop mcsm-web." - fi + # Attempt to stop mcsm-web + cprint blue "Stopping mcsm-web..." + if systemctl stop mcsm-web; then + cprint green "mcsm-web stopped successfully." else - cprint cyan "mcsm-web service not found. Skipping." + cprint red bold "Warning: Failed to stop mcsm-web (may not exist or already stopped)." fi - # Stop mcsm-daemon if the service exists - if systemctl list-units --full --all | grep -q '^mcsm-daemon\.service'; then - cprint blue "Stopping mcsm-daemon..." - if systemctl stop mcsm-daemon; then - cprint green "mcsm-daemon stopped successfully." - else - cprint red bold "Warning: Failed to stop mcsm-daemon." - fi + # Attempt to stop mcsm-daemon + cprint blue "Stopping mcsm-daemon..." + if systemctl stop mcsm-daemon; then + cprint green "mcsm-daemon stopped successfully." else - cprint cyan "mcsm-daemon service not found. Skipping." + cprint red bold "Warning: Failed to stop mcsm-daemon (may not exist or already stopped)." fi } - # Prepare file & permissions before install. mcsm_install_prepare() { # Prepare the user first @@ -1026,12 +1017,14 @@ install_component() { exit 1 fi - mv -f "$source_path" "$target_path" || { - cprint red bold "Failed to move $source_path -> $target_path" - cleanup_install_tmp + if cp -a "$source_path"/. "$target_path"; then + cprint green "Updated files from $source_path → $target_path" + rm -rf "$source_path" + else + cprint red bold "Failed to update files from $source_path → $target_path" + cleanup_install_tmp exit 1 - } - + fi cprint green "Moved $component to $target_path" From 12b8b407d6d5a2d1135d479e9f00740a5f55b652 Mon Sep 17 00:00:00 2001 From: KevinLu Date: Thu, 9 Oct 2025 22:00:42 -0400 Subject: [PATCH 285/338] change ownership of install dir --- setup.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/setup.sh b/setup.sh index fdbc859..fcfe626 100644 --- a/setup.sh +++ b/setup.sh @@ -925,6 +925,14 @@ prepare_user() { fi cprint green "User '$install_user' created." fi + + cprint cyan "Changing ownership of $install_dir to user '$install_user'..." + chown -R "$install_user":"$install_user" "$install_dir" || { + cprint red bold "Failed to change ownership of $install_dir" + cleanup_install_tmp + exit 1 + } + # Docker integration if command -v docker &>/dev/null; then From 8d6080adfe053368b936960dc9005793b790f431 Mon Sep 17 00:00:00 2001 From: shane0411 Date: Fri, 10 Oct 2025 10:13:33 +0800 Subject: [PATCH 286/338] feat: add daemon script node check --- daemon/setup.sh | 5 +++++ daemon/setup_cn.sh | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/daemon/setup.sh b/daemon/setup.sh index a0ed362..c5d4c85 100644 --- a/daemon/setup.sh +++ b/daemon/setup.sh @@ -44,6 +44,11 @@ Red_Error() { } Install_Node() { + if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then + echo_green "Node.js version is up-to-date, skipping installation." + return + fi + echo_cyan_n "[+] Install Node.JS environment...\n" rm -irf "$node_install_path" diff --git a/daemon/setup_cn.sh b/daemon/setup_cn.sh index a3a4113..aec9b51 100644 --- a/daemon/setup_cn.sh +++ b/daemon/setup_cn.sh @@ -44,6 +44,11 @@ Red_Error() { } Install_Node() { + if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then + echo_green "Node.js version is up-to-date, skipping installation." + return + fi + echo_cyan_n "[+] 安装 Node.JS...\n" rm -irf "$node_install_path" From 04bf77160dcc46487f1ecba380936a39de6a6fe1 Mon Sep 17 00:00:00 2001 From: KevinLu Date: Thu, 9 Oct 2025 22:19:15 -0400 Subject: [PATCH 287/338] fix: prepare user before file permission barrier --- setup.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/setup.sh b/setup.sh index fcfe626..dc66597 100644 --- a/setup.sh +++ b/setup.sh @@ -980,8 +980,7 @@ stop_mcsm_services() { } # Prepare file & permissions before install. mcsm_install_prepare() { - # Prepare the user first - prepare_user + # Stop service if existed stop_mcsm_services @@ -1343,7 +1342,7 @@ main() { if [ "$install_node" = true ]; then safe_run install_node "Node.js installation failed" fi - + safe_run prepare_user "Failed to prepare user permission." safe_run permission_barrier "Permission validation failed — aborting install" safe_run download_mcsm "Failed to acquire MCSManager source" From 8a2931f30acf105b39044a768b2a0dfeda31b507 Mon Sep 17 00:00:00 2001 From: KevinLu Date: Thu, 9 Oct 2025 22:54:05 -0400 Subject: [PATCH 288/338] feat: added flag to skip perm check and update permission --- setup.sh | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/setup.sh b/setup.sh index dc66597..f232c4b 100644 --- a/setup.sh +++ b/setup.sh @@ -41,6 +41,10 @@ node_install_dir="$install_dir" # Temp dir for file extraction tmp_dir="/tmp" +# Bypass installed user permission check, override by --force-permission +force_permission=false + + # --------------- Global Variables ---------------# # DO NOT MODIFY # @@ -84,6 +88,8 @@ arch="" version="" distro="" + + # Supported OS versions (map-style structure) # Format: supported_os["distro_name"]="version1 version2 version3 ..." declare -A supported_os @@ -378,6 +384,10 @@ parse_args() { exit 1 fi ;; + --force-permission) + force_permission=true + shift + ;; *) echo "Error: Unknown argument: $1" exit 1 @@ -602,14 +612,24 @@ permission_barrier() { exit 1 fi - # Step 1: User match check + # Step 1: User match check with optional force override if [[ "$installed_user" != "$install_user" ]]; then - cprint red bold "Permission mismatch for '$component':" - cprint red "Installed as user: $installed_user" - cprint red "Current install target user: $install_user" - cprint red "Unable to proceed due to ownership conflict." - exit 1 + if [[ "$force_permission" == true ]]; then + cprint yellow bold "Permission mismatch for '$component':" + cprint yellow "Installed as user: $installed_user" + cprint yellow "Target install user: $install_user" + cprint yellow "User mismatch, but --force-permission is set. Continuing and updating permissions..." + else + cprint red bold "Permission mismatch for '$component':" + cprint red "Installed as user: $installed_user" + cprint red "Current install target user: $install_user" + cprint red "Unable to proceed due to ownership conflict. Use --force-permission to override and update file permission." + exit 1 + fi + else + cprint green bold "Permission check passed: '$installed_user' matches target user." fi + fi done From 31d365b9d181876f6fbf58c214fdc1a73bb161d2 Mon Sep 17 00:00:00 2001 From: KevinLu Date: Thu, 9 Oct 2025 23:09:11 -0400 Subject: [PATCH 289/338] misc: remove global permission update by default --- setup.sh | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/setup.sh b/setup.sh index f232c4b..b0b7feb 100644 --- a/setup.sh +++ b/setup.sh @@ -945,14 +945,7 @@ prepare_user() { fi cprint green "User '$install_user' created." fi - - cprint cyan "Changing ownership of $install_dir to user '$install_user'..." - chown -R "$install_user":"$install_user" "$install_dir" || { - cprint red bold "Failed to change ownership of $install_dir" - cleanup_install_tmp - exit 1 - } - + # Docker integration if command -v docker &>/dev/null; then From 1f3e725233872618307725a5075a7c681a58bfde Mon Sep 17 00:00:00 2001 From: KevinLu Date: Thu, 9 Oct 2025 23:20:16 -0400 Subject: [PATCH 290/338] minor: text update --- setup.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index b0b7feb..27926d1 100644 --- a/setup.sh +++ b/setup.sh @@ -679,7 +679,7 @@ resolve_node_arch() { node_path="${node_install_dir}/node-${node_version}-linux-${node_arch}" cprint cyan "Resolved Node.js architecture: $node_arch" - cprint cyan "Computed Node.js install path: $node_path" + cprint cyan "Node.js install path: $node_path" } # Check if Node.js at PATH is valid. @@ -1290,6 +1290,11 @@ print_install_result() { cprint white noprefix " To enable secure HTTPS access, configure a reverse proxy:" cprint white noprefix " https://docs.mcsmanager.com/ops/proxy_https.html" echo "" + + if [[ "$force_permission" == true ]]; then + cprint red noprefix "[Important] You chose to override permission during install." + cprint red noprefix " You may need to run: chown -R $install_user to update permission manually." + fi # Closing message cprint green noprefix "Installation completed. Enjoy managing your servers with MCSManager!" From 88029d8a51d00ae87a04f4d4aee37b312c17109d Mon Sep 17 00:00:00 2001 From: KevinLu Date: Thu, 9 Oct 2025 23:31:11 -0400 Subject: [PATCH 291/338] fix: flag skip dir perm check --- setup.sh | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/setup.sh b/setup.sh index 27926d1..472bcc6 100644 --- a/setup.sh +++ b/setup.sh @@ -619,6 +619,7 @@ permission_barrier() { cprint yellow "Installed as user: $installed_user" cprint yellow "Target install user: $install_user" cprint yellow "User mismatch, but --force-permission is set. Continuing and updating permissions..." + sleep 3 else cprint red bold "Permission mismatch for '$component':" cprint red "Installed as user: $installed_user" @@ -643,11 +644,22 @@ permission_barrier() { fi if [[ "$dir_owner" != "$install_user" ]]; then - cprint red bold "Install directory ownership mismatch:" - cprint red " Directory: $install_dir" - cprint red " Owned by: $dir_owner" - cprint red " Expected: $install_user" + if [[ "$force_permission" == true ]]; then + cprint yellow bold "Install directory ownership mismatch:" + cprint yellow " Directory: $install_dir" + cprint yellow " Owned by: $dir_owner" + cprint yellow " Expected: $install_user" + cprint yellow " --force-permission is set. Continuing despite mismatch." + sleep 3 + else + cprint red bold "Install directory ownership mismatch:" + cprint red " Directory: $install_dir" + cprint red " Owned by: $dir_owner" + cprint red " Expected: $install_user" exit 1 + fi + else + cprint green bold "Install directory ownership check passed: '$install_dir' is owned by '$install_user'." fi cprint green bold "Permissions and ownership validated. Proceeding." From fc66f2f2ed7dd53085a179dd296cf721e773cc98 Mon Sep 17 00:00:00 2001 From: Capslock800000 Date: Fri, 10 Oct 2025 19:20:41 +0800 Subject: [PATCH 292/338] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B9=B6=E6=B1=89?= =?UTF-8?q?=E5=8C=96=E4=BA=86=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup_cn.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup_cn.sh b/setup_cn.sh index e7ec82b..0771775 100644 --- a/setup_cn.sh +++ b/setup_cn.sh @@ -212,7 +212,7 @@ fi node_install_path="/opt/node-$node-linux-$arch" # Check network connection -echo_cyan "[-] Architecture: $arch" +echo_cyan "[-] 当前系统架构: $arch" # Install related software echo_cyan_n "[+] 正在安装依赖软件 (git, tar, wget)... " @@ -230,7 +230,7 @@ fi # Determine whether the relevant software is installed successfully if [[ -x "$(command -v git)" && -x "$(command -v tar)" && -x "$(command -v wget)" ]]; then - echo_green "完成" + echo_green "完成!" else Red_Error "[x] 没有安装 git, tar 和 wget, 请先在安装MCSManager前安装它们!" fi From ff74cb06dd51cb8811362d4fa961e1185087a2ef Mon Sep 17 00:00:00 2001 From: KevinLu Date: Sat, 11 Oct 2025 00:05:07 -0400 Subject: [PATCH 293/338] fix: move user add logic after perm check/rollback --- setup.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index 472bcc6..79b397e 100644 --- a/setup.sh +++ b/setup.sh @@ -1372,8 +1372,10 @@ main() { if [ "$install_node" = true ]; then safe_run install_node "Node.js installation failed" fi - safe_run prepare_user "Failed to prepare user permission." + safe_run permission_barrier "Permission validation failed — aborting install" + + safe_run prepare_user "Failed to prepare user permission." safe_run download_mcsm "Failed to acquire MCSManager source" safe_run mcsm_install_prepare "Error while preparing for installation" From d2911e682b46bd206cdee2c013958fa65f8bd634 Mon Sep 17 00:00:00 2001 From: KevinLu Date: Sat, 18 Oct 2025 01:24:46 -0400 Subject: [PATCH 294/338] fix: use restart than start --- setup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.sh b/setup.sh index 79b397e..469b21a 100644 --- a/setup.sh +++ b/setup.sh @@ -1141,7 +1141,7 @@ extract_component_info() { local daemon_config_path="${daemon_path}/${daemon_key_config_subpath}" cprint cyan bold "Starting daemon service..." - if systemctl start "$daemon_service"; then + if systemctl restart "$daemon_service"; then cprint green "Daemon service started." sleep 1 # Allow service to init and write configs @@ -1176,7 +1176,7 @@ extract_component_info() { local web_config_path="${web_path}/${web_port_config_subpath}" cprint cyan bold "Starting web service..." - if systemctl start "$web_service"; then + if systemctl restart "$web_service"; then cprint green "Web service started." sleep 1 # Allow time to populate config From e2888e140c48eec3acbf8d15a5ee81482409186e Mon Sep 17 00:00:00 2001 From: SkyKingPX Date: Thu, 23 Oct 2025 15:16:36 +0200 Subject: [PATCH 295/338] Added MC 1.21.10 & Updated Versions --- market.json | 281 +++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 244 insertions(+), 37 deletions(-) diff --git a/market.json b/market.json index 4c507a0..2b4c954 100644 --- a/market.json +++ b/market.json @@ -206,6 +206,29 @@ } } }, + { + "platform": "ALL", + "language": "zh_cn", + "gameType": "Minecraft", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "description": "Paper Minecraft 1.21.10 快速开服,性能强,占用少,支持插件,不支持模组", + "title": "[PaperMC] Minecraft 1.21.10 快速开服", + "category": "mc-paper", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "100MB", + "remark": "仅包含 Paper 版本", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.10/builds/84/downloads/paper-1.21.10-84.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java/paper", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.10-84.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "platform": "ALL", "language": "zh_cn", @@ -218,11 +241,11 @@ "hardware": "RAM 8G+", "size": "100MB", "remark": "仅包含 Paper 版本", - "targetLink": "https://fill-data.papermc.io/v1/objects/d310c61899acc608b683515c5c7ef929774bfd1b90262dac965e76c7e9ea8d22/paper-1.21.8-30.jar", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.8/builds/60/downloads/paper-1.21.8-60.jar", "author": "papermc.io", "setupInfo": { "type": "minecraft/java/paper", - "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.8-30.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.8-60.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -234,18 +257,18 @@ "language": "zh_cn", "gameType": "Minecraft", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "description": "Paper Minecraft 1.20.1 快速开服,性能强,占用少,支持插件,不支持模组", - "title": "[PaperMC] Minecraft 1.20.1 快速开服", + "description": "Paper Minecraft 1.21.1 快速开服,性能强,占用少,支持插件,不支持模组", + "title": "[PaperMC] Minecraft 1.21.1 快速开服", "category": "mc-paper", "runtime": "Java 21+", "hardware": "RAM 8G+", "size": "100MB", "remark": "仅包含 Paper 版本", - "targetLink": "https://fill-data.papermc.io/v1/objects/234a9b32098100c6fc116664d64e36ccdb58b5b649af0f80bcccb08b0255eaea/paper-1.20.1-196.jar", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.1/builds/133/downloads/paper-1.21.1-133.jar", "author": "papermc.io", "setupInfo": { "type": "minecraft/java/paper", - "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.20.1-196.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.1-133.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -457,6 +480,29 @@ } }, + { + "platform": "ALL", + "language": "en_us", + "gameType": "Minecraft", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "description": "Minecraft 1.21.10 Paper Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support", + "title": "[PaperMC] Minecraft 1.21.10", + "category": "mc-paper", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "100MB", + "remark": "Minecraft Paper", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.10/builds/84/downloads/paper-1.21.10-84.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java/paper", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.10-84.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "platform": "ALL", "language": "en_us", @@ -469,7 +515,7 @@ "hardware": "RAM 8G+", "size": "100MB", "remark": "Minecraft Paper", - "targetLink": "https://fill-data.papermc.io/v1/objects/8de7c52c3b02403503d16fac58003f1efef7dd7a0256786843927fa92ee57f1e/paper-1.21.8-60.jar", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.8/builds/60/downloads/paper-1.21.8-60.jar", "author": "papermc.io", "setupInfo": { "type": "minecraft/java/paper", @@ -508,18 +554,18 @@ "language": "en_us", "gameType": "Minecraft", "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", - "description": "Minecraft 1.20.1 Paper Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support", - "title": "[PaperMC] Minecraft 1.20.1", + "description": "Minecraft 1.21.1 Paper Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support", + "title": "[PaperMC] Minecraft 1.21.1", "category": "mc-paper", "runtime": "Java 21+", "hardware": "RAM 8G+", "size": "100MB", "remark": "Minecraft Paper", - "targetLink": "https://fill-data.papermc.io/v1/objects/234a9b32098100c6fc116664d64e36ccdb58b5b649af0f80bcccb08b0255eaea/paper-1.20.1-196.jar", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.1/builds/133/downloads/paper-1.21.1-133.jar", "author": "papermc.io", "setupInfo": { "type": "minecraft/java/paper", - "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.20.1-196.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.1-133.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -527,6 +573,29 @@ } }, + { + "platform": "ALL", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "gameType": "Minecraft", + "description": "Minecraft 1.21.10 Purpur Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support", + "title": "[PurpurMC] Minecraft 1.21.10", + "category": "mc-purpur", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "55MB", + "remark": "Minecraft Purpur", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.10-2511-experimental.jar", + "author": "purpurmc.org", + "setupInfo": { + "type": "minecraft/java/purpur", + "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.10-2511-experimental.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "platform": "ALL", "language": "en_us", @@ -539,11 +608,11 @@ "hardware": "RAM 8G+", "size": "55MB", "remark": "Minecraft Purpur", - "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.8-2496.jar", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.8-2497.jar", "author": "purpurmc.org", "setupInfo": { "type": "minecraft/java/purpur", - "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.8-2496.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.8-2497.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -574,6 +643,52 @@ } }, + { + "platform": "Linux", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp", + "gameType": "Minecraft", + "description": "Minecraft 1.21.10 Forge Quick Server Setup, Mod Support for Linux", + "title": "[Forge] Minecraft 1.21.10", + "category": "mc-forge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.10-60.0.11/forge-1.21.10-60.0.11-installer.jar", + "author": "minecraftforge.net", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.21.10-60.0.11-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "Windows", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp", + "gameType": "Minecraft", + "description": "Minecraft 1.21.10 Forge Quick Server Setup, Mod Support for Windows", + "title": "[Forge] Minecraft 1.21.10", + "category": "mc-forge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.10-60.0.11/forge-1.21.10-60.0.11-installer.jar", + "author": "minecraftforge.net", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": ".\\run.bat", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.21.10-60.0.11-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "platform": "Linux", "language": "en_us", @@ -586,13 +701,13 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.8-58.1.4/forge-1.21.8-58.1.4-installer.jar", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.8-58.1.7/forge-1.21.8-58.1.7-installer.jar", "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar forge-1.21.8-58.1.4-installer.jar --installServer", + "updateCommand": "java -jar forge-1.21.8-58.1.7-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -609,13 +724,13 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.8-58.1.4/forge-1.21.8-58.1.4-installer.jar", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.8-58.1.7/forge-1.21.8-58.1.7-installer.jar", "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", "startCommand": ".\\run.bat", "stopCommand": "stop", - "updateCommand": "java -jar forge-1.21.8-58.1.4-installer.jar --installServer", + "updateCommand": "java -jar forge-1.21.8-58.1.7-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -632,13 +747,13 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.4-54.1.7/forge-1.21.4-54.1.7-installer.jar", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.4-54.1.8/forge-1.21.4-54.1.8-installer.jar", "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar forge-1.21.4-54.1.7-installer.jar --installServer", + "updateCommand": "java -jar forge-1.21.4-54.1.8-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -655,13 +770,13 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.4-54.1.7/forge-1.21.4-54.1.7-installer.jar", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.4-54.1.8/forge-1.21.4-54.1.8-installer.jar", "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", "startCommand": ".\\run.bat", "stopCommand": "stop", - "updateCommand": "java -jar forge-1.21.4-54.1.7-installer.jar --installServer", + "updateCommand": "java -jar forge-1.21.4-54.1.8-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -678,13 +793,13 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.1-52.1.3/forge-1.21.1-52.1.3-installer.jar", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.1-52.1.6/forge-1.21.1-52.1.6-installer.jar", "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar forge-1.21.1-52.1.3-installer.jar --installServer", + "updateCommand": "java -jar forge-1.21.1-52.1.6-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -701,18 +816,64 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.1-52.1.3/forge-1.21.1-52.1.3-installer.jar", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.1-52.1.6/forge-1.21.1-52.1.6-installer.jar", "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", "startCommand": ".\\run.bat", "stopCommand": "stop", - "updateCommand": "java -jar forge-1.21.1-52.1.3-installer.jar --installServer", + "updateCommand": "java -jar forge-1.21.1-52.1.6-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } }, + { + "platform": "Linux", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "gameType": "Minecraft", + "description": "Minecraft 1.21.10 NeoForge Quick Server Setup, Mod Support for Linux", + "title": "[NeoForge] Minecraft 1.21.10", + "category": "mc-neoforge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft NeoForge", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.10.32-beta/neoforge-21.10.32-beta-installer.jar", + "author": "neoforged.net", + "setupInfo": { + "type": "minecraft/java/neoforge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar neoforge-21.10.32-beta-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "Windows", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "gameType": "Minecraft", + "description": "Minecraft 1.21.10 NeoForge Quick Server Setup, Mod Support for Windows", + "title": "[NeoForge] Minecraft 1.21.10", + "category": "mc-neoforge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft NeoForge", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.10.32-beta/neoforge-21.10.32-beta-installer.jar", + "author": "neoforged.net", + "setupInfo": { + "type": "minecraft/java/neoforge", + "startCommand": ".\\run.bat", + "stopCommand": "stop", + "updateCommand": "java -jar neoforge-21.10.32-beta-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "platform": "Linux", "language": "en_us", @@ -725,13 +886,13 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft NeoForge", - "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.8.47/neoforge-21.8.47-installer.jar", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.8.48/neoforge-21.8.48-installer.jar", "author": "neoforged.net", "setupInfo": { "type": "minecraft/java/neoforge", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar neoforge-21.8.47-installer.jar --installServer", + "updateCommand": "java -jar neoforge-21.8.48-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -748,13 +909,13 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft NeoForge", - "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.8.47/neoforge-21.8.47-installer.jar", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.8.48/neoforge-21.8.48-installer.jar", "author": "neoforged.net", "setupInfo": { "type": "minecraft/java/neoforge", "startCommand": ".\\run.bat", "stopCommand": "stop", - "updateCommand": "java -jar neoforge-21.8.47-installer.jar --installServer", + "updateCommand": "java -jar neoforge-21.8.48-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -771,13 +932,13 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft NeoForge", - "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.4.154/neoforge-21.4.154-installer.jar", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.4.155/neoforge-21.4.155-installer.jar", "author": "neoforged.net", "setupInfo": { "type": "minecraft/java/neoforge", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar neoforge-21.4.154-installer.jar --installServer", + "updateCommand": "java -jar neoforge-21.4.155-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -794,13 +955,13 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft NeoForge", - "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.4.154/neoforge-21.4.154-installer.jar", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.4.155/neoforge-21.4.155-installer.jar", "author": "neoforged.net", "setupInfo": { "type": "minecraft/java/neoforge", "startCommand": ".\\run.bat", "stopCommand": "stop", - "updateCommand": "java -jar neoforge-21.4.154-installer.jar --installServer", + "updateCommand": "java -jar neoforge-21.4.155-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -817,13 +978,13 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft NeoForge", - "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.1.209/neoforge-21.1.209-installer.jar", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.1.213/neoforge-21.1.213-installer.jar", "author": "neoforged.net", "setupInfo": { "type": "minecraft/java/neoforge", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar neoforge-21.1.209-installer.jar --installServer", + "updateCommand": "java -jar neoforge-21.1.213-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -840,18 +1001,41 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft NeoForge", - "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.1.209/neoforge-21.1.209-installer.jar", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.1.213/neoforge-21.1.213-installer.jar", "author": "neoforged.net", "setupInfo": { "type": "minecraft/java/neoforge", "startCommand": ".\\run.bat", "stopCommand": "stop", - "updateCommand": "java -jar neoforge-21.1.209-installer.jar --installServer", + "updateCommand": "java -jar neoforge-21.1.213-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } }, + { + "platform": "ALL", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "gameType": "Minecraft", + "description": "Minecraft 1.21.10 Fabric Quick Server Setup, Mod Support", + "title": "[FabricMC] Minecraft 1.21.10", + "category": "mc-fabric", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "5MB", + "remark": "Minecraft Fabric", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar", + "author": "fabricmc.net", + "setupInfo": { + "type": "minecraft/java/fabric", + "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", + "stopCommand": "stop", + "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.21.10 -downloadMinecraft -noprofile", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "platform": "ALL", "language": "en_us", @@ -922,6 +1106,29 @@ } }, + { + "platform": "ALL", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "gameType": "Minecraft", + "description": "Standard Vanilla Minecraft 1.21.10 Server Setup (Official) - No Mod/Plugin Support", + "title": "[Vanilla] Minecraft 1.21.10", + "category": "mc-vanilla", + "runtime": "Java 21+", + "hardware": "RAM 2G+", + "size": "55MB", + "remark": "Minecraft Java", + "targetLink": "https://piston-data.mojang.com/v1/objects/95495a7f485eedd84ce928cef5e223b757d2f764/server.jar", + "author": "Mojang Studios", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "platform": "ALL", "language": "en_us", From 09c55c52e8bfc1d201d4832b3a420e62fb71381b Mon Sep 17 00:00:00 2001 From: yumao233 Date: Sat, 8 Nov 2025 16:42:37 +0800 Subject: [PATCH 296/338] chore: sync script --- setup.sh | 347 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 182 insertions(+), 165 deletions(-) diff --git a/setup.sh b/setup.sh index daa248e..469b21a 100644 --- a/setup.sh +++ b/setup.sh @@ -1,11 +1,27 @@ #!/bin/bash -# Official installation script. - -mcsmanager_install_path="/opt/mcsmanager" -mcsmanager_download_addr="https://github.com/MCSManager/MCSManager/releases/latest/download/mcsmanager_linux_release.tar.gz" +# Official MCSManager installation script. +# This script installs or updates the MCSManager Web and/or Daemon to the latest version. +# ------------------------------------------------------------------------------ +# Supported Linux distributions: +# This script supports the following mainstream Linux distributions: +# - Ubuntu: 18.04, 20.04, 22.04, 24.04 +# - Debian: 10, 11, 12, 13 +# - CentOS: 7, 8 Stream, 9 Stream, 10 Stream +# - RHEL: 7, 8, 9, 10 +# - Arch Linux: Support planned (TBD) +# ------------------------------------------------------------------------------ + +# Target installation directory (can be overridden with --install-dir) +install_dir="/opt/mcsmanager" + +# Primary download URL bas. Full package URL = download_base_url + package_name +download_base_url="https://github.com/MCSManager/MCSManager/releases/latest/download/" + +# Fallback download URL (can also be a local directory or mirror) +download_fallback_url="https://github.com/MCSManager/MCSManager/releases/latest/download/" + +# Name of the release package to download/detect package_name="mcsmanager_linux_release.tar.gz" -node="v20.12.2" -arch=$(uname -m) # Node.js version to be installed # Keep the leading "v" @@ -83,7 +99,18 @@ supported_os["CentOS"]="7 8 8-stream 9-stream 10-stream" supported_os["RHEL"]="7 8 9 10" supported_os["Arch"]="rolling" -printf "\033c" +# Required system commands for installation +# These will be checked before logic process +required_commands=( + chmod + chown + wget + tar + stat + useradd + usermod + date +) # Node.js related sections # Enable strict version checking (exact match) @@ -154,11 +181,22 @@ safe_run() { fi } -# script info -echo_cyan "+---------------------------------------------------------------------- -| MCSManager Installer -+---------------------------------------------------------------------- -" +# Function to ensure the script is run as root +check_root() { + # Using Bash's built-in EUID variable + if [ -n "$EUID" ]; then + if [ "$EUID" -ne 0 ]; then + cprint red "Error: This script must be run as root. Please use sudo or switch to the root user." + exit 1 + fi + else + # Fallback to using id -u if EUID is unavailable (e.g., non-Bash shell or misconfigured environment) + if [ "$(id -u)" -ne 0 ]; then + cprint red "Error: This script must be run as root. Please use sudo or switch to the root user." + exit 1 + fi + fi +} # Function to check whether current terminal support color & style detect_terminal_capabilities() { @@ -489,68 +527,90 @@ check_required_commands() { return 0 } - rm -irf "$node_install_path" - - cd /opt || Red_Error "[x] Failed to enter /opt" - - rm -rf "node-$node-linux-$arch.tar.gz" +# Print with specified color and style, fallback to RESET if not supported. +# Supported colors*: black|red|green|yellow|blue|magenta|cyan|white +# Supported styles*: bold|underline|italic|clear_line|strikethrough +# *Note: some style may not necessarily work on all terminals. +# Example usage: +# cprint green bold "Installation completed successfully." +# cprint red underline "Failed to detect required command: wget" +# cprint yellow "Warning: Disk space is low." +# cprint underline "Failed to detect required command: wget" +# cprint bold green underline"Installation completed successfully." + +cprint() { + local color="" + local text="" + local styles="" + local disable_prefix=false + local disable_newline=false + + while [[ $# -gt 1 ]]; do + case "$1" in + black|red|green|yellow|blue|magenta|cyan|white) + color="$1" + ;; + bold|underline|italic|clear_line|strikethrough) + styles+="${STYLES[$1]}" + ;; + noprefix) + disable_prefix=true + ;; + nonl) + disable_newline=true + ;; + esac + shift + done - wget "https://nodejs.org/dist/$node/node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to download node release" + text="$1" - tar -zxf "node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to untar node" + local prefix_text="" + if [[ "$disable_prefix" != true ]]; then + local timestamp="[$(date +%H:%M:%S)]" + local label="[MCSM Installer]" + prefix_text="${FG_COLORS[white]}$timestamp $label${RESET} " + fi - rm -rf "node-$node-linux-$arch.tar.gz" + local prefix="" + if [[ -n "$color" && "$SUPPORTS_COLOR" = true ]]; then + prefix+="${FG_COLORS[$color]}" + fi + if [[ "$SUPPORTS_STYLE" = true || "$styles" == *"${STYLES[clear_line]}"* ]]; then + prefix="$styles$prefix" + fi - if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then - echo_green "Success" + if [[ "$disable_newline" == true ]]; then + printf "%b%b%s%b" "$prefix_text" "$prefix" "$text" "$RESET" else - Red_Error "[x] Node installation failed!" + printf "%b%b%s%b\n" "$prefix_text" "$prefix" "$text" "$RESET" fi - - echo - echo_yellow "=============== Node.JS Version ===============" - echo_yellow " node: $("$node_install_path"/bin/node -v)" - echo_yellow " npm: v$(env "$node_install_path"/bin/node "$node_install_path"/bin/npm -v)" - echo_yellow "=============== Node.JS Version ===============" - echo - - sleep 3 } -Install_MCSManager() { - echo_cyan "[+] Install MCSManager..." - - # stop service - systemctl disable --now mcsm-{web,daemon} - - # delete service - rm -rf /etc/systemd/system/mcsm-{daemon,web}.service - systemctl daemon-reload - mkdir -p "${mcsmanager_install_path}" || Red_Error "[x] Failed to create ${mcsmanager_install_path}" - # cd /opt/mcsmanager - cd "${mcsmanager_install_path}" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}" - # download MCSManager release - wget "${mcsmanager_download_addr}" -O "${package_name}" || Red_Error "[x] Failed to download MCSManager" - tar -zxf ${package_name} -o || Red_Error "[x] Failed to untar ${package_name}" - rm -rf "${mcsmanager_install_path}/${package_name}" - - # compatible with tar.gz packages of different formats - if [ -d "/opt/mcsmanager/mcsmanager" ]; then - cp -rf /opt/mcsmanager/mcsmanager/* /opt/mcsmanager/ - rm -rf /opt/mcsmanager/mcsmanager +# Permission check before proceed with installation +permission_barrier() { + if [[ "$web_installed" == false && "$daemon_installed" == false ]]; then + cprint cyan "No components currently installed — skipping permission check." + return 0 fi - # echo "[→] cd daemon" - cd "${mcsmanager_install_path}/daemon" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/daemon" + for component in web daemon; do + local is_installed_var="${component}_installed" + local installed_user_var="${component}_installed_user" - echo_cyan "[+] Install MCSManager-Daemon dependencies..." - env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${mcsmanager_install_path}/daemon" + if [[ "${!is_installed_var}" == true ]]; then + local installed_user="${!installed_user_var}" - # echo "[←] cd .." - cd "${mcsmanager_install_path}/web" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/web" + # Step 0: Ensure installed user is detected + if [[ -z "$installed_user" ]]; then + cprint red bold "Detected that '$component' is installed but could not determine the user from its systemd service file." + cprint red "This may indicate a custom or unsupported service file setup." + cprint red "Refusing to proceed to avoid potential conflicts." + exit 1 + fi # Step 1: User match check with optional force override if [[ "$installed_user" != "$install_user" ]]; then @@ -574,15 +634,14 @@ Install_MCSManager() { fi done - echo - echo_yellow "=============== MCSManager ===============" - echo_green "Daemon: ${mcsmanager_install_path}/daemon" - echo_green "Web: ${mcsmanager_install_path}/web" - echo_yellow "=============== MCSManager ===============" - echo - echo_green "[+] MCSManager installation success!" + # Step 2: Directory ownership check + local dir_owner + dir_owner=$(stat -c '%U' "$install_dir" 2>/dev/null) - chmod -R 755 "$mcsmanager_install_path" + if [[ -z "$dir_owner" ]]; then + cprint red bold "Unable to determine owner of install_dir: $install_dir" + exit 1 + fi if [[ "$dir_owner" != "$install_user" ]]; then if [[ "$force_permission" == true ]]; then @@ -607,8 +666,6 @@ Install_MCSManager() { return 0 } -Create_Service() { - echo_cyan "[+] Create MCSManager service..." # Map OS arch with actual Node.js Arch name @@ -1050,113 +1107,73 @@ Description=MCSManager-${component^} After=network.target [Service] -WorkingDirectory=${mcsmanager_install_path}/daemon -ExecStart=${node_install_path}/bin/node app.js -ExecReload=/bin/kill -s QUIT \$MAINPID -ExecStop=/bin/kill -s QUIT \$MAINPID -Environment=\"PATH=${PATH}\" +Type=simple +WorkingDirectory=${working_dir} +ExecStart=${exec} +ExecReload=/bin/kill -s HUP \$MAINPID +ExecStop=/bin/kill -s TERM \$MAINPID +Restart=on-failure +User=${install_user} +Environment="PATH=${PATH}" +Environment="NODE_ENV=production" [Install] WantedBy=multi-user.target -" >/etc/systemd/system/mcsm-daemon.service +EOF - echo "[Unit] -Description=MCSManager-Web - -[Service] -WorkingDirectory=${mcsmanager_install_path}/web -ExecStart=${node_install_path}/bin/node app.js -ExecReload=/bin/kill -s QUIT \$MAINPID -ExecStop=/bin/kill -s QUIT \$MAINPID -Environment=\"PATH=${PATH}\" + if [[ $? -ne 0 ]]; then + cprint red bold "Failed to write service file: $service_path" + cleanup_install_tmp + return 1 + fi -[Install] -WantedBy=multi-user.target -" >/etc/systemd/system/mcsm-web.service - - systemctl daemon-reload - systemctl enable --now mcsm-{daemon,web}.service - echo_green "Registered!" - - sleep 2 - - printf "\n\n\n\n" - - echo_yellow "==================================================================" - echo_green "Installation is complete! Welcome to the MCSManager!!!" - echo_yellow " " - echo_cyan_n "HTTP Web Service: " - echo_yellow "http://:23333 (Browser)" - echo_cyan_n "Daemon Address: " - echo_yellow "ws://:24444 (Cluster)" - echo_red "You must expose ports " - echo_yellow "23333" - echo_red " and " - echo_yellow "24444" - echo_red " to use the service properly on the Internet." - echo_yellow " " - echo_cyan "Usage:" - echo_cyan "systemctl start mcsm-{daemon,web}.service" - echo_cyan "systemctl stop mcsm-{daemon,web}.service" - echo_cyan "systemctl restart mcsm-{daemon,web}.service" - echo_yellow " " - echo_green "Official Document: https://docs.mcsmanager.com/" - echo_yellow "==================================================================" + chmod 644 "$service_path" + cprint green "Created systemd unit: $service_path" + return 0 } -# Environmental inspection -if [[ "$arch" == x86_64 ]]; then - arch=x64 - #echo "[-] x64 architecture detected" -elif [[ $arch == aarch64 ]]; then - arch=arm64 - #echo "[-] 64-bit ARM architecture detected" -elif [[ $arch == arm ]]; then - arch=armv7l - #echo "[-] 32-bit ARM architecture detected" -elif [[ $arch == ppc64le ]]; then - arch=ppc64le - #echo "[-] IBM POWER architecture detected" -elif [[ $arch == s390x ]]; then - arch=s390x - #echo "[-] IBM LinuxONE architecture detected" -else - Red_Error "[x] Sorry, this architecture is not supported yet!\n[x]Please try to install manually: https://github.com/MCSManager/MCSManager#linux" -fi +# Extract daemon key and/or http port +extract_component_info() { + # DAEMON SECTION + if [[ "$install_daemon" == true ]]; then + local daemon_service="mcsm-daemon.service" + local daemon_path="${install_dir}/daemon" + local daemon_config_path="${daemon_path}/${daemon_key_config_subpath}" cprint cyan bold "Starting daemon service..." if systemctl restart "$daemon_service"; then cprint green "Daemon service started." -# Check network connection -echo_cyan "[-] Architecture: $arch" - -# Install related software -echo_cyan_n "[+] Installing dependent software (git, tar, wget)... " -if [[ -x "$(command -v yum)" ]]; then - yum install -y git tar wget -elif [[ -x "$(command -v apt-get)" ]]; then - apt-get install -y git tar wget -elif [[ -x "$(command -v pacman)" ]]; then - pacman -S --noconfirm --needed git tar wget -elif [[ -x "$(command -v zypper)" ]]; then - zypper --non-interactive install git tar wget -else - echo_red "[!] Cannot find your package manager! You may need to install git, tar and wget manually!" -fi - -# Determine whether the relevant software is installed successfully -if [[ -x "$(command -v git)" && -x "$(command -v tar)" && -x "$(command -v wget)" ]]; then - echo_green "Success" -else - Red_Error "[x] Failed to find git, tar and wget, please install them manually!" -fi - -# Install the Node environment -Install_Node - -# Install MCSManager -Install_MCSManager + sleep 1 # Allow service to init and write configs + + if [[ -f "$daemon_config_path" ]]; then + daemon_key=$(grep -oP '"key"\s*:\s*"\K[^"]+' "$daemon_config_path") + daemon_port=$(grep -oP '"port"\s*:\s*\K[0-9]+' "$daemon_config_path") + + if [[ -n "$daemon_key" ]]; then + cprint green "Extracted daemon key: $daemon_key" + else + cprint red "Failed to extract daemon key from: $daemon_config_path" + fi + + if [[ -n "$daemon_port" ]]; then + cprint green "Extracted daemon port: $daemon_port" + else + cprint red "Failed to extract daemon port from: $daemon_config_path" + fi + else + cprint red "Daemon config file not found: $daemon_config_path" + fi + else + cprint red bold "Failed to start daemon service: $daemon_service" + fi + fi + + # WEB SECTION + if [[ "$install_web" == true ]]; then + local web_service="mcsm-web.service" + local web_path="${install_dir}/web" + local web_config_path="${web_path}/${web_port_config_subpath}" cprint cyan bold "Starting web service..." if systemctl restart "$web_service"; then @@ -1365,4 +1382,4 @@ main() { safe_run install_mcsm "Failed to install MCSManager" } -main "$@" +main "$@" \ No newline at end of file From 73255711cca23ad50ce4dfc19cc2fcd45d2388f5 Mon Sep 17 00:00:00 2001 From: yumao233 Date: Sat, 8 Nov 2025 16:46:34 +0800 Subject: [PATCH 297/338] chore: sync script --- setup_cn.sh | 1520 ++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 1330 insertions(+), 190 deletions(-) diff --git a/setup_cn.sh b/setup_cn.sh index e7ec82b..30955f4 100644 --- a/setup_cn.sh +++ b/setup_cn.sh @@ -1,245 +1,1385 @@ #!/bin/bash -# This script file is specifically designed for the Chinese region, and servers in the Chinese region are used to accelerate file downloads. +# Official MCSManager installation script. +# This script installs or updates the MCSManager Web and/or Daemon to the latest version. +# ------------------------------------------------------------------------------ +# Supported Linux distributions: +# This script supports the following mainstream Linux distributions: +# - Ubuntu: 18.04, 20.04, 22.04, 24.04 +# - Debian: 10, 11, 12, 13 +# - CentOS: 7, 8 Stream, 9 Stream, 10 Stream +# - RHEL: 7, 8, 9, 10 +# - Arch Linux: Support planned (TBD) +# ------------------------------------------------------------------------------ -mcsmanager_install_path="/opt/mcsmanager" -mcsmanager_download_addr="https://download.mcsmanager.com/mcsmanager_linux_release.tar.gz" +# Target installation directory (can be overridden with --install-dir) +install_dir="/opt/mcsmanager" + +# Primary download URL bas. Full package URL = download_base_url + package_name +download_base_url="https://download.mcsmanager.com/" + +# Fallback download URL (can also be a local directory or mirror) +download_fallback_url="https://download.mcsmanager.com/" + +# Name of the release package to download/detect package_name="mcsmanager_linux_release.tar.gz" -node="v20.12.2" -arch=$(uname -m) -if [ "$(id -u)" -ne 0 ]; then - echo "此脚本必须以 root 身份运行,请使用“sudo bash”代替" - exit 1 -fi +# Node.js version to be installed +# Keep the leading "v" +node_version="v20.12.2" + +# Node download base URL - primary +node_download_url_base="https://nodejs.org/dist/" + +# Node download URL - fallback. +# This is the URL points directly to the file, not the base. This can also be a local absolute path. +# Only supports https:// or http:// for web locations. +node_download_fallback="" + +# Node.js installation path (defaults to the MCSManager installation path. Can be overridden with --node-install-dir) +node_install_dir="$install_dir" + +# Temp dir for file extraction +tmp_dir="/tmp" + +# Bypass installed user permission check, override by --force-permission +force_permission=false + + +# --------------- Global Variables ---------------# +# DO NOT MODIFY # + + +# Component installation options. +# For fresh installs, both daemon and web components are installed by default. +# For updates, behavior depends on detected existing components. +# Can be overridden with --install daemon/web/all +install_daemon=true +install_web=true + +# Install MCSM as (default: root). +# To install as a general user (e.g., "mcsm"), use the --user option: --user mcsm +# To ensure compatibility, only user mcsm is supported. +install_user="root" +# Installed user, for permission check +web_installed=false +daemon_installed=false +web_installed_user="" +daemon_installed_user="" + +# Service file locations +# the final dir = systemd_file + {web/daemon} + ".service" +systemd_file="/etc/systemd/system/mcsm-" +# Optional: Override the default installation source file. +# If --install-source is specified, the installer will use the provided +# "mcsmanager_linux_release.tar.gz" file instead of downloading it. +# Only support local absolute path. +install_source_path="" + +# temp path for extracted file(s) +install_tmp_dir="/opt/mcsmanager/mcsm_abcd" + +# dir name for data dir backup +# e.g. /opt/mcsmanager/daemon/data -> /opt/mcsmanager/data_bak_data +# only valid for when during an update +backup_prefix="data_bak_" + +# System architecture (detected automatically) +arch="" +version="" +distro="" -printf "\033c" -echo_cyan() { - printf '\033[1;36m%b\033[0m\n' "$@" + +# Supported OS versions (map-style structure) +# Format: supported_os["distro_name"]="version1 version2 version3 ..." +declare -A supported_os +supported_os["Ubuntu"]="18 20 22 24" +supported_os["Debian"]="10 11 12 13" +supported_os["CentOS"]="7 8 8-stream 9-stream 10-stream" +supported_os["RHEL"]="7 8 9 10" +supported_os["Arch"]="rolling" + +# Required system commands for installation +# These will be checked before logic process +required_commands=( + chmod + chown + wget + tar + stat + useradd + usermod + date +) + +# Node.js related sections +# Enable strict version checking (exact match) +# enabled -> strict requriement for defined node version +# false -> newer version allowed +# Older version is NEVER allowed +strict_node_version_check=true + +# Will be set based on actual node status +install_node=true +# Remove leading "v" from defined version +required_node_ver="${node_version#v}" + +# Holds absolute path for node & npm +node_bin_path="" +npm_bin_path="" +# Hold Node.js arch name, e.g. x86_64 -> x64 +node_arch="" +# Hold Node.js intallation path, e.g. ${node_install_dir}/node-${node_version}-linux-${arch} +node_path="" + +# For installation result +daemon_key="" +daemon_port="" +web_port="" +daemon_key_config_subpath="data/Config/global.json" +web_port_config_subpath="data/SystemConfig/config.json" + +# Terminal color & style related +# Default to false, auto check later +SUPPORTS_COLOR=false +SUPPORTS_STYLE=false +# Declare ANSI reset +RESET="\033[0m" + +# Foreground colors +declare -A FG_COLORS=( + [black]="\033[0;30m" + [red]="\033[0;31m" + [green]="\033[0;32m" + [yellow]="\033[0;33m" + [blue]="\033[0;34m" + [magenta]="\033[0;35m" + [cyan]="\033[0;36m" + [white]="\033[0;37m" +) + +# Font styles +declare -A STYLES=( + [bold]="\033[1m" + [underline]="\033[4m" + [italic]="\033[3m" # Often ignored + [clear_line]="\r\033[2K" + [strikethrough]="\033[9m" +) + + +### Helper Functions +# Execution wrapper, avoid unexpected crashes. +safe_run() { + local func="$1" + local err_msg="$2" + shift 2 + + if ! "$func" "$@"; then + echo "Error: $err_msg" + exit 1 + fi } -echo_red() { - printf '\033[1;31m%b\033[0m\n' "$@" + +# Function to ensure the script is run as root +check_root() { + # Using Bash's built-in EUID variable + if [ -n "$EUID" ]; then + if [ "$EUID" -ne 0 ]; then + cprint red "Error: This script must be run as root. Please use sudo or switch to the root user." + exit 1 + fi + else + # Fallback to using id -u if EUID is unavailable (e.g., non-Bash shell or misconfigured environment) + if [ "$(id -u)" -ne 0 ]; then + cprint red "Error: This script must be run as root. Please use sudo or switch to the root user." + exit 1 + fi + fi } -echo_green() { - printf '\033[1;32m%b\033[0m\n' "$@" + +# Function to check whether current terminal support color & style +detect_terminal_capabilities() { + SUPPORTS_COLOR=false + SUPPORTS_STYLE=false + + if [ -t 1 ] && command -v tput >/dev/null 2>&1; then + if [ "$(tput colors)" -ge 8 ]; then + SUPPORTS_COLOR=true + fi + if tput bold >/dev/null 2>&1 && tput smul >/dev/null 2>&1; then + SUPPORTS_STYLE=true + fi + fi + + if [ "$SUPPORTS_COLOR" = true ]; then + cprint green "[OK] Terminal supports colored output." + else + cprint yellow "Note: Terminal does not support colored output. Continuing without formatting." + fi + + if [ "$SUPPORTS_STYLE" = true ]; then + cprint green "[OK] Terminal supports bold and underline formatting." + else + cprint yellow "Note: Terminal does not support advanced text styles." + fi } -echo_cyan_n() { - printf '\033[1;36m%b\033[0m' "$@" + +# Check whether daemon or web is installed +is_component_installed() { + local component_name="$1" + local component_path="${install_dir}/${component_name}" + + if [[ -d "$component_path" ]]; then + cprint green "Component '$component_name' is already installed at $component_path" + + # Set corresponding global variable + if [[ "$component_name" == "daemon" ]]; then + daemon_installed=true + elif [[ "$component_name" == "web" ]]; then + web_installed=true + fi + + return 0 + else + cprint yellow "Component '$component_name' is not installed" + + # Set corresponding global variable + if [[ "$component_name" == "daemon" ]]; then + daemon_installed=false + elif [[ "$component_name" == "web" ]]; then + web_installed=false + fi + + return 1 + fi } -echo_yellow() { - printf '\033[1;33m%b\033[0m\n' "$@" + +check_component_permission() { + local component="$1" + local service_file="${systemd_file}${component}.service" + + if [[ ! -f "$service_file" ]]; then + cprint yellow "Service file not found: $service_file" + return 0 # nothing changed + fi + + # Extract the User= line if it exists + local user_line + user_line=$(grep -E '^User=' "$service_file" 2>/dev/null | head -1) + + local user + if [[ -z "$user_line" ]]; then + user="root" # default if no User= is defined + else + user="${user_line#User=}" + fi + + # Validate user + if [[ "$user" != "root" && "$user" != "mcsm" ]]; then + cprint red bold "Unsupported user '$user' in $service_file. Expected 'root' or 'mcsm'." + exit 1 + fi + + # Assign to appropriate global + if [[ "$component" == "web" ]]; then + web_installed_user="$user" + elif [[ "$component" == "daemon" ]]; then + daemon_installed_user="$user" + fi + + cprint cyan "Detected $component installed as user: $user" + return 0 } -# script info -echo_cyan "+---------------------------------------------------------------------- -| MCSManager 安装脚本 (MCSManager Installer) -+---------------------------------------------------------------------- -" -Red_Error() { - echo '=================================================' - printf '\033[1;31;40m%b\033[0m\n' "$@" - echo '=================================================' - exit 1 + +parse_args() { + local explicit_install_flag=false + + while [[ $# -gt 0 ]]; do + case "$1" in + --install-dir) + if [[ -n "$2" ]]; then + install_dir="$2" + shift 2 + else + echo "Error: --install-dir requires a path argument." + exit 1 + fi + ;; + --node-install-dir) + if [[ -n "$2" ]]; then + node_install_dir="$2" + shift 2 + else + echo "Error: --node-install-dir requires a path argument." + exit 1 + fi + ;; + --install) + explicit_install_flag=true + if [[ -n "$2" && "$2" != --* ]]; then + case "$2" in + daemon) + install_daemon=true + is_component_installed "daemon" + install_web=false + check_component_permission "daemon" + ;; + web) + install_daemon=false + is_component_installed "web" + install_web=true + check_component_permission "web" + ;; + all) + install_daemon=true + install_web=true + is_component_installed "daemon" + is_component_installed "web" + check_component_permission "daemon" + check_component_permission "web" + ;; + *) + echo "Error: Invalid value for --install. Expected 'daemon', 'web', or 'all'." + echo "Usage: --install daemon|web|all" + exit 1 + ;; + esac + shift 2 + else + echo "Error: --install flag provided but no value. Please specify: daemon, web, or all." + echo "Usage: --install daemon|web|all" + exit 1 + fi + ;; + --user) + if [[ -n "$2" ]]; then + case "$2" in + root) + install_user="root" + ;; + mcsm) + install_user="mcsm" + ;; + *) + echo "Error: Invalid user '$2'. Only 'root' and 'mcsm' are supported." + echo "Usage: --user root|mcsm" + exit 1 + ;; + esac + shift 2 + else + echo "Error: --user requires a value (root or mcsm)." + exit 1 + fi + ;; + --install-source) + if [[ -n "$2" ]]; then + install_source_path="$2" + shift 2 + else + echo "Error: --install-source requires a file path." + exit 1 + fi + ;; + --force-permission) + force_permission=true + shift + ;; + *) + echo "Error: Unknown argument: $1" + exit 1 + ;; + esac + done + + # Auto-detect branch: only run if --install was not explicitly passed + if [[ "$explicit_install_flag" == false ]]; then + daemon_installed=false + web_installed=false + + if is_component_installed "daemon"; then + daemon_installed=true + check_component_permission "daemon" + fi + if is_component_installed "web"; then + web_installed=true + check_component_permission "web" + fi + + # When only one component installed, we wanted to process that one only. + if [[ "$daemon_installed" == true && "$web_installed" == false ]]; then + install_daemon=true + install_web=false + elif [[ "$daemon_installed" == false && "$web_installed" == true ]]; then + install_daemon=false + install_web=true + else + install_daemon=true + install_web=true + fi + fi +} + + +# Get Distribution & Architecture Info +detect_os_info() { + distro="Unknown" + version="Unknown" + arch=$(uname -m) + + # Try primary source + if [ -f /etc/os-release ]; then + . /etc/os-release + distro_id="${ID,,}" + version_id="${VERSION_ID,,}" + + case "$distro_id" in + ubuntu) + distro="Ubuntu" + version="$version_id" + ;; + debian) + distro="Debian" + version="$version_id" + ;; + centos) + distro="CentOS" + version="$version_id" + ;; + rhel*) + distro="RHEL" + version="$version_id" + ;; + arch) + distro="Arch" + version="rolling" + ;; + *) + distro="${ID:-Unknown}" + version="$version_id" + ;; + esac + fi + + # Fallbacks for missing or invalid version + if [[ -z "$version" || "$version" == "unknown" || "$version" == "" ]]; then + if [ -f /etc/issue ]; then + version_guess=$(grep -oP '[0-9]+(\.[0-9]+)*' /etc/issue | head -1) + if [[ -n "$version_guess" ]]; then + version="$version_guess" + fi + fi + fi + + # Normalize version: keep only major version + version_full="$version" + if [[ "$version" =~ ^[0-9]+(\.[0-9]+)*$ ]]; then + version="${version%%.*}" + else + echo "Warning: Could not detect a clean numeric version. Defaulting to unknown." + version="unknown" + fi + + cprint cyan "Detected OS: $distro $version_full" + cprint cyan "Detected Architecture: $arch" +} + + +# Check if current OS is supported +check_supported_os() { + local supported_versions="${supported_os[$distro]}" + + if [[ -z "$supported_versions" ]]; then + echo "Error: Distribution '$distro' is not supported by this installer." + return 1 + fi + + if [[ "$supported_versions" != *"$version"* ]]; then + echo "Error: Version '$version' of '$distro' is not supported." + echo "Supported versions are: $supported_versions" + return 1 + fi + + cprint green "OS compatibility check passed." + return 0 } -Install_Node() { - if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then - echo_green "Node.js version is up-to-date, skipping installation." - return +# Check if all required commands are available +check_required_commands() { + local missing=0 + + for cmd in "${required_commands[@]}"; do + if ! command -v "$cmd" >/dev/null 2>&1; then + echo "Error: Required command '$cmd' is not available in PATH." + missing=1 + fi + done + + if [ "$missing" -ne 0 ]; then + echo "One or more required commands are missing. Please install them and try again." + return 1 fi - echo_cyan "[+] 正在安装 Node.JS..." + cprint green "All required commands are available." + return 0 +} - rm -irf "$node_install_path" +# Print with specified color and style, fallback to RESET if not supported. +# Supported colors*: black|red|green|yellow|blue|magenta|cyan|white +# Supported styles*: bold|underline|italic|clear_line|strikethrough +# *Note: some style may not necessarily work on all terminals. +# Example usage: +# cprint green bold "Installation completed successfully." +# cprint red underline "Failed to detect required command: wget" +# cprint yellow "Warning: Disk space is low." +# cprint underline "Failed to detect required command: wget" +# cprint bold green underline"Installation completed successfully." - cd /opt || Red_Error "[x] 未能进入 /opt 目录" +cprint() { + local color="" + local text="" + local styles="" + local disable_prefix=false + local disable_newline=false - rm -rf "node-$node-linux-$arch.tar.gz" + while [[ $# -gt 1 ]]; do + case "$1" in + black|red|green|yellow|blue|magenta|cyan|white) + color="$1" + ;; + bold|underline|italic|clear_line|strikethrough) + styles+="${STYLES[$1]}" + ;; + noprefix) + disable_prefix=true + ;; + nonl) + disable_newline=true + ;; + esac + shift + done - # wget "https://nodejs.org/dist/$node/node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to download node release" - wget "https://registry.npmmirror.com/-/binary/node/$node/node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to download node release" + text="$1" - tar -zxf "node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to untar node" + local prefix_text="" + if [[ "$disable_prefix" != true ]]; then + local timestamp="[$(date +%H:%M:%S)]" + local label="[MCSM Installer]" + prefix_text="${FG_COLORS[white]}$timestamp $label${RESET} " + fi - rm -rf "node-$node-linux-$arch.tar.gz" + local prefix="" + if [[ -n "$color" && "$SUPPORTS_COLOR" = true ]]; then + prefix+="${FG_COLORS[$color]}" + fi + if [[ "$SUPPORTS_STYLE" = true || "$styles" == *"${STYLES[clear_line]}"* ]]; then + prefix="$styles$prefix" + fi - if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then - echo_green "Success" + if [[ "$disable_newline" == true ]]; then + printf "%b%b%s%b" "$prefix_text" "$prefix" "$text" "$RESET" else - Red_Error "[x] Node.js 安装失败!" + printf "%b%b%s%b\n" "$prefix_text" "$prefix" "$text" "$RESET" + fi +} + + + + +# Permission check before proceed with installation +permission_barrier() { + if [[ "$web_installed" == false && "$daemon_installed" == false ]]; then + cprint cyan "No components currently installed — skipping permission check." + return 0 + fi + + for component in web daemon; do + local is_installed_var="${component}_installed" + local installed_user_var="${component}_installed_user" + + if [[ "${!is_installed_var}" == true ]]; then + local installed_user="${!installed_user_var}" + + # Step 0: Ensure installed user is detected + if [[ -z "$installed_user" ]]; then + cprint red bold "Detected that '$component' is installed but could not determine the user from its systemd service file." + cprint red "This may indicate a custom or unsupported service file setup." + cprint red "Refusing to proceed to avoid potential conflicts." + exit 1 + fi + + # Step 1: User match check with optional force override + if [[ "$installed_user" != "$install_user" ]]; then + if [[ "$force_permission" == true ]]; then + cprint yellow bold "Permission mismatch for '$component':" + cprint yellow "Installed as user: $installed_user" + cprint yellow "Target install user: $install_user" + cprint yellow "User mismatch, but --force-permission is set. Continuing and updating permissions..." + sleep 3 + else + cprint red bold "Permission mismatch for '$component':" + cprint red "Installed as user: $installed_user" + cprint red "Current install target user: $install_user" + cprint red "Unable to proceed due to ownership conflict. Use --force-permission to override and update file permission." + exit 1 + fi + else + cprint green bold "Permission check passed: '$installed_user' matches target user." + fi + + fi + done + + # Step 2: Directory ownership check + local dir_owner + dir_owner=$(stat -c '%U' "$install_dir" 2>/dev/null) + + if [[ -z "$dir_owner" ]]; then + cprint red bold "Unable to determine owner of install_dir: $install_dir" + exit 1 fi - echo - echo_yellow "=============== Node.JS Version ===============" - echo_yellow " node: $("$node_install_path"/bin/node -v)" - echo_yellow " npm: v$(env "$node_install_path"/bin/node "$node_install_path"/bin/npm -v)" - echo_yellow "=============== Node.JS Version ===============" - echo + if [[ "$dir_owner" != "$install_user" ]]; then + if [[ "$force_permission" == true ]]; then + cprint yellow bold "Install directory ownership mismatch:" + cprint yellow " Directory: $install_dir" + cprint yellow " Owned by: $dir_owner" + cprint yellow " Expected: $install_user" + cprint yellow " --force-permission is set. Continuing despite mismatch." + sleep 3 + else + cprint red bold "Install directory ownership mismatch:" + cprint red " Directory: $install_dir" + cprint red " Owned by: $dir_owner" + cprint red " Expected: $install_user" + exit 1 + fi + else + cprint green bold "Install directory ownership check passed: '$install_dir' is owned by '$install_user'." + fi - sleep 3 + cprint green bold "Permissions and ownership validated. Proceeding." + return 0 } -Install_MCSManager() { - echo_cyan "[+] 安装 MCSManager..." - # stop service - systemctl disable --now mcsm-{web,daemon} - # delete service - rm -rf /etc/systemd/system/mcsm-{daemon,web}.service - systemctl daemon-reload +# Map OS arch with actual Node.js Arch name +# This function should be placed after var arch has been assigned a valid value. +resolve_node_arch() { + case "$arch" in + x86_64) + node_arch="x64" + ;; + aarch64) + node_arch="arm64" + ;; + armv7l) + node_arch="armv7l" + ;; + *) + cprint red bold "Unsupported architecture for Node.js: $arch" + return 1 + ;; + esac + + # Assign node_path based on resolved arch and current version/install dir + node_path="${node_install_dir}/node-${node_version}-linux-${node_arch}" + + cprint cyan "Resolved Node.js architecture: $node_arch" + cprint cyan "Node.js install path: $node_path" +} + +# Check if Node.js at PATH is valid. +# This function check Node.js version + NPM (if Node.js valid) +verify_node_at_path() { + local node_path="$1" + node_bin_path="$node_path/bin/node" + npm_bin_path="$node_path/bin/npm" - mkdir -p "${mcsmanager_install_path}" || Red_Error "[x] 未能创建 ${mcsmanager_install_path}" + # Node binary missing + if [ ! -x "$node_bin_path" ]; then + return 1 + fi - # cd /opt/mcsmanager - cd "${mcsmanager_install_path}" || Red_Error "[x] 未能进入 ${mcsmanager_install_path}" + local installed_ver + installed_ver="$("$node_bin_path" -v 2>/dev/null | sed 's/^v//')" - # download MCSManager release - wget "${mcsmanager_download_addr}" -O "${package_name}" || Red_Error "[x] 未能成功下载 MCSManager" - tar -zxf ${package_name} -o || Red_Error "[x] 未能成功解压 ${package_name}" - rm -rf "${mcsmanager_install_path}/${package_name}" + if [[ -z "$installed_ver" ]]; then + return 1 + fi - # compatible with tar.gz packages of different formats - if [ -d "/opt/mcsmanager/mcsmanager" ]; then - cp -rf /opt/mcsmanager/mcsmanager/* /opt/mcsmanager/ - rm -rf /opt/mcsmanager/mcsmanager + if [ "$strict_node_version_check" = true ]; then + if [[ "$installed_ver" != "$required_node_ver" ]]; then + return 3 + fi + else + local cmp + cmp=$(printf "%s\n%s\n" "$required_node_ver" "$installed_ver" | sort -V | head -1) + if [[ "$cmp" != "$required_node_ver" ]]; then + return 2 + fi fi - # echo "[→] cd daemon" - cd "${mcsmanager_install_path}/daemon" || Red_Error "[x] 未能进入 ${mcsmanager_install_path}/daemon" + # Check if npm exists and works using node (not $PATH/npm) + if [ ! -x "$npm_bin_path" ]; then + return 4 + fi - echo_cyan "[+] 正在安装 MCSManager-Daemon 依赖库..." - env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --registry=https://registry.npmmirror.com --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${mcsmanager_install_path}/daemon" + # Use node to run npm.js directly, in case env is broken + local npm_version + npm_version="$("$node_bin_path" "$npm_bin_path" --version 2>/dev/null)" + if [[ -z "$npm_version" ]]; then + return 4 + fi - # echo "[←] cd .." - cd "${mcsmanager_install_path}/web" || Red_Error "[x] 未能进入 ${mcsmanager_install_path}/web" + return 0 +} - echo_cyan "[+] 正在安装 MCSManager-Web 依赖库..." - env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --registry=https://registry.npmmirror.com --production --no-fund --no-audit &>/dev/null || Red_Error "[x] 未能在以下目录使用npm install编译依赖库: ${mcsmanager_install_path}/web" - echo - echo_yellow "=============== MCSManager ===============" - echo_green "Daemon: ${mcsmanager_install_path}/daemon" - echo_green "Web: ${mcsmanager_install_path}/web" - echo_yellow "=============== MCSManager ===============" - echo - echo_green "[+] MCSManager 安装完成!" +# Node.js pre-check. check if we need to install Node.js before installer run. +# Use postcheck_node_after_install() to check after install. +check_node_installed() { + verify_node_at_path "$node_path" + local result=$? - chmod -R 755 "$mcsmanager_install_path" + case $result in + 0) + cprint green bold "Node.js and npm found at $node_path (version $required_node_ver or compatible)" + install_node=false + ;; + 1) + cprint yellow bold "Node.js binary not found or unusable at $node_path" + install_node=true + ;; + 2) + cprint red bold "Node.js version at $node_path is too old. Required: >= $required_node_ver" + install_node=true + ;; + 3) + cprint red bold "Node.js version mismatch. Required: $required_node_ver, found something else." + install_node=true + ;; + 4) + cprint red bold "Node.js is present but npm is missing or broken." + install_node=true + ;; + *) + cprint red bold "Unexpected error in node verification." + install_node=true + ;; + esac +} - sleep 3 +# Node.js post-check. check if Node.js is valid after install. +postcheck_node_after_install() { + verify_node_at_path "$node_path" + if [[ $? -ne 0 ]]; then + cprint red bold "Node.js installation failed or is invalid at $node_path" + return 1 + else + cprint green bold "Node.js is installed and functioning at $node_path" + return 0 + fi } -Create_Service() { - echo_cyan "[+] 创建 MCSManager 面板服务..." +# Install Node.js and check +install_node() { + local archive_name="node-${node_version}-linux-${node_arch}.tar.xz" + local target_dir="${node_install_dir}/node-${node_version}-linux-${node_arch}" + local archive_path="${node_install_dir}/${archive_name}" + local download_url="${node_download_url_base}${node_version}/${archive_name}" + local fallback="$node_download_fallback" - echo "[Unit] -Description=MCSManager-Daemon + cprint cyan bold "Installing Node.js $node_version for arch: $node_arch" -[Service] -WorkingDirectory=${mcsmanager_install_path}/daemon -ExecStart=${node_install_path}/bin/node app.js -ExecReload=/bin/kill -s QUIT \$MAINPID -ExecStop=/bin/kill -s QUIT \$MAINPID -Environment=\"PATH=${PATH}\" + mkdir -p "$node_install_dir" || { + cprint red bold "Failed to create node install directory: $node_install_dir" + return 1 + } -[Install] -WantedBy=multi-user.target -" >/etc/systemd/system/mcsm-daemon.service + # Download + cprint cyan "Downloading Node.js from: $download_url" + if ! wget --progress=bar:force -O "$archive_path" "$download_url"; then + cprint yellow "Primary download failed. Attempting fallback..." + + if [[ -n "$fallback" ]]; then + if [[ "$fallback" =~ ^https?:// ]]; then + cprint cyan "Downloading from fallback URL: $fallback" + if ! wget --progress=bar:force -O "$archive_path" "$fallback"; then + cprint red bold "Fallback download failed from: $fallback" + return 1 + fi + elif [ -f "$fallback" ]; then + cprint cyan "Copying from local fallback: $fallback" + cp "$fallback" "$archive_path" || { + cprint red bold "Failed to copy fallback Node.js archive from $fallback" + return 1 + } + else + cprint red bold "Invalid fallback path: $fallback" + return 1 + fi + else + cprint red bold "No fallback source configured. Cannot proceed." + return 1 + fi + fi - echo "[Unit] -Description=MCSManager-Web + # Extract archive + cprint cyan "Extracting Node.js archive..." + if ! tar -xf "$archive_path" -C "$node_install_dir"; then + cprint red bold "Failed to extract Node.js archive." + return 1 + fi + + chmod -R a+rx "$target_dir" || { + cprint red bold "Failed to set execute permissions on Node.js files." + return 1 + } + + verify_node_at_path "$target_dir" + local result=$? + if [[ $result -ne 0 ]]; then + cprint red bold "Node.js installation failed verification." + return 1 + fi + + cprint cyan "Cleaning up archive..." + rm -f "$archive_path" + + cprint green bold "Node.js $node_version installed successfully at $target_dir" + # Save resolved binary paths to global variables + node_bin_path="${target_dir}/bin/node" + npm_bin_path="${target_dir}/bin/npm" + + cprint green "Node.js binary: $node_bin_path" + cprint green "npm binary: $npm_bin_path" + return 0 +} + +# Function to download MCSM package. fetch from primary URL first, then fallback URL. +# This function only put extracted file(s) into install_dir, it does not perform the actual update. +download_mcsm() { + local archive_name="$package_name" + local archive_path="${tmp_dir}/${archive_name}" + local primary_url="${download_base_url}${archive_name}" + local fallback="$download_fallback_url" + + cprint cyan bold "Downloading MCSManager package..." + + # Step 1: Try downloading from primary URL + if ! wget --progress=bar:force -O "$archive_path" "$primary_url"; then + cprint yellow "Primary download failed. Attempting fallback source..." + + if [[ -z "$fallback" ]]; then + cprint red bold "No fallback URL or path specified." + return 1 + fi + + if [[ "$fallback" =~ ^https?:// ]]; then + if ! wget --progress=bar:force -O "$archive_path" "$fallback"; then + cprint red bold "Fallback download failed from $fallback" + return 1 + fi + elif [[ -f "$fallback" ]]; then + cp "$fallback" "$archive_path" || { + cprint red bold "Failed to copy fallback archive from $fallback" + return 1 + } + else + cprint red bold "Fallback path is invalid: $fallback" + return 1 + fi + fi + + # Step 2: Generate extract directory + local suffix + suffix=$(tr -dc 'a-z0-9' /dev/null; then + cprint green "User '$install_user' already exists." + else + cprint cyan "Creating system user: $install_user (nologin, no password)..." + if ! useradd --system --home "$install_dir" --shell /usr/sbin/nologin "$install_user"; then + cprint red bold "Failed to create user: $install_user" + exit 1 + fi + cprint green "User '$install_user' created." + fi + + + # Docker integration + if command -v docker &>/dev/null; then + cprint cyan "Docker is installed — checking group assignment..." + + if getent group docker &>/dev/null; then + if id -nG "$install_user" | grep -qw docker; then + cprint green "User '$install_user' is already in the 'docker' group." + else + cprint cyan "Adding user '$install_user' to 'docker' group..." + if usermod -aG docker "$install_user"; then + cprint green "Docker group access granted to '$install_user'." + else + cprint red "Failed to add '$install_user' to 'docker' group. Docker may not be usable by this user." + fi + fi + else + cprint red "Docker installed but 'docker' group not found. Skipping group assignment." + fi + else + cprint yellow "Docker not installed — skipping Docker group configuration." + fi + + return 0 +} +# Function to stop MCSM services if they exist +stop_mcsm_services() { + cprint yellow bold "Attempting to stop mcsm-web and mcsm-daemon services..." + + # Attempt to stop mcsm-web + cprint blue "Stopping mcsm-web..." + if systemctl stop mcsm-web; then + cprint green "mcsm-web stopped successfully." + else + cprint red bold "Warning: Failed to stop mcsm-web (may not exist or already stopped)." + fi + + # Attempt to stop mcsm-daemon + cprint blue "Stopping mcsm-daemon..." + if systemctl stop mcsm-daemon; then + cprint green "mcsm-daemon stopped successfully." + else + cprint red bold "Warning: Failed to stop mcsm-daemon (may not exist or already stopped)." + fi +} +# Prepare file & permissions before install. +mcsm_install_prepare() { + + # Stop service if existed + stop_mcsm_services + + if [[ ! -d "$install_tmp_dir" ]]; then + cprint red bold "install_tmp_dir does not exist: $install_tmp_dir" + exit 1 + fi + + cprint cyan "Changing ownership of $install_tmp_dir to user '$install_user'..." + chown -R "$install_user":"$install_user" "$install_tmp_dir" || { + cprint red bold "Failed to change ownership of $install_tmp_dir" + cleanup_install_tmp + exit 1 + } + + # Normalize install_dir to ensure it ends with a slash + [[ "${install_dir}" != */ ]] && install_dir="${install_dir}/" + + if [[ "$web_installed" == false && "$daemon_installed" == false ]]; then + cprint cyan "No existing components detected — skipping data backup/cleanup." + return 0 + fi + + cprint green bold "Existing components prepared successfully." + return 0 +} + +# Install or update a component +install_component() { + local component="$1" + local target_path="${install_dir}${component}" + local backup_data_path="${install_dir}${backup_prefix}${component}" + local source_path="${install_tmp_dir}/mcsmanager/${component}" + + cprint cyan bold "Installing/Updating component: $component" + + # Step 1: Move new component to install_dir + if [[ ! -d "$source_path" ]]; then + cprint red bold "Source directory not found: $source_path" + cleanup_install_tmp + exit 1 + fi + + if cp -a "$source_path"/. "$target_path"; then + cprint green "Updated files from $source_path → $target_path" + rm -rf "$source_path" + else + cprint red bold "Failed to update files from $source_path → $target_path" + cleanup_install_tmp + exit 1 + fi + cprint green "Moved $component to $target_path" + + + # Step 3: Install NPM dependencies + if [[ ! -x "$npm_bin_path" ]]; then + cprint red bold "npm binary not found or not executable: $npm_bin_path" + cleanup_install_tmp + exit 1 + fi + + cprint cyan "Installing dependencies for $component using npm..." + pushd "$target_path" >/dev/null || { + cprint red bold "Failed to change directory to $target_path" + cleanup_install_tmp + exit 1 + } + + if ! "$node_bin_path" "$npm_bin_path" install --no-audit --no-fund --loglevel=warn; then + cprint red bold "NPM dependency installation failed for $component" + popd >/dev/null + cleanup_install_tmp + exit 1 + fi + + popd >/dev/null + cprint green bold "Component '$component' installed/updated successfully." +} + +# Create systemd service for a given component. +# This will overwrite the existing service file. +create_systemd_service() { + local component="$1" + local service_path="${systemd_file}${component}.service" + local working_dir="${install_dir}${component}" + local exec="${node_bin_path} app.js" + + if [[ ! -d "$working_dir" ]]; then + cprint red bold "Component directory not found: $working_dir" + cleanup_install_tmp + return 1 + fi + + cprint cyan "Creating systemd service for '$component'..." + + cat > "$service_path" </etc/systemd/system/mcsm-web.service - - systemctl daemon-reload - systemctl enable --now mcsm-{daemon,web}.service - echo_green "已注册MCSManager到系统服务!" - - sleep 2 - - printf "\n\n\n\n" - - echo_yellow "==================================================================" - echo_green "安装完成,欢迎使用 MCSManager !" - echo_yellow " " - echo_cyan_n "主控网页访问地址: " - echo_yellow "http://:23333 (Browser)" - echo_cyan_n "被控守护进程地址: " - echo_yellow "ws://:24444 (Cluster)" - echo_red "默认情况下,你必须在防火墙放行 23333 和 24444 端口才能确保面板工作正常!" - echo_yellow " " - echo_cyan "面板开关指令:" - echo_cyan "systemctl start mcsm-{daemon,web}.service" - echo_cyan "systemctl stop mcsm-{daemon,web}.service" - echo_cyan "systemctl restart mcsm-{daemon,web}.service" - echo_yellow " " - echo_green "官方文档: https://docs.mcsmanager.com/zh_cn/" - echo_yellow "==================================================================" -} - -# Environmental inspection -if [[ "$arch" == x86_64 ]]; then - arch=x64 - #echo "[-] x64 architecture detected" -elif [[ $arch == aarch64 ]]; then - arch=arm64 - #echo "[-] 64-bit ARM architecture detected" -elif [[ $arch == arm ]]; then - arch=armv7l - #echo "[-] 32-bit ARM architecture detected" -elif [[ $arch == ppc64le ]]; then - arch=ppc64le - #echo "[-] IBM POWER architecture detected" -elif [[ $arch == s390x ]]; then - arch=s390x - #echo "[-] IBM LinuxONE architecture detected" -else - Red_Error "[x] 对不起,这个架构还不支持安装MCSManager!\n[x]请尝试手动安装: https://github.com/MCSManager/MCSManager#linux" -fi - -# Define the variable Node installation directory -node_install_path="/opt/node-$node-linux-$arch" - -# Check network connection -echo_cyan "[-] Architecture: $arch" - -# Install related software -echo_cyan_n "[+] 正在安装依赖软件 (git, tar, wget)... " -if [[ -x "$(command -v yum)" ]]; then - yum install -y git tar wget -elif [[ -x "$(command -v apt-get)" ]]; then - apt-get install -y git tar wget -elif [[ -x "$(command -v pacman)" ]]; then - pacman -S --noconfirm --needed git tar wget -elif [[ -x "$(command -v zypper)" ]]; then - zypper --non-interactive install git tar wget -else - echo_red "[!] 找不到你的软件包管理器! 你需要先去安装 git, tar 和 wget!" -fi - -# Determine whether the relevant software is installed successfully -if [[ -x "$(command -v git)" && -x "$(command -v tar)" && -x "$(command -v wget)" ]]; then - echo_green "完成" -else - Red_Error "[x] 没有安装 git, tar 和 wget, 请先在安装MCSManager前安装它们!" -fi - -# Install the Node environment -Install_Node - -# Install MCSManager -Install_MCSManager - -# Create MCSManager background service -Create_Service +EOF + + if [[ $? -ne 0 ]]; then + cprint red bold "Failed to write service file: $service_path" + cleanup_install_tmp + return 1 + fi + + chmod 644 "$service_path" + cprint green "Created systemd unit: $service_path" + return 0 +} + +# Extract daemon key and/or http port +extract_component_info() { + # DAEMON SECTION + if [[ "$install_daemon" == true ]]; then + local daemon_service="mcsm-daemon.service" + local daemon_path="${install_dir}/daemon" + local daemon_config_path="${daemon_path}/${daemon_key_config_subpath}" + + cprint cyan bold "Starting daemon service..." + if systemctl restart "$daemon_service"; then + cprint green "Daemon service started." + + sleep 1 # Allow service to init and write configs + + if [[ -f "$daemon_config_path" ]]; then + daemon_key=$(grep -oP '"key"\s*:\s*"\K[^"]+' "$daemon_config_path") + daemon_port=$(grep -oP '"port"\s*:\s*\K[0-9]+' "$daemon_config_path") + + if [[ -n "$daemon_key" ]]; then + cprint green "Extracted daemon key: $daemon_key" + else + cprint red "Failed to extract daemon key from: $daemon_config_path" + fi + + if [[ -n "$daemon_port" ]]; then + cprint green "Extracted daemon port: $daemon_port" + else + cprint red "Failed to extract daemon port from: $daemon_config_path" + fi + else + cprint red "Daemon config file not found: $daemon_config_path" + fi + else + cprint red bold "Failed to start daemon service: $daemon_service" + fi + fi + + # WEB SECTION + if [[ "$install_web" == true ]]; then + local web_service="mcsm-web.service" + local web_path="${install_dir}/web" + local web_config_path="${web_path}/${web_port_config_subpath}" + + cprint cyan bold "Starting web service..." + if systemctl restart "$web_service"; then + cprint green "Web service started." + + sleep 1 # Allow time to populate config + + if [[ -f "$web_config_path" ]]; then + web_port=$(grep -oP '"httpPort"\s*:\s*\K[0-9]+' "$web_config_path") + if [[ -n "$web_port" ]]; then + cprint green "Extracted web port: $web_port" + else + cprint red "Failed to extract web port from: $web_config_path" + fi + else + cprint red "Web config file not found: $web_config_path" + fi + else + cprint red bold "Failed to start web service: $web_service" + fi + fi +} + +cleanup_install_tmp() { + if [[ -n "$install_tmp_dir" && -d "$install_tmp_dir" ]]; then + if rm -rf "$install_tmp_dir"; then + cprint green "Cleaned up temporary install folder: $install_tmp_dir" + else + cprint red "Failed to remove temporary folder: $install_tmp_dir" + fi + fi +} + +print_install_result() { + # Clear the screen + clear || true + + # Print ASCII banner + cprint white noprefix "______ _______________________ ___" + cprint white noprefix "___ |/ /_ ____/_ ___/__ |/ /_____ _____________ _______ _____________" + cprint white noprefix "__ /|_/ /_ / _____ \__ /|_/ /_ __ \`/_ __ \ __ \`/_ __ \`/ _ \_ ___/" + cprint white noprefix "_ / / / / /___ ____/ /_ / / / / /_/ /_ / / / /_/ /_ /_/ // __/ /" + cprint white noprefix "/_/ /_/ \____/ /____/ /_/ /_/ \__,_/ /_/ /_/\__,_/ _\__, / \___//_/" + echo "" + # status summary + cprint yellow noprefix "Installed/Updated Component(s):" + if [[ "$install_daemon" == true && -n "$daemon_key" && -n "$daemon_port" ]]; then + cprint white noprefix "Daemon" + elif [[ "$install_daemon" == true ]]; then + cprint white noprefix nonl "Daemon " + cprint yellow noprefix "(partial, config not fully detected)" + fi + + if [[ "$install_web" == true && -n "$web_port" ]]; then + cprint white noprefix "Web" + elif [[ "$install_web" == true ]]; then + cprint white noprefix nonl "Web " + cprint yellow noprefix "(partial, config not fully detected)" + fi + + echo "" + + # Local IP detection + local ip_address + ip_address=$(hostname -I 2>/dev/null | awk '{print $1}') + [[ -z "$ip_address" ]] && ip_address="YOUR-IP" + + # Daemon info + if [[ "$install_daemon" == true ]]; then + local daemon_address="ws://$ip_address:${daemon_port:-Failed to Retrieve from Config file}" + local daemon_key_display="${daemon_key:-Failed to Retrieve from Config file}" + + cprint yellow noprefix "Daemon Address:" + cprint white noprefix " $daemon_address" + cprint yellow noprefix "Daemon Key:" + cprint white noprefix " $daemon_key_display" + echo "" + fi + + # Web info + if [[ "$install_web" == true ]]; then + local web_address="http://$ip_address:${web_port:-Failed to Retrieve from Config file}" + cprint yellow noprefix "HTTP Web Interface:" + cprint white noprefix nonl " $web_address " + cprint yellow noprefix "(open in browser)" + echo "" + fi + + # Port guidance + cprint yellow noprefix "NOTE:" + cprint white noprefix " Make sure to expose the above ports through your firewall." + cprint white noprefix " If accessing from outside your network, you may need to configure port forwarding on your router." + echo "" + + # Service management help + cprint yellow noprefix "Service Management Commands:" + if [[ "$install_daemon" == true ]]; then + cprint white noprefix nonl " systemctl start " + cprint yellow noprefix "mcsm-daemon.service" + cprint white noprefix nonl " systemctl stop " + cprint yellow noprefix "mcsm-daemon.service" + cprint white noprefix nonl " systemctl restart " + cprint yellow noprefix "mcsm-daemon.service" + cprint white noprefix nonl " systemctl status " + cprint yellow noprefix "mcsm-daemon.service" + fi + if [[ "$install_web" == true ]]; then + cprint white noprefix nonl " systemctl start " + cprint yellow noprefix "mcsm-web.service" + cprint white noprefix nonl " systemctl stop " + cprint yellow noprefix "mcsm-web.service" + cprint white noprefix nonl " systemctl restart " + cprint yellow noprefix "mcsm-web.service" + cprint white noprefix nonl " systemctl status " + cprint yellow noprefix "mcsm-web.service" + fi + echo "" + + # Official doc + cprint yellow noprefix "Official Documentation:" + cprint white noprefix " https://docs.mcsmanager.com/" + echo "" + + # HTTPS support + cprint yellow noprefix "Need HTTPS?" + cprint white noprefix " To enable secure HTTPS access, configure a reverse proxy:" + cprint white noprefix " https://docs.mcsmanager.com/ops/proxy_https.html" + echo "" + + if [[ "$force_permission" == true ]]; then + cprint red noprefix "[Important] You chose to override permission during install." + cprint red noprefix " You may need to run: chown -R $install_user to update permission manually." + fi + + # Closing message + cprint green noprefix "Installation completed. Enjoy managing your servers with MCSManager!" + echo "" +} + +install_mcsm() { + local components=() + + if [[ "$install_web" == true ]]; then + install_component "web" + create_systemd_service "web" + components+=("web") + fi + + if [[ "$install_daemon" == true ]]; then + install_component "daemon" + create_systemd_service "daemon" + components+=("daemon") + fi + + # Reload systemd after any service file changes + if (( ${#components[@]} > 0 )); then + cprint cyan "Reloading systemd daemon..." + # systemctl daemon-reexec + systemctl daemon-reload + + for comp in "${components[@]}"; do + local svc="mcsm-${comp}.service" + + cprint cyan "Enabling service: $svc" + if systemctl enable "$svc" &>/dev/null; then + cprint green "Enabled service: $svc" + else + cprint red bold "Failed to enable service: $svc" + cleanup_install_tmp + exit 1 + fi + done + fi + + # Clean tmp dir + cleanup_install_tmp + # Extract installed component info + safe_run extract_component_info "Failed to extract runtime info from installed services" + safe_run print_install_result "Failed to print installation result" + +} + +main() { + trap 'echo "Unexpected error occurred."; exit 99' ERR + safe_run detect_terminal_capabilities "Failed to detect terminal capabilities" + safe_run check_root "Script must be run as root" + safe_run parse_args "Failed to parse arguments" "$@" + safe_run detect_os_info "Failed to detect OS" + safe_run check_supported_os "Unsupported OS or version" + # To be moved to a master pre check function. + safe_run resolve_node_arch "Failed to resolve Node.js architecture" + + safe_run check_required_commands "Missing required system commands" + + safe_run check_node_installed "Failed to detect Node.js or npm at expected path. Node.js will be installed." + if [ "$install_node" = true ]; then + safe_run install_node "Node.js installation failed" + fi + + safe_run permission_barrier "Permission validation failed — aborting install" + + safe_run prepare_user "Failed to prepare user permission." + + safe_run download_mcsm "Failed to acquire MCSManager source" + safe_run mcsm_install_prepare "Error while preparing for installation" + + safe_run install_mcsm "Failed to install MCSManager" +} +main "$@" \ No newline at end of file From 5df7d0fe5f97744a75123845ddcd43c11241e501 Mon Sep 17 00:00:00 2001 From: yumao233 Date: Sat, 8 Nov 2025 16:47:52 +0800 Subject: [PATCH 298/338] chore: sync script --- setup.sh | 2 +- setup_cn.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.sh b/setup.sh index 469b21a..1e54712 100644 --- a/setup.sh +++ b/setup.sh @@ -18,7 +18,7 @@ install_dir="/opt/mcsmanager" download_base_url="https://github.com/MCSManager/MCSManager/releases/latest/download/" # Fallback download URL (can also be a local directory or mirror) -download_fallback_url="https://github.com/MCSManager/MCSManager/releases/latest/download/" +download_fallback_url="https://download.mcsmanager.com/" # Name of the release package to download/detect package_name="mcsmanager_linux_release.tar.gz" diff --git a/setup_cn.sh b/setup_cn.sh index 30955f4..98ff5a2 100644 --- a/setup_cn.sh +++ b/setup_cn.sh @@ -18,7 +18,7 @@ install_dir="/opt/mcsmanager" download_base_url="https://download.mcsmanager.com/" # Fallback download URL (can also be a local directory or mirror) -download_fallback_url="https://download.mcsmanager.com/" +download_fallback_url="https://github.com/MCSManager/MCSManager/releases/latest/download/" # Name of the release package to download/detect package_name="mcsmanager_linux_release.tar.gz" From b82fdba2e1488156c3ee2fa40f8c74f85a0afe58 Mon Sep 17 00:00:00 2001 From: yumao233 Date: Sat, 8 Nov 2025 16:50:45 +0800 Subject: [PATCH 299/338] chore: clear script --- setup2.sh | 1383 ----------------------------------------------------- 1 file changed, 1383 deletions(-) delete mode 100644 setup2.sh diff --git a/setup2.sh b/setup2.sh deleted file mode 100644 index f1264ab..0000000 --- a/setup2.sh +++ /dev/null @@ -1,1383 +0,0 @@ -#!/bin/bash -# Official MCSManager installation script. -# This script installs or updates the MCSManager Web and/or Daemon to the latest version. -# ------------------------------------------------------------------------------ -# Supported Linux distributions: -# This script supports the following mainstream Linux distributions: -# - Ubuntu: 18.04, 20.04, 22.04, 24.04 -# - Debian: 10, 11, 12, 13 -# - CentOS: 7, 8 Stream, 9 Stream, 10 Stream -# - RHEL: 7, 8, 9, 10 -# - Arch Linux: Support planned (TBD) -# ------------------------------------------------------------------------------ - -# Target installation directory (can be overridden with --install-dir) -install_dir="/opt/mcsmanager" - -# Primary download URL bas. Full package URL = download_base_url + package_name -download_base_url="https://github.com/MCSManager/MCSManager/releases/latest/download/" - -# Fallback download URL (can also be a local directory or mirror) -download_fallback_url="https://github.com/MCSManager/MCSManager/releases/latest/download/" - -# Name of the release package to download/detect -package_name="mcsmanager_linux_release.tar.gz" - -# Node.js version to be installed -# Keep the leading "v" -node_version="v20.12.2" - -# Node download base URL - primary -node_download_url_base="https://nodejs.org/dist/" - -# Node download URL - fallback. -# This is the URL points directly to the file, not the base. This can also be a local absolute path. -# Only supports https:// or http:// for web locations. -node_download_fallback="" - -# Node.js installation path (defaults to the MCSManager installation path. Can be overridden with --node-install-dir) -node_install_dir="$install_dir" - -# Temp dir for file extraction -tmp_dir="/tmp" - -# --------------- Global Variables ---------------# -# DO NOT MODIFY # - - -# Component installation options. -# For fresh installs, both daemon and web components are installed by default. -# For updates, behavior depends on detected existing components. -# Can be overridden with --install daemon/web/all -install_daemon=true -install_web=true - -# Install MCSM as (default: root). -# To install as a general user (e.g., "mcsm"), use the --user option: --user mcsm -# To ensure compatibility, only user mcsm is supported. -install_user="root" -# Installed user, for permission check -web_installed=false -daemon_installed=false -web_installed_user="" -daemon_installed_user="" - -# Service file locations -# the final dir = systemd_file + {web/daemon} + ".service" -systemd_file="/etc/systemd/system/mcsm-" -# Optional: Override the default installation source file. -# If --install-source is specified, the installer will use the provided -# "mcsmanager_linux_release.tar.gz" file instead of downloading it. -# Only support local absolute path. -install_source_path="" - -# temp path for extracted file(s) -install_tmp_dir="/opt/mcsmanager/mcsm_abcd" - -# dir name for data dir backup -# e.g. /opt/mcsmanager/daemon/data -> /opt/mcsmanager/data_bak_data -# only valid for when during an update -backup_prefix="data_bak_" - -# System architecture (detected automatically) -arch="" -version="" -distro="" - -# Supported OS versions (map-style structure) -# Format: supported_os["distro_name"]="version1 version2 version3 ..." -declare -A supported_os -supported_os["Ubuntu"]="18 20 22 24" -supported_os["Debian"]="10 11 12 13" -supported_os["CentOS"]="7 8 8-stream 9-stream 10-stream" -supported_os["RHEL"]="7 8 9 10" -supported_os["Arch"]="rolling" - -# Required system commands for installation -# These will be checked before logic process -required_commands=( - chmod - chown - wget - tar - stat - useradd - usermod - date -) - -# Node.js related sections -# Enable strict version checking (exact match) -# enabled -> strict requriement for defined node version -# false -> newer version allowed -# Older version is NEVER allowed -strict_node_version_check=false - -# Will be set based on actual node status -install_node=true -# Remove leading "v" from defined version -required_node_ver="${node_version#v}" - -# Holds absolute path for node & npm -node_bin_path="" -npm_bin_path="" -# Hold Node.js arch name, e.g. x86_64 -> x64 -node_arch="" -# Hold Node.js intallation path, e.g. ${node_install_dir}/node-${node_version}-linux-${arch} -node_path="" - -# For installation result -daemon_key="" -daemon_port="" -web_port="" -daemon_key_config_subpath="data/Config/global.json" -web_port_config_subpath="data/SystemConfig/config.json" - -# Terminal color & style related -# Default to false, auto check later -SUPPORTS_COLOR=false -SUPPORTS_STYLE=false -# Declare ANSI reset -RESET="\033[0m" - -# Foreground colors -declare -A FG_COLORS=( - [black]="\033[0;30m" - [red]="\033[0;31m" - [green]="\033[0;32m" - [yellow]="\033[0;33m" - [blue]="\033[0;34m" - [magenta]="\033[0;35m" - [cyan]="\033[0;36m" - [white]="\033[0;37m" -) - -# Font styles -declare -A STYLES=( - [bold]="\033[1m" - [underline]="\033[4m" - [italic]="\033[3m" # Often ignored - [clear_line]="\r\033[2K" - [strikethrough]="\033[9m" -) - - -### Helper Functions -# Execution wrapper, avoid unexpected crashes. -safe_run() { - local func="$1" - local err_msg="$2" - shift 2 - - if ! "$func" "$@"; then - echo "Error: $err_msg" - exit 1 - fi -} - -# Function to ensure the script is run as root -check_root() { - # Using Bash's built-in EUID variable - if [ -n "$EUID" ]; then - if [ "$EUID" -ne 0 ]; then - cprint red "Error: This script must be run as root. Please use sudo or switch to the root user." - exit 1 - fi - else - # Fallback to using id -u if EUID is unavailable (e.g., non-Bash shell or misconfigured environment) - if [ "$(id -u)" -ne 0 ]; then - cprint red "Error: This script must be run as root. Please use sudo or switch to the root user." - exit 1 - fi - fi -} - -# Function to check whether current terminal support color & style -detect_terminal_capabilities() { - SUPPORTS_COLOR=false - SUPPORTS_STYLE=false - - if [ -t 1 ] && command -v tput >/dev/null 2>&1; then - if [ "$(tput colors)" -ge 8 ]; then - SUPPORTS_COLOR=true - fi - if tput bold >/dev/null 2>&1 && tput smul >/dev/null 2>&1; then - SUPPORTS_STYLE=true - fi - fi - - if [ "$SUPPORTS_COLOR" = true ]; then - cprint green "[OK] Terminal supports colored output." - else - cprint yellow "Note: Terminal does not support colored output. Continuing without formatting." - fi - - if [ "$SUPPORTS_STYLE" = true ]; then - cprint green "[OK] Terminal supports bold and underline formatting." - else - cprint yellow "Note: Terminal does not support advanced text styles." - fi -} - -# Check whether daemon or web is installed -is_component_installed() { - local component_name="$1" - local component_path="${install_dir}/${component_name}" - - if [[ -d "$component_path" ]]; then - cprint green "Component '$component_name' is already installed at $component_path" - - # Set corresponding global variable - if [[ "$component_name" == "daemon" ]]; then - daemon_installed=true - elif [[ "$component_name" == "web" ]]; then - web_installed=true - fi - - return 0 - else - cprint yellow "Component '$component_name' is not installed" - - # Set corresponding global variable - if [[ "$component_name" == "daemon" ]]; then - daemon_installed=false - elif [[ "$component_name" == "web" ]]; then - web_installed=false - fi - - return 1 - fi -} - -check_component_permission() { - local component="$1" - local service_file="${systemd_file}${component}.service" - - if [[ ! -f "$service_file" ]]; then - cprint yellow "Service file not found: $service_file" - return 0 # nothing changed - fi - - # Extract the User= line if it exists - local user_line - user_line=$(grep -E '^User=' "$service_file" 2>/dev/null | head -1) - - local user - if [[ -z "$user_line" ]]; then - user="root" # default if no User= is defined - else - user="${user_line#User=}" - fi - - # Validate user - if [[ "$user" != "root" && "$user" != "mcsm" ]]; then - cprint red bold "Unsupported user '$user' in $service_file. Expected 'root' or 'mcsm'." - exit 1 - fi - - # Assign to appropriate global - if [[ "$component" == "web" ]]; then - web_installed_user="$user" - elif [[ "$component" == "daemon" ]]; then - daemon_installed_user="$user" - fi - - cprint cyan "Detected $component installed as user: $user" - return 0 -} - - - -parse_args() { - local explicit_install_flag=false - - while [[ $# -gt 0 ]]; do - case "$1" in - --install-dir) - if [[ -n "$2" ]]; then - install_dir="$2" - shift 2 - else - echo "Error: --install-dir requires a path argument." - exit 1 - fi - ;; - --node-install-dir) - if [[ -n "$2" ]]; then - node_install_dir="$2" - shift 2 - else - echo "Error: --node-install-dir requires a path argument." - exit 1 - fi - ;; - --install) - explicit_install_flag=true - if [[ -n "$2" && "$2" != --* ]]; then - case "$2" in - daemon) - install_daemon=true - is_component_installed "daemon" - install_web=false - check_component_permission "daemon" - ;; - web) - install_daemon=false - is_component_installed "web" - install_web=true - check_component_permission "web" - ;; - all) - install_daemon=true - install_web=true - is_component_installed "daemon" - is_component_installed "web" - check_component_permission "daemon" - check_component_permission "web" - ;; - *) - echo "Error: Invalid value for --install. Expected 'daemon', 'web', or 'all'." - echo "Usage: --install daemon|web|all" - exit 1 - ;; - esac - shift 2 - else - echo "Error: --install flag provided but no value. Please specify: daemon, web, or all." - echo "Usage: --install daemon|web|all" - exit 1 - fi - ;; - --user) - if [[ -n "$2" ]]; then - case "$2" in - root) - install_user="root" - ;; - mcsm) - install_user="mcsm" - ;; - *) - echo "Error: Invalid user '$2'. Only 'root' and 'mcsm' are supported." - echo "Usage: --user root|mcsm" - exit 1 - ;; - esac - shift 2 - else - echo "Error: --user requires a value (root or mcsm)." - exit 1 - fi - ;; - --install-source) - if [[ -n "$2" ]]; then - install_source_path="$2" - shift 2 - else - echo "Error: --install-source requires a file path." - exit 1 - fi - ;; - *) - echo "Error: Unknown argument: $1" - exit 1 - ;; - esac - done - - # Auto-detect branch: only run if --install was not explicitly passed - if [[ "$explicit_install_flag" == false ]]; then - daemon_installed=false - web_installed=false - - if is_component_installed "daemon"; then - daemon_installed=true - check_component_permission "daemon" - fi - if is_component_installed "web"; then - web_installed=true - check_component_permission "web" - fi - - # When only one component installed, we wanted to process that one only. - if [[ "$daemon_installed" == true && "$web_installed" == false ]]; then - install_daemon=true - install_web=false - elif [[ "$daemon_installed" == false && "$web_installed" == true ]]; then - install_daemon=false - install_web=true - else - install_daemon=true - install_web=true - fi - fi -} - - -# Get Distribution & Architecture Info -detect_os_info() { - distro="Unknown" - version="Unknown" - arch=$(uname -m) - - # Try primary source - if [ -f /etc/os-release ]; then - . /etc/os-release - distro_id="${ID,,}" - version_id="${VERSION_ID,,}" - - case "$distro_id" in - ubuntu) - distro="Ubuntu" - version="$version_id" - ;; - debian) - distro="Debian" - version="$version_id" - ;; - centos) - distro="CentOS" - version="$version_id" - ;; - rhel*) - distro="RHEL" - version="$version_id" - ;; - arch) - distro="Arch" - version="rolling" - ;; - *) - distro="${ID:-Unknown}" - version="$version_id" - ;; - esac - fi - - # Fallbacks for missing or invalid version - if [[ -z "$version" || "$version" == "unknown" || "$version" == "" ]]; then - if [ -f /etc/issue ]; then - version_guess=$(grep -oP '[0-9]+(\.[0-9]+)*' /etc/issue | head -1) - if [[ -n "$version_guess" ]]; then - version="$version_guess" - fi - fi - fi - - # Normalize version: keep only major version - version_full="$version" - if [[ "$version" =~ ^[0-9]+(\.[0-9]+)*$ ]]; then - version="${version%%.*}" - else - echo "Warning: Could not detect a clean numeric version. Defaulting to unknown." - version="unknown" - fi - - cprint cyan "Detected OS: $distro $version_full" - cprint cyan "Detected Architecture: $arch" -} - - -# Check if current OS is supported -check_supported_os() { - local supported_versions="${supported_os[$distro]}" - - if [[ -z "$supported_versions" ]]; then - echo "Error: Distribution '$distro' is not supported by this installer." - return 1 - fi - - if [[ "$supported_versions" != *"$version"* ]]; then - echo "Error: Version '$version' of '$distro' is not supported." - echo "Supported versions are: $supported_versions" - return 1 - fi - - cprint green "OS compatibility check passed." - return 0 -} - -# Check if all required commands are available -check_required_commands() { - local missing=0 - - for cmd in "${required_commands[@]}"; do - if ! command -v "$cmd" >/dev/null 2>&1; then - echo "Error: Required command '$cmd' is not available in PATH." - missing=1 - fi - done - - if [ "$missing" -ne 0 ]; then - echo "One or more required commands are missing. Please install them and try again." - return 1 - fi - - cprint green "All required commands are available." - return 0 -} - -# Print with specified color and style, fallback to RESET if not supported. -# Supported colors*: black|red|green|yellow|blue|magenta|cyan|white -# Supported styles*: bold|underline|italic|clear_line|strikethrough -# *Note: some style may not necessarily work on all terminals. -# Example usage: -# cprint green bold "Installation completed successfully." -# cprint red underline "Failed to detect required command: wget" -# cprint yellow "Warning: Disk space is low." -# cprint underline "Failed to detect required command: wget" -# cprint bold green underline"Installation completed successfully." - -cprint() { - local color="" - local text="" - local styles="" - local disable_prefix=false - local disable_newline=false - - while [[ $# -gt 1 ]]; do - case "$1" in - black|red|green|yellow|blue|magenta|cyan|white) - color="$1" - ;; - bold|underline|italic|clear_line|strikethrough) - styles+="${STYLES[$1]}" - ;; - noprefix) - disable_prefix=true - ;; - nonl) - disable_newline=true - ;; - esac - shift - done - - text="$1" - - local prefix_text="" - if [[ "$disable_prefix" != true ]]; then - local timestamp="[$(date +%H:%M:%S)]" - local label="[MCSM Installer]" - prefix_text="${FG_COLORS[white]}$timestamp $label${RESET} " - fi - - local prefix="" - if [[ -n "$color" && "$SUPPORTS_COLOR" = true ]]; then - prefix+="${FG_COLORS[$color]}" - fi - if [[ "$SUPPORTS_STYLE" = true || "$styles" == *"${STYLES[clear_line]}"* ]]; then - prefix="$styles$prefix" - fi - - if [[ "$disable_newline" == true ]]; then - printf "%b%b%s%b" "$prefix_text" "$prefix" "$text" "$RESET" - else - printf "%b%b%s%b\n" "$prefix_text" "$prefix" "$text" "$RESET" - fi -} - - - - -# Permission check before proceed with installation -permission_barrier() { - if [[ "$web_installed" == false && "$daemon_installed" == false ]]; then - cprint cyan "No components currently installed — skipping permission check." - return 0 - fi - - for component in web daemon; do - local is_installed_var="${component}_installed" - local installed_user_var="${component}_installed_user" - - if [[ "${!is_installed_var}" == true ]]; then - local installed_user="${!installed_user_var}" - - # Step 0: Ensure installed user is detected - if [[ -z "$installed_user" ]]; then - cprint red bold "Detected that '$component' is installed but could not determine the user from its systemd service file." - cprint red "This may indicate a custom or unsupported service file setup." - cprint red "Refusing to proceed to avoid potential conflicts." - exit 1 - fi - - # Step 1: User match check - if [[ "$installed_user" != "$install_user" ]]; then - cprint red bold "Permission mismatch for '$component':" - cprint red "Installed as user: $installed_user" - cprint red "Current install target user: $install_user" - cprint red "Unable to proceed due to ownership conflict." - exit 1 - fi - fi - done - - # Step 2: Directory ownership check - local dir_owner - dir_owner=$(stat -c '%U' "$install_dir" 2>/dev/null) - - if [[ -z "$dir_owner" ]]; then - cprint red bold "Unable to determine owner of install_dir: $install_dir" - exit 1 - fi - - if [[ "$dir_owner" != "$install_user" ]]; then - cprint red bold "Install directory ownership mismatch:" - cprint red " Directory: $install_dir" - cprint red " Owned by: $dir_owner" - cprint red " Expected: $install_user" - exit 1 - fi - - cprint green bold "Permissions and ownership validated. Proceeding." - return 0 -} - - - -# Map OS arch with actual Node.js Arch name -# This function should be placed after var arch has been assigned a valid value. -resolve_node_arch() { - case "$arch" in - x86_64) - node_arch="x64" - ;; - aarch64) - node_arch="arm64" - ;; - armv7l) - node_arch="armv7l" - ;; - *) - cprint red bold "Unsupported architecture for Node.js: $arch" - return 1 - ;; - esac - - # Assign node_path based on resolved arch and current version/install dir - node_path="${node_install_dir}/node-${node_version}-linux-${node_arch}" - - cprint cyan "Resolved Node.js architecture: $node_arch" - cprint cyan "Computed Node.js install path: $node_path" -} - -# Check if Node.js at PATH is valid. -# This function check Node.js version + NPM (if Node.js valid) -verify_node_at_path() { - local node_path="$1" - # Assign value to vlobal variables when verifying - node_bin_path="$node_path/bin/node" - npm_bin_path="$node_path/bin/npm" - - # Node binary missing - if [ ! -x "$node_bin_path" ]; then - return 1 - fi - - local installed_ver - installed_ver="$("$node_bin_path" -v 2>/dev/null | sed 's/^v//')" - - # Node exists but version not returned - if [[ -z "$installed_ver" ]]; then - return 1 - fi - - # Version mismatch, even if newer - if [ "$strict_node_version_check" = true ]; then - if [[ "$installed_ver" != "$required_node_ver" ]]; then - return 3 - fi - else - # Version mismatch, too old. - local cmp - cmp=$(printf "%s\n%s\n" "$required_node_ver" "$installed_ver" | sort -V | head -1) - if [[ "$cmp" != "$required_node_ver" ]]; then - return 2 - fi - fi - - # node cmd valid, but npm is missing or broken. - if [ ! -x "$npm_bin_path" ] || ! "$npm_bin_path" --version >/dev/null 2>&1; then - return 4 - fi - - return 0 -} - -# Node.js pre-check. check if we need to install Node.js before installer run. -# Use postcheck_node_after_install() to check after install. -check_node_installed() { - verify_node_at_path "$node_path" - local result=$? - - case $result in - 0) - cprint green bold "Node.js and npm found at $node_path (version $required_node_ver or compatible)" - install_node=false - ;; - 1) - cprint yellow bold "Node.js binary not found or unusable at $node_path" - install_node=true - ;; - 2) - cprint red bold "Node.js version at $node_path is too old. Required: >= $required_node_ver" - install_node=true - ;; - 3) - cprint red bold "Node.js version mismatch. Required: $required_node_ver, found something else." - install_node=true - ;; - 4) - cprint red bold "Node.js is present but npm is missing or broken." - install_node=true - ;; - *) - cprint red bold "Unexpected error in node verification." - install_node=true - ;; - esac -} - -# Node.js post-check. check if Node.js is valid after install. -postcheck_node_after_install() { - verify_node_at_path "$node_path" - if [[ $? -ne 0 ]]; then - cprint red bold "Node.js installation failed or is invalid at $node_path" - return 1 - else - cprint green bold "Node.js is installed and functioning at $node_path" - return 0 - fi -} - -# Install Node.js and check -install_node() { - local archive_name="node-${node_version}-linux-${node_arch}.tar.xz" - local target_dir="${node_install_dir}/node-${node_version}-linux-${node_arch}" - local archive_path="${node_install_dir}/${archive_name}" - local download_url="${node_download_url_base}${node_version}/${archive_name}" - local fallback="$node_download_fallback" - - cprint cyan bold "Installing Node.js $node_version for arch: $node_arch" - - mkdir -p "$node_install_dir" || { - cprint red bold "Failed to create node install directory: $node_install_dir" - return 1 - } - - # Download - cprint cyan "Downloading Node.js from: $download_url" - if ! wget --progress=bar:force -O "$archive_path" "$download_url"; then - cprint yellow "Primary download failed. Attempting fallback..." - - if [[ -n "$fallback" ]]; then - if [[ "$fallback" =~ ^https?:// ]]; then - cprint cyan "Downloading from fallback URL: $fallback" - if ! wget --progress=bar:force -O "$archive_path" "$fallback"; then - cprint red bold "Fallback download failed from: $fallback" - return 1 - fi - elif [ -f "$fallback" ]; then - cprint cyan "Copying from local fallback: $fallback" - cp "$fallback" "$archive_path" || { - cprint red bold "Failed to copy fallback Node.js archive from $fallback" - return 1 - } - else - cprint red bold "Invalid fallback path: $fallback" - return 1 - fi - else - cprint red bold "No fallback source configured. Cannot proceed." - return 1 - fi - fi - - # Extract archive - cprint cyan "Extracting Node.js archive..." - if ! tar -xf "$archive_path" -C "$node_install_dir"; then - cprint red bold "Failed to extract Node.js archive." - return 1 - fi - - chmod -R a+rx "$target_dir" || { - cprint red bold "Failed to set execute permissions on Node.js files." - return 1 - } - - verify_node_at_path "$target_dir" - local result=$? - if [[ $result -ne 0 ]]; then - cprint red bold "Node.js installation failed verification." - return 1 - fi - - cprint cyan "Cleaning up archive..." - rm -f "$archive_path" - - cprint green bold "Node.js $node_version installed successfully at $target_dir" - # Save resolved binary paths to global variables - node_bin_path="${target_dir}/bin/node" - npm_bin_path="${target_dir}/bin/npm" - - cprint green "Node.js binary: $node_bin_path" - cprint green "npm binary: $npm_bin_path" - return 0 -} - -# Function to download MCSM package. fetch from primary URL first, then fallback URL. -# This function only put extracted file(s) into install_dir, it does not perform the actual update. -download_mcsm() { - local archive_name="$package_name" - local archive_path="${tmp_dir}/${archive_name}" - local primary_url="${download_base_url}${archive_name}" - local fallback="$download_fallback_url" - - cprint cyan bold "Downloading MCSManager package..." - - # Step 1: Try downloading from primary URL - if ! wget --progress=bar:force -O "$archive_path" "$primary_url"; then - cprint yellow "Primary download failed. Attempting fallback source..." - - if [[ -z "$fallback" ]]; then - cprint red bold "No fallback URL or path specified." - return 1 - fi - - if [[ "$fallback" =~ ^https?:// ]]; then - if ! wget --progress=bar:force -O "$archive_path" "$fallback"; then - cprint red bold "Fallback download failed from $fallback" - return 1 - fi - elif [[ -f "$fallback" ]]; then - cp "$fallback" "$archive_path" || { - cprint red bold "Failed to copy fallback archive from $fallback" - return 1 - } - else - cprint red bold "Fallback path is invalid: $fallback" - return 1 - fi - fi - - # Step 2: Generate extract directory - local suffix - suffix=$(tr -dc 'a-z0-9' /dev/null; then - cprint green "User '$install_user' already exists." - else - cprint cyan "Creating system user: $install_user (nologin, no password)..." - if ! useradd --system --home "$install_dir" --shell /usr/sbin/nologin "$install_user"; then - cprint red bold "Failed to create user: $install_user" - exit 1 - fi - cprint green "User '$install_user' created." - fi - - # Docker integration - if command -v docker &>/dev/null; then - cprint cyan "Docker is installed — checking group assignment..." - - if getent group docker &>/dev/null; then - if id -nG "$install_user" | grep -qw docker; then - cprint green "User '$install_user' is already in the 'docker' group." - else - cprint cyan "Adding user '$install_user' to 'docker' group..." - if usermod -aG docker "$install_user"; then - cprint green "Docker group access granted to '$install_user'." - else - cprint red "Failed to add '$install_user' to 'docker' group. Docker may not be usable by this user." - fi - fi - else - cprint red "Docker installed but 'docker' group not found. Skipping group assignment." - fi - else - cprint yellow "Docker not installed — skipping Docker group configuration." - fi - - return 0 -} - -# Prepare file & permissions before install. -mcsm_install_prepare() { - # Prepare the user first - prepare_user - - if [[ ! -d "$install_tmp_dir" ]]; then - cprint red bold "install_tmp_dir does not exist: $install_tmp_dir" - exit 1 - fi - - cprint cyan "Changing ownership of $install_tmp_dir to user '$install_user'..." - chown -R "$install_user":"$install_user" "$install_tmp_dir" || { - cprint red bold "Failed to change ownership of $install_tmp_dir" - cleanup_install_tmp - exit 1 - } - - # Normalize install_dir to ensure it ends with a slash - [[ "${install_dir}" != */ ]] && install_dir="${install_dir}/" - - if [[ "$web_installed" == false && "$daemon_installed" == false ]]; then - cprint cyan "No existing components detected — skipping data backup/cleanup." - return 0 - fi - - for component in web daemon; do - local is_installed_var="${component}_installed" - if [[ "${!is_installed_var}" == true ]]; then - local component_path="${install_dir}${component}" - local data_dir="${component_path}/data" - local backup_path="${install_dir}${backup_prefix}${component}" - - if [[ ! -d "$component_path" ]]; then - cprint yellow "Expected installed component directory not found: $component_path" - continue - fi - - if [[ -d "$data_dir" ]]; then - if [[ -e "$backup_path" ]]; then - cprint red bold "Backup destination already exists: $backup_path" - cprint red "Please resolve this conflict manually before continuing." - cleanup_install_tmp - exit 1 - fi - - cprint cyan "Backing up data directory for $component..." - mv "$data_dir" "$backup_path" || { - cprint red bold "Failed to move $data_dir to $backup_path" - cleanup_install_tmp - exit 1 - } - cprint green "Moved $data_dir → $backup_path" - else - cprint yellow "No data directory found for $component — skipping backup." - fi - - cprint cyan "Removing old component directory: $component_path" - rm -rf "$component_path" || { - cprint red bold "Failed to remove old component directory: $component_path" - cleanup_install_tmp - exit 1 - } - fi - done - - cprint green bold "Existing components prepared successfully." - return 0 -} - -# Install or update a component -install_component() { - local component="$1" - local target_path="${install_dir}${component}" - local backup_data_path="${install_dir}${backup_prefix}${component}" - local source_path="${install_tmp_dir}/mcsmanager/${component}" - - cprint cyan bold "Installing/Updating component: $component" - - # Step 1: Move new component to install_dir - if [[ ! -d "$source_path" ]]; then - cprint red bold "Source directory not found: $source_path" - cleanup_install_tmp - exit 1 - fi - - if [[ -e "$target_path" ]]; then - cprint red bold "Target path already exists: $target_path" - cprint red " This should not happen — possible permission error or unclean install." - cleanup_install_tmp - exit 1 - fi - - mv "$source_path" "$target_path" || { - cprint red bold "Failed to move $source_path → $target_path" - cleanup_install_tmp - exit 1 - } - - cprint green "Moved $component to $target_path" - - # Step 2: Restore backed-up data directory if present - if [[ -d "$backup_data_path" ]]; then - local target_data_path="${target_path}/data" - - cprint cyan "Restoring backed-up data directory for $component..." - - rm -rf "$target_data_path" # Ensure no conflict - mv "$backup_data_path" "$target_data_path" || { - cprint red bold "Failed to restore data directory to $target_data_path" - cleanup_install_tmp - exit 1 - } - - cprint green "Data directory restored: $target_data_path" - else - cprint yellow "No backed-up data directory found for $component — fresh install assumed." - fi - - # Step 3: Install NPM dependencies - if [[ ! -x "$npm_bin_path" ]]; then - cprint red bold "npm binary not found or not executable: $npm_bin_path" - cleanup_install_tmp - exit 1 - fi - - cprint cyan "Installing dependencies for $component using npm..." - pushd "$target_path" >/dev/null || { - cprint red bold "Failed to change directory to $target_path" - cleanup_install_tmp - exit 1 - } - - if ! "$npm_bin_path" install --no-audit --no-fund --loglevel=warn; then - cprint red bold "NPM dependency installation failed for $component" - popd >/dev/null - cleanup_install_tmp - exit 1 - fi - - popd >/dev/null - cprint green bold "Component '$component' installed/updated successfully." -} - -# Create systemd service for a given component. -# This will overwrite the existing service file. -create_systemd_service() { - local component="$1" - local service_path="${systemd_file}${component}.service" - local working_dir="${install_dir}${component}" - local exec="${node_bin_path} app.js" - - if [[ ! -d "$working_dir" ]]; then - cprint red bold "Component directory not found: $working_dir" - cleanup_install_tmp - return 1 - fi - - cprint cyan "Creating systemd service for '$component'..." - - cat > "$service_path" </dev/null | awk '{print $1}') - [[ -z "$ip_address" ]] && ip_address="YOUR-IP" - - # Daemon info - if [[ "$install_daemon" == true ]]; then - local daemon_address="ws://$ip_address:${daemon_port:-Failed to Retrieve from Config file}" - local daemon_key_display="${daemon_key:-Failed to Retrieve from Config file}" - - cprint yellow noprefix "Daemon Address:" - cprint white noprefix " $daemon_address" - cprint yellow noprefix "Daemon Key:" - cprint white noprefix " $daemon_key_display" - echo "" - fi - - # Web info - if [[ "$install_web" == true ]]; then - local web_address="http://$ip_address:${web_port:-Failed to Retrieve from Config file}" - cprint yellow noprefix "HTTP Web Interface:" - cprint white noprefix nonl " $web_address " - cprint yellow noprefix "(open in browser)" - echo "" - fi - - # Port guidance - cprint yellow noprefix "NOTE:" - cprint white noprefix " Make sure to expose the above ports through your firewall." - cprint white noprefix " If accessing from outside your network, you may need to configure port forwarding on your router." - echo "" - - # Service management help - cprint yellow noprefix "Service Management Commands:" - if [[ "$install_daemon" == true ]]; then - cprint white noprefix nonl " systemctl start " - cprint yellow noprefix "mcsm-daemon.service" - cprint white noprefix nonl " systemctl stop " - cprint yellow noprefix "mcsm-daemon.service" - cprint white noprefix nonl " systemctl restart " - cprint yellow noprefix "mcsm-daemon.service" - cprint white noprefix nonl " systemctl status " - cprint yellow noprefix "mcsm-daemon.service" - fi - if [[ "$install_web" == true ]]; then - cprint white noprefix nonl " systemctl start " - cprint yellow noprefix "mcsm-web.service" - cprint white noprefix nonl " systemctl stop " - cprint yellow noprefix "mcsm-web.service" - cprint white noprefix nonl " systemctl restart " - cprint yellow noprefix "mcsm-web.service" - cprint white noprefix nonl " systemctl status " - cprint yellow noprefix "mcsm-web.service" - fi - echo "" - - # Official doc - cprint yellow noprefix "Official Documentation:" - cprint white noprefix " https://docs.mcsmanager.com/" - echo "" - - # HTTPS support - cprint yellow noprefix "Need HTTPS?" - cprint white noprefix " To enable secure HTTPS access, configure a reverse proxy:" - cprint white noprefix " https://docs.mcsmanager.com/ops/proxy_https.html" - echo "" - - # Closing message - cprint green noprefix "Installation completed. Enjoy managing your servers with MCSManager!" - echo "" -} - -install_mcsm() { - local components=() - - if [[ "$install_web" == true ]]; then - install_component "web" - create_systemd_service "web" - components+=("web") - fi - - if [[ "$install_daemon" == true ]]; then - install_component "daemon" - create_systemd_service "daemon" - components+=("daemon") - fi - - # Reload systemd after any service file changes - if (( ${#components[@]} > 0 )); then - cprint cyan "Reloading systemd daemon..." - # systemctl daemon-reexec - systemctl daemon-reload - - for comp in "${components[@]}"; do - local svc="mcsm-${comp}.service" - - cprint cyan "Enabling service: $svc" - if systemctl enable "$svc" &>/dev/null; then - cprint green "Enabled service: $svc" - else - cprint red bold "Failed to enable service: $svc" - cleanup_install_tmp - exit 1 - fi - done - fi - - # Clean tmp dir - cleanup_install_tmp - # Extract installed component info - safe_run extract_component_info "Failed to extract runtime info from installed services" - safe_run print_install_result "Failed to print installation result" - -} - -main() { - trap 'echo "Unexpected error occurred."; exit 99' ERR - safe_run detect_terminal_capabilities "Failed to detect terminal capabilities" - safe_run check_root "Script must be run as root" - safe_run parse_args "Failed to parse arguments" "$@" - safe_run detect_os_info "Failed to detect OS" - safe_run check_supported_os "Unsupported OS or version" - # To be moved to a master pre check function. - safe_run resolve_node_arch "Failed to resolve Node.js architecture" - - safe_run check_required_commands "Missing required system commands" - - safe_run check_node_installed "Failed to detect Node.js or npm at expected path. Node.js will be installed." - if [ "$install_node" = true ]; then - safe_run install_node "Node.js installation failed" - fi - - safe_run permission_barrier "Permission validation failed — aborting install" - - safe_run download_mcsm "Failed to acquire MCSManager source" - safe_run mcsm_install_prepare "Error while preparing for installation" - - safe_run install_mcsm "Failed to install MCSManager" -} -main "$@" From 46c12ed5dcda261c81cf6add944b69e646c991b0 Mon Sep 17 00:00:00 2001 From: yumao233 Date: Sat, 8 Nov 2025 16:58:04 +0800 Subject: [PATCH 300/338] fix: update fallback download URLs in setup scripts --- setup.sh | 2 +- setup_cn.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.sh b/setup.sh index 1e54712..fa87d73 100644 --- a/setup.sh +++ b/setup.sh @@ -18,7 +18,7 @@ install_dir="/opt/mcsmanager" download_base_url="https://github.com/MCSManager/MCSManager/releases/latest/download/" # Fallback download URL (can also be a local directory or mirror) -download_fallback_url="https://download.mcsmanager.com/" +download_fallback_url="https://download.mcsmanager.com/mcsmanager_linux_release.tar.gz" # Name of the release package to download/detect package_name="mcsmanager_linux_release.tar.gz" diff --git a/setup_cn.sh b/setup_cn.sh index 98ff5a2..0a1ba01 100644 --- a/setup_cn.sh +++ b/setup_cn.sh @@ -18,7 +18,7 @@ install_dir="/opt/mcsmanager" download_base_url="https://download.mcsmanager.com/" # Fallback download URL (can also be a local directory or mirror) -download_fallback_url="https://github.com/MCSManager/MCSManager/releases/latest/download/" +download_fallback_url="https://github.com/MCSManager/MCSManager/releases/latest/download/mcsmanager_linux_release.tar.gz" # Name of the release package to download/detect package_name="mcsmanager_linux_release.tar.gz" From f980b315cd96e16bd18d0c18100f1649cb19e2c2 Mon Sep 17 00:00:00 2001 From: KevinLu Date: Sat, 8 Nov 2025 08:17:49 -0500 Subject: [PATCH 301/338] misc: increase delay to 3 seconds for service to start --- setup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.sh b/setup.sh index 1e54712..623398d 100644 --- a/setup.sh +++ b/setup.sh @@ -1144,7 +1144,7 @@ extract_component_info() { if systemctl restart "$daemon_service"; then cprint green "Daemon service started." - sleep 1 # Allow service to init and write configs + sleep 3 # Allow service to init and write configs if [[ -f "$daemon_config_path" ]]; then daemon_key=$(grep -oP '"key"\s*:\s*"\K[^"]+' "$daemon_config_path") @@ -1179,7 +1179,7 @@ extract_component_info() { if systemctl restart "$web_service"; then cprint green "Web service started." - sleep 1 # Allow time to populate config + sleep 3 # Allow time to populate config if [[ -f "$web_config_path" ]]; then web_port=$(grep -oP '"httpPort"\s*:\s*\K[0-9]+' "$web_config_path") From 017284f1f6ce583e9fb270302d5ca8ac928654d4 Mon Sep 17 00:00:00 2001 From: KevinLu Date: Sat, 8 Nov 2025 08:23:28 -0500 Subject: [PATCH 302/338] mics: fix version sanitizing for arch rolling --- setup.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index 623398d..69a2295 100644 --- a/setup.sh +++ b/setup.sh @@ -476,7 +476,10 @@ detect_os_info() { # Normalize version: keep only major version version_full="$version" - if [[ "$version" =~ ^[0-9]+(\.[0-9]+)*$ ]]; then + if [[ "$version" == "rolling" ]]; then + # Arch Linux, no change + : + elif [[ "$version" =~ ^[0-9]+(\.[0-9]+)*$ ]]; then version="${version%%.*}" else echo "Warning: Could not detect a clean numeric version. Defaulting to unknown." From fec15e8a4b11e9eecf9abeab67b106bb8fc9f4f4 Mon Sep 17 00:00:00 2001 From: YuMao233 Date: Sat, 8 Nov 2025 21:56:50 +0800 Subject: [PATCH 303/338] fix: arch --- setup_cn.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/setup_cn.sh b/setup_cn.sh index 0a1ba01..101c4c3 100644 --- a/setup_cn.sh +++ b/setup_cn.sh @@ -476,7 +476,10 @@ detect_os_info() { # Normalize version: keep only major version version_full="$version" - if [[ "$version" =~ ^[0-9]+(\.[0-9]+)*$ ]]; then + if [[ "$version" == "rolling" ]]; then + # Arch Linux, no change + : + elif [[ "$version" =~ ^[0-9]+(\.[0-9]+)*$ ]]; then version="${version%%.*}" else echo "Warning: Could not detect a clean numeric version. Defaulting to unknown." @@ -1144,7 +1147,7 @@ extract_component_info() { if systemctl restart "$daemon_service"; then cprint green "Daemon service started." - sleep 1 # Allow service to init and write configs + sleep 3 # Allow service to init and write configs if [[ -f "$daemon_config_path" ]]; then daemon_key=$(grep -oP '"key"\s*:\s*"\K[^"]+' "$daemon_config_path") @@ -1179,7 +1182,7 @@ extract_component_info() { if systemctl restart "$web_service"; then cprint green "Web service started." - sleep 1 # Allow time to populate config + sleep 3 # Allow time to populate config if [[ -f "$web_config_path" ]]; then web_port=$(grep -oP '"httpPort"\s*:\s*\K[0-9]+' "$web_config_path") From 337ed6ef87271e3cc85df8c44a730065e18aa479 Mon Sep 17 00:00:00 2001 From: KevinLu Date: Sat, 8 Nov 2025 22:48:30 -0500 Subject: [PATCH 304/338] minor: fix os distro version check logic --- setup.sh | 55 +++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 45 insertions(+), 10 deletions(-) diff --git a/setup.sh b/setup.sh index 69a2295..e83f63e 100644 --- a/setup.sh +++ b/setup.sh @@ -474,18 +474,53 @@ detect_os_info() { fi fi - # Normalize version: keep only major version + # Normalize version: if purely numeric/dotted keep only major; otherwise leave as-is version_full="$version" - if [[ "$version" == "rolling" ]]; then - # Arch Linux, no change - : - elif [[ "$version" =~ ^[0-9]+(\.[0-9]+)*$ ]]; then + if [[ "$version" =~ ^[0-9]+(\.[0-9]+)*$ ]]; then version="${version%%.*}" - else - echo "Warning: Could not detect a clean numeric version. Defaulting to unknown." + fi + + # Resolve the supported_os key from $distro: + # 1) exact key match, 2) case-insensitive match over existing keys + distro_key="" + if [[ -n "$distro" ]]; then + if [[ -n "${supported_os[$distro]+_}" ]]; then + distro_key="$distro" + else + for k in "${!supported_os[@]}"; do + if [[ "${k,,}" == "${distro,,}" ]]; then + distro_key="$k" + break + fi + done + fi + fi + + # Validate the (possibly normalized) version against supported_os for this distro + if [[ -z "$distro_key" ]]; then + cprint red "Warning: OS '$distro' not recognized. Defaulting version to unknown." version="unknown" + elif [[ -z "$version" ]]; then + cprint red "Warning: Version is empty. Defaulting to unknown." + version="unknown" + else + match_ok=0 + for v in ${supported_os[$distro_key]}; do + if [[ "$v" == "$version" ]]; then + match_ok=1 + break + fi + done + if (( match_ok )); then + : + else + cprint red "Warning: Version '${version}' (from '${version_full}') not supported for ${distro_key}." + #version="unknown" + fi fi + + cprint cyan "Detected OS: $distro $version_full" cprint cyan "Detected Architecture: $arch" } @@ -496,13 +531,13 @@ check_supported_os() { local supported_versions="${supported_os[$distro]}" if [[ -z "$supported_versions" ]]; then - echo "Error: Distribution '$distro' is not supported by this installer." + cprint red "Error: Distribution '$distro' is not supported by this installer." return 1 fi if [[ "$supported_versions" != *"$version"* ]]; then - echo "Error: Version '$version' of '$distro' is not supported." - echo "Supported versions are: $supported_versions" + cprint red "Error: Version '$version' of '$distro' is not supported." + cprint red "Supported versions are: $supported_versions" return 1 fi From 0c0e99d0a9c5a44bc5bcf14f96f75ab3f2a75a2c Mon Sep 17 00:00:00 2001 From: KevinLu Date: Sun, 9 Nov 2025 21:57:52 -0500 Subject: [PATCH 305/338] misc: skip os version blocker --- setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index e83f63e..a606914 100644 --- a/setup.sh +++ b/setup.sh @@ -1400,7 +1400,7 @@ main() { safe_run check_root "Script must be run as root" safe_run parse_args "Failed to parse arguments" "$@" safe_run detect_os_info "Failed to detect OS" - safe_run check_supported_os "Unsupported OS or version" + # safe_run check_supported_os "Unsupported OS or version" # To be moved to a master pre check function. safe_run resolve_node_arch "Failed to resolve Node.js architecture" From cbfc41e17b41879ee25fff0648bb7734320d7356 Mon Sep 17 00:00:00 2001 From: KevinLu Date: Sun, 9 Nov 2025 22:07:40 -0500 Subject: [PATCH 306/338] misc: remove os version blocker --- setup.sh | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/setup.sh b/setup.sh index a606914..f843d89 100644 --- a/setup.sh +++ b/setup.sh @@ -525,26 +525,6 @@ detect_os_info() { cprint cyan "Detected Architecture: $arch" } - -# Check if current OS is supported -check_supported_os() { - local supported_versions="${supported_os[$distro]}" - - if [[ -z "$supported_versions" ]]; then - cprint red "Error: Distribution '$distro' is not supported by this installer." - return 1 - fi - - if [[ "$supported_versions" != *"$version"* ]]; then - cprint red "Error: Version '$version' of '$distro' is not supported." - cprint red "Supported versions are: $supported_versions" - return 1 - fi - - cprint green "OS compatibility check passed." - return 0 -} - # Check if all required commands are available check_required_commands() { local missing=0 @@ -1400,7 +1380,6 @@ main() { safe_run check_root "Script must be run as root" safe_run parse_args "Failed to parse arguments" "$@" safe_run detect_os_info "Failed to detect OS" - # safe_run check_supported_os "Unsupported OS or version" # To be moved to a master pre check function. safe_run resolve_node_arch "Failed to resolve Node.js architecture" From 0da8a78b1ec0f8012e10cb2e47929b1eca15681a Mon Sep 17 00:00:00 2001 From: KevinLu Date: Sun, 9 Nov 2025 22:13:56 -0500 Subject: [PATCH 307/338] misc: remove version collapse --- setup.sh | 48 +++--------------------------------------------- 1 file changed, 3 insertions(+), 45 deletions(-) diff --git a/setup.sh b/setup.sh index f843d89..7a3310b 100644 --- a/setup.sh +++ b/setup.sh @@ -476,51 +476,9 @@ detect_os_info() { # Normalize version: if purely numeric/dotted keep only major; otherwise leave as-is version_full="$version" - if [[ "$version" =~ ^[0-9]+(\.[0-9]+)*$ ]]; then - version="${version%%.*}" - fi - - # Resolve the supported_os key from $distro: - # 1) exact key match, 2) case-insensitive match over existing keys - distro_key="" - if [[ -n "$distro" ]]; then - if [[ -n "${supported_os[$distro]+_}" ]]; then - distro_key="$distro" - else - for k in "${!supported_os[@]}"; do - if [[ "${k,,}" == "${distro,,}" ]]; then - distro_key="$k" - break - fi - done - fi - fi - - # Validate the (possibly normalized) version against supported_os for this distro - if [[ -z "$distro_key" ]]; then - cprint red "Warning: OS '$distro' not recognized. Defaulting version to unknown." - version="unknown" - elif [[ -z "$version" ]]; then - cprint red "Warning: Version is empty. Defaulting to unknown." - version="unknown" - else - match_ok=0 - for v in ${supported_os[$distro_key]}; do - if [[ "$v" == "$version" ]]; then - match_ok=1 - break - fi - done - if (( match_ok )); then - : - else - cprint red "Warning: Version '${version}' (from '${version_full}') not supported for ${distro_key}." - #version="unknown" - fi - fi - - - + #if [[ "$version" =~ ^[0-9]+(\.[0-9]+)*$ ]]; then + # version="${version%%.*}" + #fi cprint cyan "Detected OS: $distro $version_full" cprint cyan "Detected Architecture: $arch" } From c9f23279cd89dfe58a860927d9fa0f95e374e5d7 Mon Sep 17 00:00:00 2001 From: KevinLu Date: Sun, 9 Nov 2025 22:25:04 -0500 Subject: [PATCH 308/338] misc: removed version blocker --- setup_cn.sh | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/setup_cn.sh b/setup_cn.sh index 101c4c3..cb2c8d2 100644 --- a/setup_cn.sh +++ b/setup_cn.sh @@ -476,40 +476,10 @@ detect_os_info() { # Normalize version: keep only major version version_full="$version" - if [[ "$version" == "rolling" ]]; then - # Arch Linux, no change - : - elif [[ "$version" =~ ^[0-9]+(\.[0-9]+)*$ ]]; then - version="${version%%.*}" - else - echo "Warning: Could not detect a clean numeric version. Defaulting to unknown." - version="unknown" - fi - cprint cyan "Detected OS: $distro $version_full" cprint cyan "Detected Architecture: $arch" } - -# Check if current OS is supported -check_supported_os() { - local supported_versions="${supported_os[$distro]}" - - if [[ -z "$supported_versions" ]]; then - echo "Error: Distribution '$distro' is not supported by this installer." - return 1 - fi - - if [[ "$supported_versions" != *"$version"* ]]; then - echo "Error: Version '$version' of '$distro' is not supported." - echo "Supported versions are: $supported_versions" - return 1 - fi - - cprint green "OS compatibility check passed." - return 0 -} - # Check if all required commands are available check_required_commands() { local missing=0 @@ -1365,7 +1335,6 @@ main() { safe_run check_root "Script must be run as root" safe_run parse_args "Failed to parse arguments" "$@" safe_run detect_os_info "Failed to detect OS" - safe_run check_supported_os "Unsupported OS or version" # To be moved to a master pre check function. safe_run resolve_node_arch "Failed to resolve Node.js architecture" From c04101a6e7c78e9286b012c2f11f3ae7b40f19e1 Mon Sep 17 00:00:00 2001 From: Capslock800000 Date: Thu, 27 Nov 2025 20:29:57 +0800 Subject: [PATCH 309/338] =?UTF-8?q?=E6=B1=89=E5=8C=96=E4=BA=86=E4=B8=AD?= =?UTF-8?q?=E6=96=87=E5=AE=89=E8=A3=85=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup_cn.sh | 386 ++++++++++++++++++++++++++-------------------------- 1 file changed, 193 insertions(+), 193 deletions(-) diff --git a/setup_cn.sh b/setup_cn.sh index cb2c8d2..95a681d 100644 --- a/setup_cn.sh +++ b/setup_cn.sh @@ -1,9 +1,9 @@ #!/bin/bash -# Official MCSManager installation script. -# This script installs or updates the MCSManager Web and/or Daemon to the latest version. +# MCSManager官方安装脚本. +# 这个脚本将会把MCSManager服务端和节点服务端更新/安装至最新发布版本. # ------------------------------------------------------------------------------ -# Supported Linux distributions: -# This script supports the following mainstream Linux distributions: +# 受支持的Linux: +# 此脚本支持以下Linux发行版: # - Ubuntu: 18.04, 20.04, 22.04, 24.04 # - Debian: 10, 11, 12, 13 # - CentOS: 7, 8 Stream, 9 Stream, 10 Stream @@ -186,13 +186,13 @@ check_root() { # Using Bash's built-in EUID variable if [ -n "$EUID" ]; then if [ "$EUID" -ne 0 ]; then - cprint red "Error: This script must be run as root. Please use sudo or switch to the root user." + cprint red "错误: 这个脚本只能运行在root或sudo模式下,请尝试切换用户或者使用sudo." exit 1 fi else # Fallback to using id -u if EUID is unavailable (e.g., non-Bash shell or misconfigured environment) if [ "$(id -u)" -ne 0 ]; then - cprint red "Error: This script must be run as root. Please use sudo or switch to the root user." + cprint red "错误: 这个脚本只能运行在root或sudo模式下,请尝试切换用户或者使用sudo." exit 1 fi fi @@ -213,15 +213,15 @@ detect_terminal_capabilities() { fi if [ "$SUPPORTS_COLOR" = true ]; then - cprint green "[OK] Terminal supports colored output." + cprint green "[OK] 这个终端支持彩色输出." else - cprint yellow "Note: Terminal does not support colored output. Continuing without formatting." + cprint yellow "注:终端不支持彩色输出。不格式化继续." fi if [ "$SUPPORTS_STYLE" = true ]; then - cprint green "[OK] Terminal supports bold and underline formatting." + cprint green "[OK] 终端支持粗体和下划线格式." else - cprint yellow "Note: Terminal does not support advanced text styles." + cprint yellow "注意:终端不支持高级文本样式." fi } @@ -231,7 +231,7 @@ is_component_installed() { local component_path="${install_dir}/${component_name}" if [[ -d "$component_path" ]]; then - cprint green "Component '$component_name' is already installed at $component_path" + cprint green "组件 '$component_name' 已经被安装在 $component_path" # Set corresponding global variable if [[ "$component_name" == "daemon" ]]; then @@ -242,7 +242,7 @@ is_component_installed() { return 0 else - cprint yellow "Component '$component_name' is not installed" + cprint yellow "组件 '$component_name' 未被安装" # Set corresponding global variable if [[ "$component_name" == "daemon" ]]; then @@ -260,7 +260,7 @@ check_component_permission() { local service_file="${systemd_file}${component}.service" if [[ ! -f "$service_file" ]]; then - cprint yellow "Service file not found: $service_file" + cprint yellow "找不到服务文件: $service_file" return 0 # nothing changed fi @@ -277,7 +277,7 @@ check_component_permission() { # Validate user if [[ "$user" != "root" && "$user" != "mcsm" ]]; then - cprint red bold "Unsupported user '$user' in $service_file. Expected 'root' or 'mcsm'." + cprint red bold "不支持的用户 '$user' 在 $service_file. 使用 'root' 或 'mcsm'." exit 1 fi @@ -288,7 +288,7 @@ check_component_permission() { daemon_installed_user="$user" fi - cprint cyan "Detected $component installed as user: $user" + cprint cyan "已删除 $component 以用户身份安装: $user" return 0 } @@ -304,7 +304,7 @@ parse_args() { install_dir="$2" shift 2 else - echo "Error: --install-dir requires a path argument." + echo "错误:--install-dir需要一个路径参数." exit 1 fi ;; @@ -313,7 +313,7 @@ parse_args() { node_install_dir="$2" shift 2 else - echo "Error: --node-install-dir requires a path argument." + echo "错误:--node-install-dir需要一个路径参数." exit 1 fi ;; @@ -342,15 +342,15 @@ parse_args() { check_component_permission "web" ;; *) - echo "Error: Invalid value for --install. Expected 'daemon', 'web', or 'all'." + echo "错误:--install的值无效。期望‘daemon’, ‘web’或‘all’." echo "Usage: --install daemon|web|all" exit 1 ;; esac shift 2 else - echo "Error: --install flag provided but no value. Please specify: daemon, web, or all." - echo "Usage: --install daemon|web|all" + echo "错误:提供了--install标志,但没有值。请指定:daemon、web或all." + echo "使用方法: --install daemon|web|all" exit 1 fi ;; @@ -364,14 +364,14 @@ parse_args() { install_user="mcsm" ;; *) - echo "Error: Invalid user '$2'. Only 'root' and 'mcsm' are supported." - echo "Usage: --user root|mcsm" + echo "错误:无效用户 '$2'. 只有 'root' 和 'mcsm' 受支持." + echo "使用方法: --user root|mcsm" exit 1 ;; esac shift 2 else - echo "Error: --user requires a value (root or mcsm)." + echo "错误:--user需要一个值 (root 或 mcsm)." exit 1 fi ;; @@ -380,7 +380,7 @@ parse_args() { install_source_path="$2" shift 2 else - echo "Error: --install-source requires a file path." + echo "错误:--install-source需要文件路径." exit 1 fi ;; @@ -389,7 +389,7 @@ parse_args() { shift ;; *) - echo "Error: Unknown argument: $1" + echo "错误:未知参数t: $1" exit 1 ;; esac @@ -476,8 +476,8 @@ detect_os_info() { # Normalize version: keep only major version version_full="$version" - cprint cyan "Detected OS: $distro $version_full" - cprint cyan "Detected Architecture: $arch" + cprint cyan "检测到操作系统: $distro $version_full" + cprint cyan "检测到架构: $arch" } # Check if all required commands are available @@ -486,17 +486,17 @@ check_required_commands() { for cmd in "${required_commands[@]}"; do if ! command -v "$cmd" >/dev/null 2>&1; then - echo "Error: Required command '$cmd' is not available in PATH." + echo "错误:必需的命令 '$cmd' 在PATH中不可用." missing=1 fi done if [ "$missing" -ne 0 ]; then - echo "One or more required commands are missing. Please install them and try again." + echo "缺少一个或多个必需的命令。请安装后再试." return 1 fi - cprint green "All required commands are available." + cprint green "所有必需的命令都可用." return 0 } @@ -566,7 +566,7 @@ cprint() { # Permission check before proceed with installation permission_barrier() { if [[ "$web_installed" == false && "$daemon_installed" == false ]]; then - cprint cyan "No components currently installed — skipping permission check." + cprint cyan "当前没有安装组件-跳过权限检查." return 0 fi @@ -579,29 +579,29 @@ permission_barrier() { # Step 0: Ensure installed user is detected if [[ -z "$installed_user" ]]; then - cprint red bold "Detected that '$component' is installed but could not determine the user from its systemd service file." - cprint red "This may indicate a custom or unsupported service file setup." - cprint red "Refusing to proceed to avoid potential conflicts." + cprint red bold "检测到 '$component' 已安装,但无法从其systemd服务文件确定用户." + cprint red "这可能表示自定义或不支持的服务文件设置." + cprint red "拒绝执行以避免潜在的冲突." exit 1 fi # Step 1: User match check with optional force override if [[ "$installed_user" != "$install_user" ]]; then if [[ "$force_permission" == true ]]; then - cprint yellow bold "Permission mismatch for '$component':" - cprint yellow "Installed as user: $installed_user" - cprint yellow "Target install user: $install_user" - cprint yellow "User mismatch, but --force-permission is set. Continuing and updating permissions..." + cprint yellow bold "权限不匹配 '$component':" + cprint yellow "以用户身份安装: $installed_user" + cprint yellow "目标安装用户: $install_user" + cprint yellow "用户不匹配,但设置了--force-permission。继续和更新权限…" sleep 3 else - cprint red bold "Permission mismatch for '$component':" - cprint red "Installed as user: $installed_user" - cprint red "Current install target user: $install_user" - cprint red "Unable to proceed due to ownership conflict. Use --force-permission to override and update file permission." + cprint red bold "权限不匹配 '$component':" + cprint red "以用户身份安装: $installed_user" + cprint red "目标安装用户: $install_user" + cprint red "用户不匹配,但设置了--force-permission。继续和更新权限..." exit 1 fi else - cprint green bold "Permission check passed: '$installed_user' matches target user." + cprint green bold "权限检查已通过: '$installed_user' 匹配目标用户." fi fi @@ -612,30 +612,30 @@ permission_barrier() { dir_owner=$(stat -c '%U' "$install_dir" 2>/dev/null) if [[ -z "$dir_owner" ]]; then - cprint red bold "Unable to determine owner of install_dir: $install_dir" + cprint red bold "无法确定安装目录的所有者: $install_dir" exit 1 fi if [[ "$dir_owner" != "$install_user" ]]; then if [[ "$force_permission" == true ]]; then - cprint yellow bold "Install directory ownership mismatch:" - cprint yellow " Directory: $install_dir" - cprint yellow " Owned by: $dir_owner" - cprint yellow " Expected: $install_user" - cprint yellow " --force-permission is set. Continuing despite mismatch." + cprint yellow bold "安装目录所有权不匹配:" + cprint yellow " 目录: $install_dir" + cprint yellow " 归: $dir_owner" + cprint yellow " 预期: $install_user" + cprint yellow " --force-permission设置。尽管不匹配,但继续." sleep 3 else - cprint red bold "Install directory ownership mismatch:" - cprint red " Directory: $install_dir" - cprint red " Owned by: $dir_owner" - cprint red " Expected: $install_user" + cprint red bold "安装目录所有权不匹配:" + cprint red " 目录: $install_dir" + cprint red " 归: $dir_owner" + cprint red " 预期: $install_user" exit 1 fi else - cprint green bold "Install directory ownership check passed: '$install_dir' is owned by '$install_user'." + cprint green bold "安装目录所有权检查通过: '$install_dir' is owned by '$install_user'." fi - cprint green bold "Permissions and ownership validated. Proceeding." + cprint green bold "验证了权限和所有权。继续." return 0 } @@ -655,7 +655,7 @@ resolve_node_arch() { node_arch="armv7l" ;; *) - cprint red bold "Unsupported architecture for Node.js: $arch" + cprint red bold "Node.js不支持的架构: $arch" return 1 ;; esac @@ -663,8 +663,8 @@ resolve_node_arch() { # Assign node_path based on resolved arch and current version/install dir node_path="${node_install_dir}/node-${node_version}-linux-${node_arch}" - cprint cyan "Resolved Node.js architecture: $node_arch" - cprint cyan "Node.js install path: $node_path" + cprint cyan "解析了Node.js架构: $node_arch" + cprint cyan "Node.js安装路径: $node_path" } # Check if Node.js at PATH is valid. @@ -722,27 +722,27 @@ check_node_installed() { case $result in 0) - cprint green bold "Node.js and npm found at $node_path (version $required_node_ver or compatible)" + cprint green bold "Node.js和npm在 $node_path (版本 $required_node_ver 或兼容)" install_node=false ;; 1) - cprint yellow bold "Node.js binary not found or unusable at $node_path" + cprint yellow bold "Node.js二进制文件未找到或无法使用 $node_path" install_node=true ;; 2) - cprint red bold "Node.js version at $node_path is too old. Required: >= $required_node_ver" + cprint red bold "Node.js版本 $node_path 太老. 要求: >= $required_node_ver" install_node=true ;; 3) - cprint red bold "Node.js version mismatch. Required: $required_node_ver, found something else." + cprint red bold "Node.js版本不匹配。要求: $required_node_ver, 发现了其他的Node.js版本." install_node=true ;; 4) - cprint red bold "Node.js is present but npm is missing or broken." + cprint red bold "Node.js存在,但npm缺失或损坏." install_node=true ;; *) - cprint red bold "Unexpected error in node verification." + cprint red bold "Node验证中出现意外错误." install_node=true ;; esac @@ -752,10 +752,10 @@ check_node_installed() { postcheck_node_after_install() { verify_node_at_path "$node_path" if [[ $? -ne 0 ]]; then - cprint red bold "Node.js installation failed or is invalid at $node_path" + cprint red bold "Node.js安装失败或无效 $node_path" return 1 else - cprint green bold "Node.js is installed and functioning at $node_path" + cprint green bold "Node.js的安装和运行在 $node_path" return 0 fi } @@ -768,70 +768,70 @@ install_node() { local download_url="${node_download_url_base}${node_version}/${archive_name}" local fallback="$node_download_fallback" - cprint cyan bold "Installing Node.js $node_version for arch: $node_arch" + cprint cyan bold "安装Node.js $node_version 架构: $node_arch" mkdir -p "$node_install_dir" || { - cprint red bold "Failed to create node install directory: $node_install_dir" + cprint red bold "创建Node安装目录失败: $node_install_dir" return 1 } # Download - cprint cyan "Downloading Node.js from: $download_url" + cprint cyan "下载Node.js: $download_url" if ! wget --progress=bar:force -O "$archive_path" "$download_url"; then - cprint yellow "Primary download failed. Attempting fallback..." + cprint yellow "主下载失败。尝试备用下载……" if [[ -n "$fallback" ]]; then if [[ "$fallback" =~ ^https?:// ]]; then - cprint cyan "Downloading from fallback URL: $fallback" + cprint cyan "从备用URL下载: $fallback" if ! wget --progress=bar:force -O "$archive_path" "$fallback"; then - cprint red bold "Fallback download failed from: $fallback" + cprint red bold "备用下载失败: $fallback" return 1 fi elif [ -f "$fallback" ]; then - cprint cyan "Copying from local fallback: $fallback" + cprint cyan "从本地备份进行复制: $fallback" cp "$fallback" "$archive_path" || { - cprint red bold "Failed to copy fallback Node.js archive from $fallback" + cprint red bold "复制备用Node.js存档失败 $fallback" return 1 } else - cprint red bold "Invalid fallback path: $fallback" + cprint red bold "无效的备用路径: $fallback" return 1 fi else - cprint red bold "No fallback source configured. Cannot proceed." + cprint red bold "没有配置备用源。不能继续进行." return 1 fi fi # Extract archive - cprint cyan "Extracting Node.js archive..." + cprint cyan "提取Node.js存档..." if ! tar -xf "$archive_path" -C "$node_install_dir"; then - cprint red bold "Failed to extract Node.js archive." + cprint red bold "提取Node.js文件失败." return 1 fi chmod -R a+rx "$target_dir" || { - cprint red bold "Failed to set execute permissions on Node.js files." + cprint red bold "在Node.js文件上设置执行权限失败." return 1 } verify_node_at_path "$target_dir" local result=$? if [[ $result -ne 0 ]]; then - cprint red bold "Node.js installation failed verification." + cprint red bold "Node.js安装验证失败." return 1 fi - cprint cyan "Cleaning up archive..." + cprint cyan "清理文件……" rm -f "$archive_path" - cprint green bold "Node.js $node_version installed successfully at $target_dir" + cprint green bold "Node.js $node_version 安装成功 $target_dir" # Save resolved binary paths to global variables node_bin_path="${target_dir}/bin/node" npm_bin_path="${target_dir}/bin/npm" - cprint green "Node.js binary: $node_bin_path" - cprint green "npm binary: $npm_bin_path" + cprint green "Node.js 二进制文件: $node_bin_path" + cprint green "npm 二进制文件: $npm_bin_path" return 0 } @@ -843,29 +843,29 @@ download_mcsm() { local primary_url="${download_base_url}${archive_name}" local fallback="$download_fallback_url" - cprint cyan bold "Downloading MCSManager package..." + cprint cyan bold "下载MCSManager安装包…" # Step 1: Try downloading from primary URL if ! wget --progress=bar:force -O "$archive_path" "$primary_url"; then - cprint yellow "Primary download failed. Attempting fallback source..." + cprint yellow "主下载失败。尝试备用资源…" if [[ -z "$fallback" ]]; then - cprint red bold "No fallback URL or path specified." + cprint red bold "没有指定备用URL或路径." return 1 fi if [[ "$fallback" =~ ^https?:// ]]; then if ! wget --progress=bar:force -O "$archive_path" "$fallback"; then - cprint red bold "Fallback download failed from $fallback" + cprint red bold "备用下载失败 $fallback" return 1 fi elif [[ -f "$fallback" ]]; then cp "$fallback" "$archive_path" || { - cprint red bold "Failed to copy fallback archive from $fallback" + cprint red bold "未能复制备用文件 $fallback" return 1 } else - cprint red bold "Fallback path is invalid: $fallback" + cprint red bold "备用路径无效: $fallback" return 1 fi fi @@ -876,18 +876,18 @@ download_mcsm() { local extracted_tmp_path="${tmp_dir}/mcsm_${suffix}" if [[ -e "$extracted_tmp_path" ]]; then - cprint red bold "Temporary extract path already exists: $extracted_tmp_path" + cprint red bold "临时提取路径已存在: $extracted_tmp_path" return 1 fi mkdir -p "$extracted_tmp_path" || { - cprint red bold "Failed to create temporary extract directory: $extracted_tmp_path" + cprint red bold "创建临时解压目录失败: $extracted_tmp_path" return 1 } - cprint cyan "Extracting archive to $extracted_tmp_path..." + cprint cyan "将存档提取到 $extracted_tmp_path..." if ! tar -xzf "$archive_path" -C "$extracted_tmp_path"; then - cprint red bold "Failed to extract archive." + cprint red bold "提取存档失败." rm -rf "$extracted_tmp_path" return 1 fi @@ -898,82 +898,82 @@ download_mcsm() { install_tmp_dir="${install_dir}/mcsm_${suffix}" if [[ -e "$install_tmp_dir" ]]; then - cprint red bold "Install target already exists at $install_tmp_dir" - cprint red " Please remove or rename it before proceeding." + cprint red bold "安装目标已经存在 $install_tmp_dir" + cprint red " 请在继续之前删除或重命名它." return 1 fi mv "$extracted_tmp_path" "$install_tmp_dir" || { - cprint red bold "Failed to move extracted files to $install_tmp_dir" + cprint red bold "未能将解压缩的文件移动到 $install_tmp_dir" return 1 } - cprint green bold "MCSManager source extracted and moved to: $install_tmp_dir" + cprint green bold "MCSManager源提取并移动到: $install_tmp_dir" return 0 } # Prepare user if needed prepare_user() { if [[ "$install_user" == "root" ]]; then - cprint cyan "install_user is 'root' — skipping user creation." + cprint cyan "安装用户是'root' -跳过用户创建." return 0 fi # Check if user already exists if id "$install_user" &>/dev/null; then - cprint green "User '$install_user' already exists." + cprint green "用户 '$install_user' 已经存在." else - cprint cyan "Creating system user: $install_user (nologin, no password)..." + cprint cyan "创建系统用户: $install_user (无登录,无密码)..." if ! useradd --system --home "$install_dir" --shell /usr/sbin/nologin "$install_user"; then - cprint red bold "Failed to create user: $install_user" + cprint red bold "创建用户失败: $install_user" exit 1 fi - cprint green "User '$install_user' created." + cprint green "用户 '$install_user' 已创建." fi # Docker integration if command -v docker &>/dev/null; then - cprint cyan "Docker is installed — checking group assignment..." + cprint cyan "Docker已被安装 -检查组分配…" if getent group docker &>/dev/null; then if id -nG "$install_user" | grep -qw docker; then - cprint green "User '$install_user' is already in the 'docker' group." + cprint green "用户 '$install_user' 已经在“docker”组中." else - cprint cyan "Adding user '$install_user' to 'docker' group..." + cprint cyan "添加用户 '$install_user' 到 'docker' 组..." if usermod -aG docker "$install_user"; then - cprint green "Docker group access granted to '$install_user'." + cprint green "授予的Docker组访问权限 '$install_user'." else - cprint red "Failed to add '$install_user' to 'docker' group. Docker may not be usable by this user." + cprint red "未能添加 '$install_user' 给“Docker”组。这个用户可能无法使用Docker." fi fi else - cprint red "Docker installed but 'docker' group not found. Skipping group assignment." + cprint red "安装了Docker,但没有找到Docker组。跳过组分配." fi else - cprint yellow "Docker not installed — skipping Docker group configuration." + cprint yellow "未安装Docker -跳过Docker组配置." fi return 0 } # Function to stop MCSM services if they exist stop_mcsm_services() { - cprint yellow bold "Attempting to stop mcsm-web and mcsm-daemon services..." + cprint yellow bold "试图停止mcsm-web和mcsm-daemon服务..." # Attempt to stop mcsm-web - cprint blue "Stopping mcsm-web..." + cprint blue "正在停止 mcsm-web..." if systemctl stop mcsm-web; then - cprint green "mcsm-web stopped successfully." + cprint green "mcsm-web 已停止." else - cprint red bold "Warning: Failed to stop mcsm-web (may not exist or already stopped)." + cprint red bold "警告:未能停止mcsm-web(可能不存在或已停止)." fi # Attempt to stop mcsm-daemon - cprint blue "Stopping mcsm-daemon..." + cprint blue "正在停止 mcsm-daemon..." if systemctl stop mcsm-daemon; then - cprint green "mcsm-daemon stopped successfully." + cprint green "mcsm-daemon 已停止." else - cprint red bold "Warning: Failed to stop mcsm-daemon (may not exist or already stopped)." + cprint red bold "警告:未能停止mcsm-daemon(可能不存在或已停止)." fi } # Prepare file & permissions before install. @@ -983,13 +983,13 @@ mcsm_install_prepare() { stop_mcsm_services if [[ ! -d "$install_tmp_dir" ]]; then - cprint red bold "install_tmp_dir does not exist: $install_tmp_dir" + cprint red bold "临时安装目录不存在: $install_tmp_dir" exit 1 fi - cprint cyan "Changing ownership of $install_tmp_dir to user '$install_user'..." + cprint cyan "改变所有权 $install_tmp_dir 到用户 '$install_user'..." chown -R "$install_user":"$install_user" "$install_tmp_dir" || { - cprint red bold "Failed to change ownership of $install_tmp_dir" + cprint red bold "所有权变更失败 $install_tmp_dir" cleanup_install_tmp exit 1 } @@ -998,11 +998,11 @@ mcsm_install_prepare() { [[ "${install_dir}" != */ ]] && install_dir="${install_dir}/" if [[ "$web_installed" == false && "$daemon_installed" == false ]]; then - cprint cyan "No existing components detected — skipping data backup/cleanup." + cprint cyan "没有检测到现有组件-跳过数据备份/清理." return 0 fi - cprint green bold "Existing components prepared successfully." + cprint green bold "已成功准备现有组件." return 0 } @@ -1013,49 +1013,49 @@ install_component() { local backup_data_path="${install_dir}${backup_prefix}${component}" local source_path="${install_tmp_dir}/mcsmanager/${component}" - cprint cyan bold "Installing/Updating component: $component" + cprint cyan bold "安装/更新组件: $component" # Step 1: Move new component to install_dir if [[ ! -d "$source_path" ]]; then - cprint red bold "Source directory not found: $source_path" + cprint red bold "找不到源目录: $source_path" cleanup_install_tmp exit 1 fi if cp -a "$source_path"/. "$target_path"; then - cprint green "Updated files from $source_path → $target_path" + cprint green "更新的文件 $source_path → $target_path" rm -rf "$source_path" else - cprint red bold "Failed to update files from $source_path → $target_path" + cprint red bold "更新文件失败 $source_path → $target_path" cleanup_install_tmp exit 1 fi - cprint green "Moved $component to $target_path" + cprint green "已移动 $component 到 $target_path" # Step 3: Install NPM dependencies if [[ ! -x "$npm_bin_path" ]]; then - cprint red bold "npm binary not found or not executable: $npm_bin_path" + cprint red bold "找不到npm二进制文件或无法执行: $npm_bin_path" cleanup_install_tmp exit 1 fi - cprint cyan "Installing dependencies for $component using npm..." + cprint cyan "正在使用npm安装依赖库 $component ..." pushd "$target_path" >/dev/null || { - cprint red bold "Failed to change directory to $target_path" + cprint red bold "更改目录失败 $target_path" cleanup_install_tmp exit 1 } if ! "$node_bin_path" "$npm_bin_path" install --no-audit --no-fund --loglevel=warn; then - cprint red bold "NPM dependency installation failed for $component" + cprint red bold "NPM依赖项安装失败 $component" popd >/dev/null cleanup_install_tmp exit 1 fi popd >/dev/null - cprint green bold "Component '$component' installed/updated successfully." + cprint green bold "组件 '$component' 安装/更新成功." } # Create systemd service for a given component. @@ -1067,12 +1067,12 @@ create_systemd_service() { local exec="${node_bin_path} app.js" if [[ ! -d "$working_dir" ]]; then - cprint red bold "Component directory not found: $working_dir" + cprint red bold "找不到组件目录: $working_dir" cleanup_install_tmp return 1 fi - cprint cyan "Creating systemd service for '$component'..." + cprint cyan "创建systemd服务 '$component'..." cat > "$service_path" </dev/null | awk '{print $1}') - [[ -z "$ip_address" ]] && ip_address="YOUR-IP" + [[ -z "$ip_address" ]] && ip_address="你的IP" # Daemon info if [[ "$install_daemon" == true ]]; then local daemon_address="ws://$ip_address:${daemon_port:-Failed to Retrieve from Config file}" local daemon_key_display="${daemon_key:-Failed to Retrieve from Config file}" - cprint yellow noprefix "Daemon Address:" + cprint yellow noprefix "守护进程地址:" cprint white noprefix " $daemon_address" - cprint yellow noprefix "Daemon Key:" + cprint yellow noprefix "守护进程秘钥:" cprint white noprefix " $daemon_key_display" echo "" fi @@ -1229,20 +1229,20 @@ print_install_result() { # Web info if [[ "$install_web" == true ]]; then local web_address="http://$ip_address:${web_port:-Failed to Retrieve from Config file}" - cprint yellow noprefix "HTTP Web Interface:" + cprint yellow noprefix "HTTP面板地址:" cprint white noprefix nonl " $web_address " - cprint yellow noprefix "(open in browser)" + cprint yellow noprefix "(在你的浏览器中打开)" echo "" fi # Port guidance - cprint yellow noprefix "NOTE:" - cprint white noprefix " Make sure to expose the above ports through your firewall." - cprint white noprefix " If accessing from outside your network, you may need to configure port forwarding on your router." + cprint yellow noprefix "注意:" + cprint white noprefix " 确保防火墙放行上述端口." + cprint white noprefix " 如果从外部网络访问,您可能需要在路由器上配置端口转发." echo "" # Service management help - cprint yellow noprefix "Service Management Commands:" + cprint yellow noprefix "MCSManager管理命令:" if [[ "$install_daemon" == true ]]; then cprint white noprefix nonl " systemctl start " cprint yellow noprefix "mcsm-daemon.service" @@ -1266,23 +1266,23 @@ print_install_result() { echo "" # Official doc - cprint yellow noprefix "Official Documentation:" - cprint white noprefix " https://docs.mcsmanager.com/" + cprint yellow noprefix "官方文档:" + cprint white noprefix " https://docs.mcsmanager.com/zh_cn/" echo "" # HTTPS support - cprint yellow noprefix "Need HTTPS?" - cprint white noprefix " To enable secure HTTPS access, configure a reverse proxy:" - cprint white noprefix " https://docs.mcsmanager.com/ops/proxy_https.html" + cprint yellow noprefix "需要HTTPS?" + cprint white noprefix " 为了开启HTTPS安全访问,需要配置反向代理:" + cprint white noprefix " https://docs.mcsmanager.com/zh_cn/ops/proxy_https.html" echo "" if [[ "$force_permission" == true ]]; then - cprint red noprefix "[Important] You chose to override permission during install." - cprint red noprefix " You may need to run: chown -R $install_user to update permission manually." + cprint red noprefix "[重点] 您选择在安装期间重写权限." + cprint red noprefix " 你可能需要运行: chown -R $install_user 手动更新权限." fi # Closing message - cprint green noprefix "Installation completed. Enjoy managing your servers with MCSManager!" + cprint green noprefix "安装完成。享受使用MCSManager管理服务器的乐趣!" echo "" } @@ -1303,18 +1303,18 @@ install_mcsm() { # Reload systemd after any service file changes if (( ${#components[@]} > 0 )); then - cprint cyan "Reloading systemd daemon..." + cprint cyan "重新加载systemd守护进程..." # systemctl daemon-reexec systemctl daemon-reload for comp in "${components[@]}"; do local svc="mcsm-${comp}.service" - cprint cyan "Enabling service: $svc" + cprint cyan "启用服务: $svc" if systemctl enable "$svc" &>/dev/null; then - cprint green "Enabled service: $svc" + cprint green "已启用服务: $svc" else - cprint red bold "Failed to enable service: $svc" + cprint red bold "启用服务失败: $svc" cleanup_install_tmp exit 1 fi @@ -1324,34 +1324,34 @@ install_mcsm() { # Clean tmp dir cleanup_install_tmp # Extract installed component info - safe_run extract_component_info "Failed to extract runtime info from installed services" - safe_run print_install_result "Failed to print installation result" + safe_run extract_component_info "未能从已安装的服务中提取运行时信息" + safe_run print_install_result "未能打印安装结果" } main() { - trap 'echo "Unexpected error occurred."; exit 99' ERR - safe_run detect_terminal_capabilities "Failed to detect terminal capabilities" - safe_run check_root "Script must be run as root" - safe_run parse_args "Failed to parse arguments" "$@" - safe_run detect_os_info "Failed to detect OS" + trap 'echo "发生意外错误."; exit 99' ERR + safe_run detect_terminal_capabilities "检测终端功能失败" + safe_run check_root "脚本必须以root身份运行" + safe_run parse_args "解析参数失败" "$@" + safe_run detect_os_info "OS检测失败" # To be moved to a master pre check function. - safe_run resolve_node_arch "Failed to resolve Node.js architecture" + safe_run resolve_node_arch "解析Node.js架构失败" - safe_run check_required_commands "Missing required system commands" + safe_run check_required_commands "缺少必要的系统命令" - safe_run check_node_installed "Failed to detect Node.js or npm at expected path. Node.js will be installed." + safe_run check_node_installed "在预期目录上检测到Node.js或npm失败。Node.js将被安装." if [ "$install_node" = true ]; then - safe_run install_node "Node.js installation failed" + safe_run install_node "Node.js安装失败" fi - safe_run permission_barrier "Permission validation failed — aborting install" + safe_run permission_barrier "权限验证失败-中止安装" - safe_run prepare_user "Failed to prepare user permission." + safe_run prepare_user "准备用户权限失败。处理步骤." - safe_run download_mcsm "Failed to acquire MCSManager source" - safe_run mcsm_install_prepare "Error while preparing for installation" + safe_run download_mcsm "获取MCSManager源失败。处理步骤" + safe_run mcsm_install_prepare "准备安装时出错" - safe_run install_mcsm "Failed to install MCSManager" + safe_run install_mcsm "未能安装 MCSManager" } main "$@" \ No newline at end of file From 21fd75fbb72e83a24f8d676a53b988cc4db4746a Mon Sep 17 00:00:00 2001 From: SkyKing_PX Date: Mon, 1 Dec 2025 06:50:33 +0000 Subject: [PATCH 310/338] Updated Market --- market.json | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/market.json b/market.json index 2b4c954..be66063 100644 --- a/market.json +++ b/market.json @@ -492,11 +492,11 @@ "hardware": "RAM 8G+", "size": "100MB", "remark": "Minecraft Paper", - "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.10/builds/84/downloads/paper-1.21.10-84.jar", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.10/builds/117/downloads/paper-1.21.10-117.jar", "author": "papermc.io", "setupInfo": { "type": "minecraft/java/paper", - "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.10-84.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.10-117.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -585,11 +585,11 @@ "hardware": "RAM 8G+", "size": "55MB", "remark": "Minecraft Purpur", - "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.10-2511-experimental.jar", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.10-2531.jar", "author": "purpurmc.org", "setupInfo": { "type": "minecraft/java/purpur", - "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.10-2511-experimental.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.10-2531.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -655,13 +655,13 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.10-60.0.11/forge-1.21.10-60.0.11-installer.jar", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.10-60.1.0/forge-1.21.10-60.1.0-installer.jar", "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar forge-1.21.10-60.0.11-installer.jar --installServer", + "updateCommand": "java -jar forge-1.21.10-60.1.0-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -678,13 +678,13 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.10-60.0.11/forge-1.21.10-60.0.11-installer.jar", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.10-60.1.0/forge-1.21.10-60.1.0-installer.jar", "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", "startCommand": ".\\run.bat", "stopCommand": "stop", - "updateCommand": "java -jar forge-1.21.10-60.0.11-installer.jar --installServer", + "updateCommand": "java -jar forge-1.21.10-60.1.0-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -701,13 +701,13 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.8-58.1.7/forge-1.21.8-58.1.7-installer.jar", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.8-58.1.9/forge-1.21.8-58.1.9-installer.jar", "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar forge-1.21.8-58.1.7-installer.jar --installServer", + "updateCommand": "java -jar forge-1.21.8-58.1.9-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -724,13 +724,13 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.8-58.1.7/forge-1.21.8-58.1.7-installer.jar", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.8-58.1.9/forge-1.21.8-58.1.9-installer.jar", "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", "startCommand": ".\\run.bat", "stopCommand": "stop", - "updateCommand": "java -jar forge-1.21.8-58.1.7-installer.jar --installServer", + "updateCommand": "java -jar forge-1.21.8-58.1.9-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -840,13 +840,13 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft NeoForge", - "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.10.32-beta/neoforge-21.10.32-beta-installer.jar", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.10.63/neoforge-21.10.63-installer.jar", "author": "neoforged.net", "setupInfo": { "type": "minecraft/java/neoforge", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar neoforge-21.10.32-beta-installer.jar --installServer", + "updateCommand": "java -jar neoforge-21.10.63-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -863,13 +863,13 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft NeoForge", - "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.10.32-beta/neoforge-21.10.32-beta-installer.jar", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.10.63/neoforge-21.10.63-installer.jar", "author": "neoforged.net", "setupInfo": { "type": "minecraft/java/neoforge", "startCommand": ".\\run.bat", "stopCommand": "stop", - "updateCommand": "java -jar neoforge-21.10.32-beta-installer.jar --installServer", + "updateCommand": "java -jar neoforge-21.10.63-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -886,13 +886,13 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft NeoForge", - "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.8.48/neoforge-21.8.48-installer.jar", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.8.52/neoforge-21.8.52-installer.jar", "author": "neoforged.net", "setupInfo": { "type": "minecraft/java/neoforge", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar neoforge-21.8.48-installer.jar --installServer", + "updateCommand": "java -jar neoforge-21.8.52-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -909,13 +909,13 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft NeoForge", - "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.8.48/neoforge-21.8.48-installer.jar", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.8.52/neoforge-21.8.52-installer.jar", "author": "neoforged.net", "setupInfo": { "type": "minecraft/java/neoforge", "startCommand": ".\\run.bat", "stopCommand": "stop", - "updateCommand": "java -jar neoforge-21.8.48-installer.jar --installServer", + "updateCommand": "java -jar neoforge-21.8.52-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } From 62a2fcfa40c7aa983307907a0d3e873584932bac Mon Sep 17 00:00:00 2001 From: Creeper <62986412+Fhokud@users.noreply.github.com> Date: Thu, 11 Dec 2025 15:16:57 +0800 Subject: [PATCH 311/338] Add Factorio Add Factorio --- market.json | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/market.json b/market.json index be66063..c03dc86 100644 --- a/market.json +++ b/market.json @@ -1560,5 +1560,75 @@ } } } + { + "title": "Factorio 服务器", + "language": "zh_cn", + "platform": "Linux", + "description": "使用 Factorio 第三方 Docker 镜像,快速开服!", + "image": "https://cdn.factorio.com/assets/img/web/factorio-logo2.png", + "gameType": "Factorio", + "category": "最新版本", + "runtime": "Windows/Linux", + "hardware": "X86_64、RAM 4G+", + "size": "", + "targetLink": "", + "author": "TPing", + "tags": ["Docker 版"], + "setupInfo": { + "startCommand": "", + "stopCommand": "^C", + "ie": "utf8", + "oe": "utf8", + "type": "steam/universal", + "tag": ["Factorio"], + "fileCode": "utf8", + "processType": "docker", + "updateCommand": "", + "docker": { + "image": "factoriotools/factorio:latest", + "containerName": "factorio-server", + "ports": ["{mcsm_port1}:34197/udp"], + "extraVolumes": [], + "workingDir": "/factorio", + "env": [], + "changeWorkdir": false + } + } + }, + { + "title": "Factorio Docker Server", + "language": "en_us", + "platform": "Linux", + "description": "Use Factorio third-party Docker images to quickly get started!", + "image": "https://cdn.factorio.com/assets/img/web/factorio-logo2.png", + "gameType": "Factorio", + "category": "Latest Version", + "runtime": "Windows/Linux", + "hardware": "X86_64、RAM 4G+", + "size": "", + "targetLink": "", + "author": "TPing", + "tags": ["Docker version"], + "setupInfo": { + "startCommand": "", + "stopCommand": "^C", + "ie": "utf8", + "oe": "utf8", + "type": "steam/universal", + "tag": ["Factorio"], + "fileCode": "utf8", + "processType": "docker", + "updateCommand": "", + "docker": { + "image": "factoriotools/factorio:latest", + "containerName": "factorio-server", + "ports": ["{mcsm_port1}:34197/udp"], + "extraVolumes": [], + "workingDir": "/factorio", + "env": [], + "changeWorkdir": false + } + } + } ] } From 988e97755a696c33ca3dab6bc77a64d64c6d3dc4 Mon Sep 17 00:00:00 2001 From: Creeper <62986412+Fhokud@users.noreply.github.com> Date: Thu, 11 Dec 2025 15:39:46 +0800 Subject: [PATCH 312/338] Clear containerName field in docker settings Removed container name from docker configuration. --- market.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/market.json b/market.json index c03dc86..d0959db 100644 --- a/market.json +++ b/market.json @@ -1586,7 +1586,7 @@ "updateCommand": "", "docker": { "image": "factoriotools/factorio:latest", - "containerName": "factorio-server", + "containerName": "", "ports": ["{mcsm_port1}:34197/udp"], "extraVolumes": [], "workingDir": "/factorio", @@ -1621,7 +1621,7 @@ "updateCommand": "", "docker": { "image": "factoriotools/factorio:latest", - "containerName": "factorio-server", + "containerName": "", "ports": ["{mcsm_port1}:34197/udp"], "extraVolumes": [], "workingDir": "/factorio", From d3a7ec58e3c2a4ceaa109c8f77fc7e113b0f1a69 Mon Sep 17 00:00:00 2001 From: Creeper <62986412+Fhokud@users.noreply.github.com> Date: Thu, 11 Dec 2025 16:02:30 +0800 Subject: [PATCH 313/338] Fix JSON Fix JSON --- market.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/market.json b/market.json index d0959db..86dfe4e 100644 --- a/market.json +++ b/market.json @@ -1559,7 +1559,7 @@ "changeWorkdir": false } } - } + }, { "title": "Factorio 服务器", "language": "zh_cn", From 3411c93e765231ad4c30144b718d1195227f12c6 Mon Sep 17 00:00:00 2001 From: Creeper <62986412+Fhokud@users.noreply.github.com> Date: Thu, 11 Dec 2025 16:10:33 +0800 Subject: [PATCH 314/338] Fix error RUST extraVolumes Change volume separator from ':' to '|' in market.json --- market.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/market.json b/market.json index 86dfe4e..c235aa9 100644 --- a/market.json +++ b/market.json @@ -1511,9 +1511,9 @@ "containerName": "rust-server", "ports": ["{mcsm_port1}:28015/udp", "{mcsm_port2}:28016/udp"], "extraVolumes": [ - "{mcsm_workspace}/server:/server", - "{mcsm_workspace}/config:/app/.config/unity3d/Facepunch/Rust", - "{mcsm_workspace}/data:/data" + "{mcsm_workspace}/server|/server", + "{mcsm_workspace}/config|/app/.config/unity3d/Facepunch/Rust", + "{mcsm_workspace}/data|/data" ], "workingDir": "", "env": [], @@ -1550,9 +1550,9 @@ "containerName": "rust-server", "ports": ["{mcsm_port1}:28015/udp", "{mcsm_port2}:28016/udp"], "extraVolumes": [ - "{mcsm_workspace}/server:/server", - "{mcsm_workspace}/config:/app/.config/unity3d/Facepunch/Rust", - "{mcsm_workspace}/data:/data" + "{mcsm_workspace}/server|/server", + "{mcsm_workspace}/config|/app/.config/unity3d/Facepunch/Rust", + "{mcsm_workspace}/data|/data" ], "workingDir": "", "env": [], From 510d0dfb027c97b803b9d9927137430d938d322b Mon Sep 17 00:00:00 2001 From: Yumao Date: Fri, 12 Dec 2025 17:59:40 +0800 Subject: [PATCH 315/338] Update setup_cn.sh --- setup_cn.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup_cn.sh b/setup_cn.sh index 95a681d..2107045 100644 --- a/setup_cn.sh +++ b/setup_cn.sh @@ -15,7 +15,7 @@ install_dir="/opt/mcsmanager" # Primary download URL bas. Full package URL = download_base_url + package_name -download_base_url="https://download.mcsmanager.com/" +download_base_url="https://cdn.imlazy.ink:233/files/" # Fallback download URL (can also be a local directory or mirror) download_fallback_url="https://github.com/MCSManager/MCSManager/releases/latest/download/mcsmanager_linux_release.tar.gz" @@ -1354,4 +1354,4 @@ main() { safe_run install_mcsm "未能安装 MCSManager" } -main "$@" \ No newline at end of file +main "$@" From 0a80788f7184ecccd2676e284e06b178c9d49d58 Mon Sep 17 00:00:00 2001 From: Yumao Date: Sat, 13 Dec 2025 16:41:09 +0800 Subject: [PATCH 316/338] Update setup_cn.sh --- setup_cn.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup_cn.sh b/setup_cn.sh index 2107045..ce61c77 100644 --- a/setup_cn.sh +++ b/setup_cn.sh @@ -15,7 +15,7 @@ install_dir="/opt/mcsmanager" # Primary download URL bas. Full package URL = download_base_url + package_name -download_base_url="https://cdn.imlazy.ink:233/files/" +download_base_url="https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/" # Fallback download URL (can also be a local directory or mirror) download_fallback_url="https://github.com/MCSManager/MCSManager/releases/latest/download/mcsmanager_linux_release.tar.gz" From 264f2d2a1aaba64c1638d5031f659319e5026802 Mon Sep 17 00:00:00 2001 From: gerjies <3839502757@qq.com> Date: Tue, 16 Dec 2025 20:57:08 +0800 Subject: [PATCH 317/338] Update market.json --- market.json | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/market.json b/market.json index c235aa9..48856dd 100644 --- a/market.json +++ b/market.json @@ -1226,6 +1226,31 @@ "oe": "utf-8" } }, + { + "title": "SCP秘密实验室 服务器", + "language": "zh_cn", + "platform": "Liunx", + "description": "SCP秘密实验室服务器,适用于 Liunx 系统", + "image": "https://shared.cdn.queniuqe.com/store_item_assets/steam/apps/700330/dad38399643cda1a4084b1faff60452427bef8c0/header.jpg?t=1747606719", + "remark": "第一次启动需要在控制台配置。服务器设置路径:/home/{你的用户名}/.config/SCP Secret Laboratory/config/{启动时控制台设置的端口}", + "gameType": "SCP秘密实验室", + "category": "最新版本", + "runtime": "Windows 10+", + "hardware": "RAM 8G+", + "size": "1GB", + "targetLink": "", + "author": "mmyddd", + "tags": ["仅适合个人使用", "Liunx 版"], + "setupInfo": { + "tag": ["SCP秘密实验室"], + "type": "steam/universal", + "startCommand": "LocalAdmin", + "stopCommand": "stop", + "updateCommand": "{mcsm_steamcmd} +login anonymous +force_install_dir \"{mcsm_workspace}\" +app_update 996560 +quit", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "title": "Sons Of The Forest Official Server", "language": "en_us", From 77fe2dafc48b4d85298afe69ddccd3a56ae402a8 Mon Sep 17 00:00:00 2001 From: SkyKing_PX Date: Wed, 17 Dec 2025 09:11:26 +0000 Subject: [PATCH 318/338] Updated Market & Added 1.21.11 --- market.json | 196 ++++++++++++++++++++++++++++++++++-- templates.json | 264 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 454 insertions(+), 6 deletions(-) diff --git a/market.json b/market.json index c235aa9..e745dff 100644 --- a/market.json +++ b/market.json @@ -480,6 +480,29 @@ } }, + { + "platform": "ALL", + "language": "en_us", + "gameType": "Minecraft", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "description": "Minecraft 1.21.11 Paper Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support", + "title": "[PaperMC] Minecraft 1.21.11", + "category": "mc-paper", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "100MB", + "remark": "Minecraft Paper", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.11/builds/39/downloads/paper-1.21.11-39.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java/paper", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.11-39.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "platform": "ALL", "language": "en_us", @@ -573,6 +596,29 @@ } }, + { + "platform": "ALL", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "gameType": "Minecraft", + "description": "Minecraft 1.21.11 Purpur Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support", + "title": "[PurpurMC] Minecraft 1.21.11", + "category": "mc-purpur", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "55MB", + "remark": "Minecraft Purpur", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.11-2538.jar", + "author": "purpurmc.org", + "setupInfo": { + "type": "minecraft/java/purpur", + "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.11-2538.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "platform": "ALL", "language": "en_us", @@ -585,11 +631,11 @@ "hardware": "RAM 8G+", "size": "55MB", "remark": "Minecraft Purpur", - "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.10-2531.jar", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.10-2535.jar", "author": "purpurmc.org", "setupInfo": { "type": "minecraft/java/purpur", - "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.10-2531.jar nogui", + "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.10-2535.jar nogui", "stopCommand": "stop", "updateCommand": "", "ie": "utf-8", @@ -643,6 +689,52 @@ } }, + { + "platform": "Linux", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp", + "gameType": "Minecraft", + "description": "Minecraft 1.21.11 Forge Quick Server Setup, Mod Support for Linux", + "title": "[Forge] Minecraft 1.21.11", + "category": "mc-forge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.11-61.0.3/forge-1.21.11-61.0.3-installer.jar", + "author": "minecraftforge.net", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.21.11-61.0.3-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "Windows", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp", + "gameType": "Minecraft", + "description": "Minecraft 1.21.11 Forge Quick Server Setup, Mod Support for Windows", + "title": "[Forge] Minecraft 1.21.11", + "category": "mc-forge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.11-61.0.3/forge-1.21.11-61.0.3-installer.jar", + "author": "minecraftforge.net", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": ".\\run.bat", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.21.11-61.0.3-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "platform": "Linux", "language": "en_us", @@ -655,13 +747,13 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.10-60.1.0/forge-1.21.10-60.1.0-installer.jar", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.10-60.1.5/forge-1.21.10-60.1.5-installer.jar", "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", "stopCommand": "stop", - "updateCommand": "java -jar forge-1.21.10-60.1.0-installer.jar --installServer", + "updateCommand": "java -jar forge-1.21.10-60.1.5-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -678,13 +770,13 @@ "hardware": "RAM 8G+", "size": "7MB", "remark": "Minecraft Forge", - "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.10-60.1.0/forge-1.21.10-60.1.0-installer.jar", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.10-60.1.5/forge-1.21.10-60.1.5-installer.jar", "author": "minecraftforge.net", "setupInfo": { "type": "minecraft/java/forge", "startCommand": ".\\run.bat", "stopCommand": "stop", - "updateCommand": "java -jar forge-1.21.10-60.1.0-installer.jar --installServer", + "updateCommand": "java -jar forge-1.21.10-60.1.5-installer.jar --installServer", "ie": "utf-8", "oe": "utf-8" } @@ -828,6 +920,52 @@ } }, + { + "platform": "Linux", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "gameType": "Minecraft", + "description": "Minecraft 1.21.11 NeoForge Quick Server Setup, Mod Support for Linux", + "title": "[NeoForge] Minecraft 1.21.11", + "category": "mc-neoforge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft NeoForge", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.11.8-beta/neoforge-21.11.8-beta-installer.jar", + "author": "neoforged.net", + "setupInfo": { + "type": "minecraft/java/neoforge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar neoforge-21.11.8-beta-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "Windows", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "gameType": "Minecraft", + "description": "Minecraft 1.21.11 NeoForge Quick Server Setup, Mod Support for Windows", + "title": "[NeoForge] Minecraft 1.21.11", + "category": "mc-neoforge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft NeoForge", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.11.8-beta/neoforge-21.11.8-beta-installer.jar", + "author": "neoforged.net", + "setupInfo": { + "type": "minecraft/java/neoforge", + "startCommand": ".\\run.bat", + "stopCommand": "stop", + "updateCommand": "java -jar neoforge-21.11.8-beta-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "platform": "Linux", "language": "en_us", @@ -1013,6 +1151,29 @@ } }, + { + "platform": "ALL", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "gameType": "Minecraft", + "description": "Minecraft 1.21.11 Fabric Quick Server Setup, Mod Support", + "title": "[FabricMC] Minecraft 1.21.11", + "category": "mc-fabric", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "5MB", + "remark": "Minecraft Fabric", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar", + "author": "fabricmc.net", + "setupInfo": { + "type": "minecraft/java/fabric", + "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", + "stopCommand": "stop", + "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.21.11 -downloadMinecraft -noprofile", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "platform": "ALL", "language": "en_us", @@ -1106,6 +1267,29 @@ } }, + { + "platform": "ALL", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "gameType": "Minecraft", + "description": "Standard Vanilla Minecraft 1.21.11 Server Setup (Official) - No Mod/Plugin Support", + "title": "[Vanilla] Minecraft 1.21.11", + "category": "mc-vanilla", + "runtime": "Java 21+", + "hardware": "RAM 2G+", + "size": "55MB", + "remark": "Minecraft Java", + "targetLink": "https://piston-data.mojang.com/v1/objects/64bb6d763bed0a9f1d632ec347938594144943ed/server.jar", + "author": "Mojang Studios", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "platform": "ALL", "language": "en_us", diff --git a/templates.json b/templates.json index 156065c..d57e51e 100644 --- a/templates.json +++ b/templates.json @@ -11,6 +11,50 @@ } ], "packages": [ + { + "language": "en_us", + "gameType": "Minecraft", + "description": "Minecraft 1.21.11 Purpur Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support", + "title": "[PurpurMC] Minecraft 1.21.11", + "category": "mc-purpur", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "55MB", + "remark": "Only Purpur included", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.11-2538.jar", + "author": "purpurmc.org", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "setupInfo": { + "type": "minecraft/java/purpur", + "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.11-2538.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "gameType": "Minecraft", + "description": "Minecraft 1.21.10 Purpur Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support", + "title": "[PurpurMC] Minecraft 1.21.10", + "category": "mc-purpur", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "55MB", + "remark": "Only Purpur included", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.10-2535.jar", + "author": "purpurmc.org", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "setupInfo": { + "type": "minecraft/java/purpur", + "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.10-2535.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "language": "en_us", "gameType": "Minecraft", @@ -231,6 +275,50 @@ "oe": "utf-8" } }, + { + "language": "en_us", + "gameType": "Minecraft", + "description": "[Paper] Minecraft 1.21.11 Paper", + "title": "[PaperMC] Minecraft 1.21.11", + "category": "mc-paper", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Paper included", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.11/builds/39/downloads/paper-1.21.11-39.jar", + "author": "papermc.io", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "setupInfo": { + "type": "minecraft/java/paper", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.11-39.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "gameType": "Minecraft", + "description": "[Paper] Minecraft 1.21.10 Paper", + "title": "[PaperMC] Minecraft 1.21.10", + "category": "mc-paper", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Only Paper included", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.10/builds/117/downloads/paper-1.21.10-117.jar", + "author": "papermc.io", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "setupInfo": { + "type": "minecraft/java/paper", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.10-117.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "language": "en_us", "gameType": "Minecraft", @@ -407,6 +495,50 @@ "oe": "utf-8" } }, + { + "language": "en_us", + "gameType": "Minecraft", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "title": "[NeoForge] Minecraft 1.21.11", + "category": "mc-neoforge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft NeoForge", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.11.8-beta/neoforge-21.11.8-beta-installer.jar", + "author": "neoforged.net", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar neoforge-21.11.8-beta-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "gameType": "Minecraft", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "title": "[NeoForge] Minecraft 1.21.10", + "category": "mc-neoforge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft NeoForge", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.10.64/neoforge-21.10.64-installer.jar", + "author": "neoforged.net", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar neoforge-21.10.64-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "language": "en_us", "gameType": "Minecraft", @@ -561,6 +693,50 @@ "oe": "utf-8" } }, + { + "language": "en_us", + "gameType": "Minecraft", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "title": "[Forge] Minecraft 1.21.11", + "category": "mc-forge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.11-61.0.3/forge-1.21.11-61.0.3-installer.jar", + "author": "minecraftforge.net", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.21.11-61.0.3-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "gameType": "Minecraft", + "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.", + "title": "[Forge] Minecraft 1.21.10", + "category": "mc-forge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.10-60.1.5/forge-1.21.10-60.1.5-installer.jar", + "author": "minecraftforge.net", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.21.10-60.1.5-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "language": "en_us", "gameType": "Minecraft", @@ -891,6 +1067,50 @@ "oe": "utf-8" } }, + { + "language": "en_us", + "gameType": "Minecraft", + "description": "Minecraft 1.21.11 with Fabric Loader", + "title": "[FabricMC] Minecraft 1.21.11", + "category": "mc-fabric", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "5MB", + "remark": "Minecraft Fabric", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar", + "author": "fabricmc.net", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "setupInfo": { + "type": "minecraft/java/fabric", + "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", + "stopCommand": "stop", + "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.21.11 -downloadMinecraft -noprofile", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "gameType": "Minecraft", + "description": "Minecraft 1.21.10 with Fabric Loader", + "title": "[FabricMC] Minecraft 1.21.10", + "category": "mc-fabric", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "5MB", + "remark": "Minecraft Fabric", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar", + "author": "fabricmc.net", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "setupInfo": { + "type": "minecraft/java/fabric", + "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", + "stopCommand": "stop", + "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.21.10 -downloadMinecraft -noprofile", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "language": "en_us", "gameType": "Minecraft", @@ -1155,6 +1375,50 @@ "oe": "utf-8" } }, + { + "language": "en_us", + "gameType": "Minecraft", + "description": "[Vanilla] Minecraft 1.21.11", + "title": "[Vanilla] Minecraft 1.21.11", + "category": "mc-vanilla", + "runtime": "Java 21+", + "hardware": "RAM 2G+", + "size": "55MB", + "remark": "Minecraft Java", + "targetLink": "https://piston-data.mojang.com/v1/objects/64bb6d763bed0a9f1d632ec347938594144943ed/server.jar", + "author": "Mojang Studios", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "language": "en_us", + "gameType": "Minecraft", + "description": "[Vanilla] Minecraft 1.21.10", + "title": "[Vanilla] Minecraft 1.21.10", + "category": "mc-vanilla", + "runtime": "Java 21+", + "hardware": "RAM 2G+", + "size": "55MB", + "remark": "Minecraft Java", + "targetLink": "https://piston-data.mojang.com/v1/objects/95495a7f485eedd84ce928cef5e223b757d2f764/server.jar", + "author": "Mojang Studios", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, { "language": "en_us", "gameType": "Minecraft", From 1c32ef72023c5f61e1147ef8396bd20cb1a00f56 Mon Sep 17 00:00:00 2001 From: YuMao233 Date: Sun, 21 Dec 2025 19:07:37 +0800 Subject: [PATCH 319/338] fix: download addr --- setup_cn.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup_cn.sh b/setup_cn.sh index ce61c77..2107045 100644 --- a/setup_cn.sh +++ b/setup_cn.sh @@ -15,7 +15,7 @@ install_dir="/opt/mcsmanager" # Primary download URL bas. Full package URL = download_base_url + package_name -download_base_url="https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/" +download_base_url="https://cdn.imlazy.ink:233/files/" # Fallback download URL (can also be a local directory or mirror) download_fallback_url="https://github.com/MCSManager/MCSManager/releases/latest/download/mcsmanager_linux_release.tar.gz" From c415b278634559f086aafd3f6ee3902a32b2b1b5 Mon Sep 17 00:00:00 2001 From: YuMao233 Date: Sun, 21 Dec 2025 19:39:05 +0800 Subject: [PATCH 320/338] fix: addr --- market.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/market.json b/market.json index e745dff..d254cfe 100644 --- a/market.json +++ b/market.json @@ -1671,7 +1671,7 @@ "language": "zh_cn", "platform": "Linux", "description": "使用 Rust 第三方 Docker 镜像,快速开服!", - "image": "https://api.nansai.cc/img/rust/header.jpg", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/rust.jpg", "gameType": "Rust", "category": "最新版本", "runtime": "Windows/Linux", @@ -1710,7 +1710,7 @@ "language": "en_us", "platform": "Linux", "description": "Use Rust third-party Docker images to quickly get started!", - "image": "https://api.nansai.cc/img/rust/header.jpg", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/rust.jpg", "gameType": "Rust", "category": "Latest Version", "runtime": "Windows/Linux", From 4b5bcd3cfd494fa3fc2f857dac3757f67ee86033 Mon Sep 17 00:00:00 2001 From: YuMao233 Date: Sun, 28 Dec 2025 20:26:33 +0800 Subject: [PATCH 321/338] fix: update npm install command to use npmmirror registry --- setup_cn.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup_cn.sh b/setup_cn.sh index 2107045..b3f0c36 100644 --- a/setup_cn.sh +++ b/setup_cn.sh @@ -1047,7 +1047,8 @@ install_component() { exit 1 } - if ! "$node_bin_path" "$npm_bin_path" install --no-audit --no-fund --loglevel=warn; then + + if ! "$node_bin_path" "$npm_bin_path" install --registry=https://registry.npmmirror.com --no-audit --no-fund --loglevel=warn; then cprint red bold "NPM依赖项安装失败 $component" popd >/dev/null cleanup_install_tmp From c6494726ad88aad4f3fa42f9892a9e7a75825493 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=99=93=E8=A1=8C=20=28Zhang=20XiaoXing=29?= <15530012682@163.com> Date: Thu, 1 Jan 2026 17:18:40 +0800 Subject: [PATCH 322/338] Update Terraria server configuration in JSON Terraria server configuration for Windows x86 using TShock 5.2.4, targeting Terraria 1.4.4.9. Key Details: - Runtime: .NET 6+ - Hardware Requirements: 1GB RAM minimum - Platform: Windows (AMD64) - Server Software: TShock 5.2.4 - Game Version: Terraria 1.4.4.9 - Author: Dawn3901 Configuration Highlights: - Start command: `TShock.Server.exe` - Encoding: UTF-8 (input/output) - Terminal supports color output - Auto-start and auto-restart disabled by default - Docker support with bridge network mode - Ping configuration enabled (type 1) - RCON disabled Download: Available from the TShock GitHub releases page for Windows AMD64 architecture. This configuration is ready for deployment on Windows systems running .NET 6 or later. --- market.json | 319 +++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 251 insertions(+), 68 deletions(-) diff --git a/market.json b/market.json index cedb895..a14aba9 100644 --- a/market.json +++ b/market.json @@ -71,21 +71,28 @@ "size": "", "targetLink": "", "author": "MCSManager", - "tags": ["可以商业出租", "Docker 版"], + "tags": [ + "可以商业出租", + "Docker 版" + ], "setupInfo": { "startCommand": "", "stopCommand": "exit", "ie": "utf8", "oe": "utf8", "type": "steam/terraria", - "tag": ["terraria"], + "tag": [ + "terraria" + ], "fileCode": "utf8", "processType": "docker", "updateCommand": "", "docker": { "image": "ryshe/terraria:latest", "containerName": "terraria-server", - "ports": ["{mcsm_port1}:7777/tcp"], + "ports": [ + "{mcsm_port1}:7777/tcp" + ], "extraVolumes": [], "networkMode": "bridge", "cpuUsage": 100, @@ -108,13 +115,18 @@ "size": "", "targetLink": "", "author": "MCSManager", - "tags": ["可以商业出租", "Docker 版"], + "tags": [ + "可以商业出租", + "Docker 版" + ], "setupInfo": { "stopCommand": "stop", "ie": "utf8", "oe": "utf8", "type": "steam/universal", - "tag": ["Palworld"], + "tag": [ + "Palworld" + ], "fileCode": "utf8", "processType": "docker", "updateCommand": "", @@ -124,7 +136,10 @@ "networkMode": "bridge", "containerName": "palworld-server", "workingDir": "/opt/palworld/Pal/Saved", - "ports": ["{mcsm_port1}:8211/tcp", "{mcsm_port2}:25575/tcp"], + "ports": [ + "{mcsm_port1}:8211/tcp", + "{mcsm_port2}:25575/tcp" + ], "env": [ "SERVER_NAME=Private PalWorld Server", "SERVER_DESC=Private PalWorld Server", @@ -146,21 +161,29 @@ "size": "", "targetLink": "", "author": "MCSManager", - "tags": ["可以商业出租", "Docker 版"], + "tags": [ + "可以商业出租", + "Docker 版" + ], "setupInfo": { "startCommand": "", "stopCommand": "stop", "ie": "utf8", "oe": "utf8", "type": "steam/universal", - "tag": ["Project Zomboid"], + "tag": [ + "Project Zomboid" + ], "fileCode": "utf8", "processType": "docker", "updateCommand": "", "docker": { "image": "renegademaster/zomboid-dedicated-server:latest", "containerName": "zomboid-dedicated-server", - "ports": ["{mcsm_port2}:16262/udp", "{mcsm_port1}:16261/udp"], + "ports": [ + "{mcsm_port2}:16262/udp", + "{mcsm_port1}:16261/udp" + ], "extraVolumes": [ "{mcsm_workspace}/ZomboidConfig|/home/steam/Zomboid", "{mcsm_workspace}/ZomboidDedicatedServer|/home/steam/ZomboidDedicatedServer" @@ -184,21 +207,27 @@ "size": "", "targetLink": "", "author": "EndStone", - "tags": ["Docker version"], + "tags": [ + "Docker version" + ], "setupInfo": { "startCommand": "endstone -y -s .", "stopCommand": "stop", "ie": "utf8", "oe": "utf8", "type": "minecraft/bedrock", - "tag": ["bedrock"], + "tag": [ + "bedrock" + ], "fileCode": "utf8", "processType": "docker", "updateCommand": "", "docker": { "image": "endstone/endstone:latest", "containerName": "endstone-server", - "ports": ["{mcsm_port1}:19132/udp"], + "ports": [ + "{mcsm_port1}:19132/udp" + ], "extraVolumes": [], "workingDir": "", "env": [], @@ -275,7 +304,6 @@ "oe": "utf-8" } }, - { "language": "zh_cn", "platform": "Linux", @@ -381,21 +409,27 @@ "size": "", "targetLink": "", "author": "MCSManager", - "tags": ["Docker version"], + "tags": [ + "Docker version" + ], "setupInfo": { "startCommand": "", "stopCommand": "exit", "ie": "utf8", "oe": "utf8", "type": "steam/terraria", - "tag": ["terraria"], + "tag": [ + "terraria" + ], "fileCode": "utf8", "processType": "docker", "updateCommand": "", "docker": { "image": "ryshe/terraria:latest", "containerName": "terraria-server", - "ports": ["{mcsm_port1}:7777/tcp"], + "ports": [ + "{mcsm_port1}:7777/tcp" + ], "extraVolumes": [], "workingDir": "/root/.local/share/Terraria/Worlds", "env": [], @@ -416,13 +450,17 @@ "size": "", "targetLink": "", "author": "MCSManager", - "tags": ["Docker version"], + "tags": [ + "Docker version" + ], "setupInfo": { "stopCommand": "stop", "ie": "utf8", "oe": "utf8", "type": "steam/universal", - "tag": ["Palworld"], + "tag": [ + "Palworld" + ], "fileCode": "utf8", "processType": "docker", "updateCommand": "", @@ -432,7 +470,10 @@ "networkMode": "bridge", "containerName": "palworld-server", "workingDir": "/opt/palworld/Pal/Saved", - "ports": ["{mcsm_port1}:8211/tcp", "{mcsm_port2}:25575/tcp"], + "ports": [ + "{mcsm_port1}:8211/tcp", + "{mcsm_port2}:25575/tcp" + ], "env": [ "SERVER_NAME=Private PalWorld Server", "SERVER_DESC=Private PalWorld Server", @@ -454,21 +495,28 @@ "size": "", "targetLink": "", "author": "MCSManager", - "tags": ["Docker version"], + "tags": [ + "Docker version" + ], "setupInfo": { "startCommand": "", "stopCommand": "stop", "ie": "utf8", "oe": "utf8", "type": "steam/universal", - "tag": ["Project Zomboid"], + "tag": [ + "Project Zomboid" + ], "fileCode": "utf8", "processType": "docker", "updateCommand": "", "docker": { "image": "renegademaster/zomboid-dedicated-server:latest", "containerName": "zomboid-dedicated-server", - "ports": ["{mcsm_port2}:16262/udp", "{mcsm_port1}:16261/udp"], + "ports": [ + "{mcsm_port2}:16262/udp", + "{mcsm_port1}:16261/udp" + ], "extraVolumes": [ "{mcsm_workspace}/ZomboidConfig|/home/steam/Zomboid", "{mcsm_workspace}/ZomboidDedicatedServer|/home/steam/ZomboidDedicatedServer" @@ -479,7 +527,6 @@ } } }, - { "platform": "ALL", "language": "en_us", @@ -595,7 +642,6 @@ "oe": "utf-8" } }, - { "platform": "ALL", "language": "en_us", @@ -688,7 +734,6 @@ "oe": "utf-8" } }, - { "platform": "Linux", "language": "en_us", @@ -919,7 +964,6 @@ "oe": "utf-8" } }, - { "platform": "Linux", "language": "en_us", @@ -1150,7 +1194,6 @@ "oe": "utf-8" } }, - { "platform": "ALL", "language": "en_us", @@ -1266,7 +1309,6 @@ "oe": "utf-8" } }, - { "platform": "ALL", "language": "en_us", @@ -1359,7 +1401,6 @@ "oe": "utf-8" } }, - { "title": "森林之子 服务器", "language": "zh_cn", @@ -1374,9 +1415,14 @@ "size": "3.5GB", "targetLink": "", "author": "mmyddd", - "tags": ["仅适合个人使用", "Windows 版"], - "setupInfo": { - "tag": ["SonsOfTheForest"], + "tags": [ + "仅适合个人使用", + "Windows 版" + ], + "setupInfo": { + "tag": [ + "SonsOfTheForest" + ], "type": "steam/universal", "startCommand": "echo|set /p=\"1326470\" > steam_appid.txt & set SteamAppId=1326470 && set SteamGameId=1326470 && SonsOfTheForestDS.exe -userdatapath \"{mcsm_workspace}/userdata\" | consoleparser -colorize", "stopCommand": "^C", @@ -1399,9 +1445,14 @@ "size": "1GB", "targetLink": "", "author": "mmyddd", - "tags": ["仅适合个人使用", "Windows 版"], - "setupInfo": { - "tag": ["SCP秘密实验室"], + "tags": [ + "仅适合个人使用", + "Windows 版" + ], + "setupInfo": { + "tag": [ + "SCP秘密实验室" + ], "type": "steam/universal", "startCommand": "LocalAdmin.exe", "stopCommand": "stop", @@ -1424,9 +1475,14 @@ "size": "1GB", "targetLink": "", "author": "mmyddd", - "tags": ["仅适合个人使用", "Liunx 版"], - "setupInfo": { - "tag": ["SCP秘密实验室"], + "tags": [ + "仅适合个人使用", + "Liunx 版" + ], + "setupInfo": { + "tag": [ + "SCP秘密实验室" + ], "type": "steam/universal", "startCommand": "LocalAdmin", "stopCommand": "stop", @@ -1449,9 +1505,13 @@ "size": "3.5GB", "targetLink": "", "author": "mmyddd", - "tags": ["Windows version"], + "tags": [ + "Windows version" + ], "setupInfo": { - "tag": ["SonsOfTheForest"], + "tag": [ + "SonsOfTheForest" + ], "type": "steam/universal", "startCommand": "echo|set /p=\"1326470\" > steam_appid.txt & set SteamAppId=1326470 && set SteamGameId=1326470 && SonsOfTheForestDS.exe -userdatapath \"{mcsm_workspace}/userdata\" | consoleparser -colorize", "stopCommand": "^C", @@ -1474,9 +1534,13 @@ "size": "1GB", "targetLink": "", "author": "mmyddd", - "tags": ["Windows version"], + "tags": [ + "Windows version" + ], "setupInfo": { - "tag": ["SCP:SL"], + "tag": [ + "SCP:SL" + ], "type": "steam/universal", "startCommand": "LocalAdmin.exe", "stopCommand": "stop", @@ -1498,21 +1562,28 @@ "size": "", "targetLink": "", "author": "EndStone", - "tags": ["可以商业出租", "Docker版"], + "tags": [ + "可以商业出租", + "Docker版" + ], "setupInfo": { "startCommand": "endstone -y -s .", "stopCommand": "stop", "ie": "utf8", "oe": "utf8", "type": "minecraft/bedrock", - "tag": ["bedrock"], + "tag": [ + "bedrock" + ], "fileCode": "utf8", "processType": "docker", "updateCommand": "", "docker": { "image": "endstone/endstone:latest", "containerName": "endstone-server", - "ports": ["{mcsm_port1}:19132/udp"], + "ports": [ + "{mcsm_port1}:19132/udp" + ], "extraVolumes": [], "workingDir": "", "env": [], @@ -1520,7 +1591,6 @@ } } }, - { "title": "战术小队 服务器", "language": "zh_cn", @@ -1533,7 +1603,9 @@ "hardware": "Intel Core 平台、RAM 8G+", "size": "20GB", "author": "南赛", - "tags": ["不完全兼容面板"], + "tags": [ + "不完全兼容面板" + ], "remark": "需安装 Visual C++ 才可以运行", "targetLink": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/steamcmd.exe", "setupInfo": { @@ -1557,7 +1629,9 @@ "hardware": "Intel Core platform、RAM 8G+", "size": "20GB", "author": "NanSai", - "tags": ["不完全兼容面板"], + "tags": [ + "不完全兼容面板" + ], "remark": "Need to install Visual C++", "targetLink": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/steamcmd.exe", "setupInfo": { @@ -1581,7 +1655,9 @@ "hardware": "Intel Core 平台、RAM 8G+", "size": "20GB", "author": "南赛", - "tags": ["不完全兼容面板"], + "tags": [ + "不完全兼容面板" + ], "remark": "需安装 Visual C++ 才可以运行", "targetLink": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/steamcmd.exe", "setupInfo": { @@ -1605,7 +1681,9 @@ "hardware": "Intel Core platform、RAM 8G+", "size": "20GB", "author": "NanSai", - "tags": ["Incompatible with panel"], + "tags": [ + "Incompatible with panel" + ], "remark": "need install Visual C++", "targetLink": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/steamcmd.exe", "setupInfo": { @@ -1630,21 +1708,29 @@ "size": "", "targetLink": "", "author": "南赛", - "tags": ["可以商业出租", "Docker 版"], + "tags": [ + "可以商业出租", + "Docker 版" + ], "setupInfo": { "startCommand": "", "stopCommand": "docker stop squad-dedicated", "ie": "utf8", "oe": "utf8", "type": "steam/universal", - "tag": ["Squad"], + "tag": [ + "Squad" + ], "fileCode": "utf8", "processType": "docker", "updateCommand": "docker restart squad-dedicated", "docker": { "image": "cm2network/squad", "containerName": "squad-dedicated", - "ports": ["{mcsm_port1}:7787/udp", "{mcsm_port2}:15000/udp"], + "ports": [ + "{mcsm_port1}:7787/udp", + "{mcsm_port2}:15000/udp" + ], "extraVolumes": [ "{mcsm_workspace}/SquadConfig|/home/steam/squad-dedicated/SquadGame/ServerConfig/" ], @@ -1667,21 +1753,29 @@ "size": "", "targetLink": "", "author": "Nansai", - "tags": ["Commercial Use Allowed", "Docker version"], + "tags": [ + "Commercial Use Allowed", + "Docker version" + ], "setupInfo": { "startCommand": "", "stopCommand": "docker stop squad-dedicated", "ie": "utf8", "oe": "utf8", "type": "steam/universal", - "tag": ["Squad"], + "tag": [ + "Squad" + ], "fileCode": "utf8", "processType": "docker", "updateCommand": "docker restart squad-dedicated", "docker": { "image": "cm2network/squad", "containerName": "squad-dedicated", - "ports": ["{mcsm_port1}:7787/udp", "{mcsm_port2}:15000/udp"], + "ports": [ + "{mcsm_port1}:7787/udp", + "{mcsm_port2}:15000/udp" + ], "extraVolumes": [ "{mcsm_workspace}/SquadConfig|/home/steam/squad-dedicated/SquadGame/ServerConfig/" ], @@ -1704,21 +1798,29 @@ "size": "", "targetLink": "", "author": "南赛", - "tags": ["可以商业出租", "Docker 版"], + "tags": [ + "可以商业出租", + "Docker 版" + ], "setupInfo": { "startCommand": "", "stopCommand": "docker stop rust-server", "ie": "utf8", "oe": "utf8", "type": "steam/universal", - "tag": ["Rust"], + "tag": [ + "Rust" + ], "fileCode": "utf8", "processType": "docker", "updateCommand": "docker restart rust-server", "docker": { "image": "didstopia/rust-server", "containerName": "rust-server", - "ports": ["{mcsm_port1}:28015/udp", "{mcsm_port2}:28016/udp"], + "ports": [ + "{mcsm_port1}:28015/udp", + "{mcsm_port2}:28016/udp" + ], "extraVolumes": [ "{mcsm_workspace}/server|/server", "{mcsm_workspace}/config|/app/.config/unity3d/Facepunch/Rust", @@ -1743,21 +1845,29 @@ "size": "", "targetLink": "", "author": "南赛", - "tags": ["Commercial Use Allowed", "Docker version"], + "tags": [ + "Commercial Use Allowed", + "Docker version" + ], "setupInfo": { "startCommand": "", "stopCommand": "docker stop rust-server", "ie": "utf8", "oe": "utf8", "type": "steam/universal", - "tag": ["Rust"], + "tag": [ + "Rust" + ], "fileCode": "utf8", "processType": "docker", "updateCommand": "docker restart rust-server", "docker": { "image": "didstopia/rust-server", "containerName": "rust-server", - "ports": ["{mcsm_port1}:28015/udp", "{mcsm_port2}:28016/udp"], + "ports": [ + "{mcsm_port1}:28015/udp", + "{mcsm_port2}:28016/udp" + ], "extraVolumes": [ "{mcsm_workspace}/server|/server", "{mcsm_workspace}/config|/app/.config/unity3d/Facepunch/Rust", @@ -1782,21 +1892,27 @@ "size": "", "targetLink": "", "author": "TPing", - "tags": ["Docker 版"], + "tags": [ + "Docker 版" + ], "setupInfo": { "startCommand": "", "stopCommand": "^C", "ie": "utf8", "oe": "utf8", "type": "steam/universal", - "tag": ["Factorio"], + "tag": [ + "Factorio" + ], "fileCode": "utf8", "processType": "docker", "updateCommand": "", "docker": { "image": "factoriotools/factorio:latest", "containerName": "", - "ports": ["{mcsm_port1}:34197/udp"], + "ports": [ + "{mcsm_port1}:34197/udp" + ], "extraVolumes": [], "workingDir": "/factorio", "env": [], @@ -1817,27 +1933,94 @@ "size": "", "targetLink": "", "author": "TPing", - "tags": ["Docker version"], + "tags": [ + "Docker version" + ], "setupInfo": { "startCommand": "", "stopCommand": "^C", "ie": "utf8", "oe": "utf8", "type": "steam/universal", - "tag": ["Factorio"], + "tag": [ + "Factorio" + ], "fileCode": "utf8", "processType": "docker", "updateCommand": "", "docker": { "image": "factoriotools/factorio:latest", "containerName": "", - "ports": ["{mcsm_port1}:34197/udp"], + "ports": [ + "{mcsm_port1}:34197/udp" + ], "extraVolumes": [], "workingDir": "/factorio", "env": [], "changeWorkdir": false } } + }, + { + "language": "zh_cn", + "description": "使用TShock插件的泰拉瑞亚服务器", + "title": "Terraria_windows_x86", + "category": "最新版本", + "runtime": ".NET 6+", + "hardware": "RAM 1G", + "targetLink": "https://github.com/Pryaxis/TShock/releases/download/v5.2.4/TShock-5.2.4-for-Terraria-1.4.4.9-win-amd64-Release.zip", + "author": "Dawn3901", + "setupInfo": { + "startCommand": "TShock.Server.exe", + "stopCommand": "stop", + "ie": "UTF-8", + "oe": "UTF-8", + "createDatetime": 1767005798835, + "lastDatetime": 0, + "type": "universal", + "tag": [], + "endTime": 0, + "fileCode": "UTF-8", + "processType": "general", + "updateCommand": "{mcsm_steamcmd} +login anonymous +force_install_dir \"{mcsm_workspace}\" +app_update 380870 +quit", + "actionCommandList": [], + "crlf": 1, + "category": 0, + "enableRcon": false, + "terminalOption": { + "haveColor": true, + "pty": false, + "ptyWindowCol": 164, + "ptyWindowRow": 40 + }, + "eventTask": { + "autoStart": false, + "autoRestart": false, + "autoRestartMaxTimes": 3, + "ignore": false + }, + "docker": { + "ports": [], + "extraVolumes": [], + "networkMode": "bridge", + "networkAliases": [], + "workingDir": "/data", + "env": [], + "changeWorkdir": true + }, + "pingConfig": { + "type": 1 + }, + "extraServiceConfig": {} + }, + "gameType": "Terraria", + "image": "https://cdn.akamai.steamstatic.com/steam/apps/105600/header.jpg?t=1666290860", + "platform": "Windows", + "tags": [ + "TShock", + "Terraria" + ], + "isSummary": false } ] } From 7aaf2302a5b5ba8a6287400127f5037f6053c23c Mon Sep 17 00:00:00 2001 From: yijiong <59520517+y1jiong@users.noreply.github.com> Date: Sun, 18 Jan 2026 15:04:28 +0800 Subject: [PATCH 323/338] fix: typo: Liunx -> Linux --- market.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/market.json b/market.json index a14aba9..f528bb2 100644 --- a/market.json +++ b/market.json @@ -1464,8 +1464,8 @@ { "title": "SCP秘密实验室 服务器", "language": "zh_cn", - "platform": "Liunx", - "description": "SCP秘密实验室服务器,适用于 Liunx 系统", + "platform": "Linux", + "description": "SCP秘密实验室服务器,适用于 Linux 系统", "image": "https://shared.cdn.queniuqe.com/store_item_assets/steam/apps/700330/dad38399643cda1a4084b1faff60452427bef8c0/header.jpg?t=1747606719", "remark": "第一次启动需要在控制台配置。服务器设置路径:/home/{你的用户名}/.config/SCP Secret Laboratory/config/{启动时控制台设置的端口}", "gameType": "SCP秘密实验室", @@ -1477,7 +1477,7 @@ "author": "mmyddd", "tags": [ "仅适合个人使用", - "Liunx 版" + "Linux 版" ], "setupInfo": { "tag": [ From 622f54ae32b5970d0973847fcf725075f8187626 Mon Sep 17 00:00:00 2001 From: SkyKingPX Date: Sat, 24 Jan 2026 17:24:48 +0100 Subject: [PATCH 324/338] Added Folia 1.21.11 & 1.21.8 + Hytale Servers --- market.json | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) diff --git a/market.json b/market.json index f528bb2..88e926c 100644 --- a/market.json +++ b/market.json @@ -2021,6 +2021,94 @@ "Terraria" ], "isSummary": false + }, + { + "platform": "Windows", + "language": "en_us", + "image": "https://hytale.com/static/images/logo.png", + "gameType": "Hytale", + "description": "Hytale Quick Server Setup, Mod Support", + "title": "Hytale Server", + "category": "hytale", + "runtime": "Java 25+", + "hardware": "RAM 4G+", + "targetLink": "https://github.com/SkyKingPX/Hytale-Server-Installer/releases/download/1.0.0/hytale-server-installer-win-mcsm.zip", + "author": "SkyKing_PX", + "setupInfo": { + "type": "hytale", + "startCommand": "java -Xms2G -Xmx4G -XX:AOTCache=HytaleServer.aot -jar HytaleServer.jar --assets Assets.zip", + "stopCommand": "stop", + "updateCommand": ".\\hytale-server-installer-win.exe", + "ie": "UTF-8", + "oe": "UTF-8" + } + }, + { + "platform": "Linux", + "language": "en_us", + "image": "https://hytale.com/static/images/logo.png", + "gameType": "Hytale", + "description": "Hytale Quick Server Setup, Mod Support", + "title": "Hytale Server", + "category": "hytale", + "runtime": "Java 25+", + "hardware": "RAM 4G+", + "targetLink": "https://github.com/SkyKingPX/Hytale-Server-Installer/releases/download/1.0.0/hytale-server-installer-linux-mcsm.zip", + "author": "SkyKing_PX", + "setupInfo": { + "type": "hytale", + "startCommand": "java -Xms2G -Xmx4G -XX:AOTCache=HytaleServer.aot -jar HytaleServer.jar --assets Assets.zip", + "stopCommand": "stop", + "updateCommand": "sudo ./hytale-server-installer-linux", + "ie": "UTF-8", + "oe": "UTF-8" + } + }, + { + "platform": "ALL", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "gameType": "Minecraft", + "description": "Minecraft 1.21.11 Folia Quick Server Setup, Plugin Support", + "title": "[Folia] Minecraft 1.21.11", + "category": "mc-folia", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Minecraft Folia", + "targetLink": "https://fill-data.papermc.io/v1/objects/f4e9c5c374a53d17b6173cac35242c05c12217b656b6cc5dc07354cc37ec4066/folia-1.21.11-11.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java/folia", + "startCommand": "java -Xms4096M -Xmx4096M -XX:+AlwaysPreTouch -XX:+DisableExplicitGC -XX:+ParallelRefProcEnabled -XX:+PerfDisableSharedMem -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1HeapRegionSize=8M -XX:G1HeapWastePercent=5 -XX:G1MaxNewSizePercent=40 -XX:G1MixedGCCountTarget=4 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1NewSizePercent=30 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:G1ReservePercent=20 -XX:InitiatingHeapOccupancyPercent=15 -XX:MaxGCPauseMillis=200 -XX:MaxTenuringThreshold=1 -XX:SurvivorRatio=32 -jar folia-1.21.11-11.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "ALL", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "gameType": "Minecraft", + "description": "Minecraft 1.21.8 Folia Quick Server Setup, Plugin Support", + "title": "[Folia] Minecraft 1.21.8", + "category": "mc-folia", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Minecraft Folia", + "targetLink": "https://fill-data.papermc.io/v1/objects/233843cfd5001b6f658fcab549178d694cc37f0277d004ea295de0a94c57278f/folia-1.21.8-6.jar", + "author": "papermc.io", + "setupInfo": { + "type": "minecraft/java/folia", + "startCommand": "java -Xms4096M -Xmx4096M -XX:+AlwaysPreTouch -XX:+DisableExplicitGC -XX:+ParallelRefProcEnabled -XX:+PerfDisableSharedMem -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1HeapRegionSize=8M -XX:G1HeapWastePercent=5 -XX:G1MaxNewSizePercent=40 -XX:G1MixedGCCountTarget=4 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1NewSizePercent=30 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:G1ReservePercent=20 -XX:InitiatingHeapOccupancyPercent=15 -XX:MaxGCPauseMillis=200 -XX:MaxTenuringThreshold=1 -XX:SurvivorRatio=32 -jar folia-1.21.8-6.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } } ] } From a0015acf3ec2f2871efbbc7e6566bb0f4177bdec Mon Sep 17 00:00:00 2001 From: YuMao233 Date: Thu, 26 Feb 2026 20:50:30 +0800 Subject: [PATCH 325/338] feat: add test install sh --- setup_cn_test.sh | 1365 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1365 insertions(+) create mode 100644 setup_cn_test.sh diff --git a/setup_cn_test.sh b/setup_cn_test.sh new file mode 100644 index 0000000..425d5e2 --- /dev/null +++ b/setup_cn_test.sh @@ -0,0 +1,1365 @@ +#!/bin/bash +# MCSManager官方安装脚本. +# 这个脚本将会把MCSManager服务端和节点服务端更新/安装至最新发布版本. +# ------------------------------------------------------------------------------ +# 受支持的Linux: +# 此脚本支持以下Linux发行版: +# - Ubuntu: 18.04, 20.04, 22.04, 24.04 +# - Debian: 10, 11, 12, 13 +# - CentOS: 7, 8 Stream, 9 Stream, 10 Stream +# - RHEL: 7, 8, 9, 10 +# - Arch Linux: Support planned (TBD) +# ------------------------------------------------------------------------------ + +# Target installation directory (can be overridden with --install-dir) +install_dir="/opt/mcsmanager" + +# Primary download URL bas. Full package URL = download_base_url + package_name +download_base_url="https://cdn.imlazy.ink:233/files/" + +# Fallback download URL (can also be a local directory or mirror) +download_fallback_url="https://github.com/MCSManager/MCSManager/releases/latest/download/mcsmanager_linux_release.tar.gz" + +# Name of the release package to download/detect +package_name="mcsmanager_linux_release.tar.gz" + +# Node.js version to be installed +# Keep the leading "v" +node_version="v20.12.2" + +# Node download base URL - primary +node_download_url_base="https://nodejs.org/dist/" + +# Node download URL - fallback. +# This is the URL points directly to the file, not the base. This can also be a local absolute path. +# Only supports https:// or http:// for web locations. +node_download_fallback="" + +# Node.js installation path (defaults to the MCSManager installation path. Can be overridden with --node-install-dir) +node_install_dir="$install_dir" + +# Temp dir for file extraction +tmp_dir="/tmp" + +# Bypass installed user permission check, override by --force-permission +force_permission=false + + +# --------------- Global Variables ---------------# +# DO NOT MODIFY # + + +# Component installation options. +# For fresh installs, both daemon and web components are installed by default. +# For updates, behavior depends on detected existing components. +# Can be overridden with --install daemon/web/all +install_daemon=true +install_web=true + +# Install MCSM as (default: root). +# To install as a general user (e.g., "mcsm"), use the --user option: --user mcsm +# To ensure compatibility, only user mcsm is supported. +install_user="root" +# Installed user, for permission check +web_installed=false +daemon_installed=false +web_installed_user="" +daemon_installed_user="" + +# Service file locations +# the final dir = systemd_file + {web/daemon} + ".service" +systemd_file="/etc/systemd/system/mcsm-" +# Optional: Override the default installation source file. +# If --install-source is specified, the installer will use the provided +# "mcsmanager_linux_release.tar.gz" file instead of downloading it. +# Only support local absolute path. +install_source_path="" + +# temp path for extracted file(s) +install_tmp_dir="/opt/mcsmanager/mcsm_abcd" + +# dir name for data dir backup +# e.g. /opt/mcsmanager/daemon/data -> /opt/mcsmanager/data_bak_data +# only valid for when during an update +backup_prefix="data_bak_" + +# System architecture (detected automatically) +arch="" +version="" +distro="" + + + +# Supported OS versions (map-style structure) +# Format: supported_os["distro_name"]="version1 version2 version3 ..." +declare -A supported_os +supported_os["Ubuntu"]="18 20 22 24" +supported_os["Debian"]="10 11 12 13" +supported_os["CentOS"]="7 8 8-stream 9-stream 10-stream" +supported_os["RHEL"]="7 8 9 10" +supported_os["Arch"]="rolling" + +# Required system commands for installation +# These will be checked before logic process +required_commands=( + chmod + chown + wget + tar + stat + useradd + usermod + date +) + +# Node.js related sections +# Enable strict version checking (exact match) +# enabled -> strict requriement for defined node version +# false -> newer version allowed +# Older version is NEVER allowed +strict_node_version_check=true + +# Will be set based on actual node status +install_node=true +# Remove leading "v" from defined version +required_node_ver="${node_version#v}" + +# Holds absolute path for node & npm +node_bin_path="" +npm_bin_path="" +# Hold Node.js arch name, e.g. x86_64 -> x64 +node_arch="" +# Hold Node.js intallation path, e.g. ${node_install_dir}/node-${node_version}-linux-${arch} +node_path="" + +# For installation result +daemon_key="" +daemon_port="" +web_port="" +daemon_key_config_subpath="data/Config/global.json" +web_port_config_subpath="data/SystemConfig/config.json" + +# Terminal color & style related +# Default to false, auto check later +SUPPORTS_COLOR=false +SUPPORTS_STYLE=false +# Declare ANSI reset +RESET="\033[0m" + +# Foreground colors +declare -A FG_COLORS=( + [black]="\033[0;30m" + [red]="\033[0;31m" + [green]="\033[0;32m" + [yellow]="\033[0;33m" + [blue]="\033[0;34m" + [magenta]="\033[0;35m" + [cyan]="\033[0;36m" + [white]="\033[0;37m" +) + +# Font styles +declare -A STYLES=( + [bold]="\033[1m" + [underline]="\033[4m" + [italic]="\033[3m" # Often ignored + [clear_line]="\r\033[2K" + [strikethrough]="\033[9m" +) + + +### Helper Functions +# Execution wrapper, avoid unexpected crashes. +safe_run() { + local func="$1" + local err_msg="$2" + shift 2 + + if ! "$func" "$@"; then + echo "Error: $err_msg" + exit 1 + fi +} + +# Function to ensure the script is run as root +check_root() { + # Using Bash's built-in EUID variable + if [ -n "$EUID" ]; then + if [ "$EUID" -ne 0 ]; then + cprint red "错误: 这个脚本只能运行在root或sudo模式下,请尝试切换用户或者使用sudo." + exit 1 + fi + else + # Fallback to using id -u if EUID is unavailable (e.g., non-Bash shell or misconfigured environment) + if [ "$(id -u)" -ne 0 ]; then + cprint red "错误: 这个脚本只能运行在root或sudo模式下,请尝试切换用户或者使用sudo." + exit 1 + fi + fi +} + +# Function to check whether current terminal support color & style +detect_terminal_capabilities() { + SUPPORTS_COLOR=false + SUPPORTS_STYLE=false + + if [ -t 1 ] && command -v tput >/dev/null 2>&1; then + if [ "$(tput colors)" -ge 8 ]; then + SUPPORTS_COLOR=true + fi + if tput bold >/dev/null 2>&1 && tput smul >/dev/null 2>&1; then + SUPPORTS_STYLE=true + fi + fi + + if [ "$SUPPORTS_COLOR" = true ]; then + cprint green "[OK] 这个终端支持彩色输出." + else + cprint yellow "注:终端不支持彩色输出。不格式化继续." + fi + + if [ "$SUPPORTS_STYLE" = true ]; then + cprint green "[OK] 终端支持粗体和下划线格式." + else + cprint yellow "注意:终端不支持高级文本样式." + fi +} + +# Check whether daemon or web is installed +is_component_installed() { + local component_name="$1" + local component_path="${install_dir}/${component_name}" + + if [[ -d "$component_path" ]]; then + cprint green "组件 '$component_name' 已经被安装在 $component_path" + + # Set corresponding global variable + if [[ "$component_name" == "daemon" ]]; then + daemon_installed=true + elif [[ "$component_name" == "web" ]]; then + web_installed=true + fi + + return 0 + else + cprint yellow "组件 '$component_name' 未被安装" + + # Set corresponding global variable + if [[ "$component_name" == "daemon" ]]; then + daemon_installed=false + elif [[ "$component_name" == "web" ]]; then + web_installed=false + fi + + return 1 + fi +} + +check_component_permission() { + local component="$1" + local service_file="${systemd_file}${component}.service" + + if [[ ! -f "$service_file" ]]; then + cprint yellow "找不到服务文件: $service_file" + return 0 # nothing changed + fi + + # Extract the User= line if it exists + local user_line + user_line=$(grep -E '^User=' "$service_file" 2>/dev/null | head -1) + + local user + if [[ -z "$user_line" ]]; then + user="root" # default if no User= is defined + else + user="${user_line#User=}" + fi + + # Validate user + if [[ "$user" != "root" && "$user" != "mcsm" ]]; then + cprint red bold "不支持的用户 '$user' 在 $service_file. 使用 'root' 或 'mcsm'." + exit 1 + fi + + # Assign to appropriate global + if [[ "$component" == "web" ]]; then + web_installed_user="$user" + elif [[ "$component" == "daemon" ]]; then + daemon_installed_user="$user" + fi + + cprint cyan "已删除 $component 以用户身份安装: $user" + return 0 +} + + + +parse_args() { + local explicit_install_flag=false + + while [[ $# -gt 0 ]]; do + case "$1" in + --install-dir) + if [[ -n "$2" ]]; then + install_dir="$2" + shift 2 + else + echo "错误:--install-dir需要一个路径参数." + exit 1 + fi + ;; + --node-install-dir) + if [[ -n "$2" ]]; then + node_install_dir="$2" + shift 2 + else + echo "错误:--node-install-dir需要一个路径参数." + exit 1 + fi + ;; + --install) + explicit_install_flag=true + if [[ -n "$2" && "$2" != --* ]]; then + case "$2" in + daemon) + install_daemon=true + is_component_installed "daemon" + install_web=false + check_component_permission "daemon" + ;; + web) + install_daemon=false + is_component_installed "web" + install_web=true + check_component_permission "web" + ;; + all) + install_daemon=true + install_web=true + is_component_installed "daemon" + is_component_installed "web" + check_component_permission "daemon" + check_component_permission "web" + ;; + *) + echo "错误:--install的值无效。期望‘daemon’, ‘web’或‘all’." + echo "Usage: --install daemon|web|all" + exit 1 + ;; + esac + shift 2 + else + echo "错误:提供了--install标志,但没有值。请指定:daemon、web或all." + echo "使用方法: --install daemon|web|all" + exit 1 + fi + ;; + --user) + if [[ -n "$2" ]]; then + case "$2" in + root) + install_user="root" + ;; + mcsm) + install_user="mcsm" + ;; + *) + echo "错误:无效用户 '$2'. 只有 'root' 和 'mcsm' 受支持." + echo "使用方法: --user root|mcsm" + exit 1 + ;; + esac + shift 2 + else + echo "错误:--user需要一个值 (root 或 mcsm)." + exit 1 + fi + ;; + --install-source) + if [[ -n "$2" ]]; then + install_source_path="$2" + shift 2 + else + echo "错误:--install-source需要文件路径." + exit 1 + fi + ;; + --force-permission) + force_permission=true + shift + ;; + *) + echo "错误:未知参数t: $1" + exit 1 + ;; + esac + done + + # Auto-detect branch: only run if --install was not explicitly passed + if [[ "$explicit_install_flag" == false ]]; then + daemon_installed=false + web_installed=false + + if is_component_installed "daemon"; then + daemon_installed=true + check_component_permission "daemon" + fi + if is_component_installed "web"; then + web_installed=true + check_component_permission "web" + fi + + # When only one component installed, we wanted to process that one only. + if [[ "$daemon_installed" == true && "$web_installed" == false ]]; then + install_daemon=true + install_web=false + elif [[ "$daemon_installed" == false && "$web_installed" == true ]]; then + install_daemon=false + install_web=true + else + install_daemon=true + install_web=true + fi + fi +} + + +# Get Distribution & Architecture Info +detect_os_info() { + distro="Unknown" + version="Unknown" + arch=$(uname -m) + + # Try primary source + if [ -f /etc/os-release ]; then + . /etc/os-release + distro_id="${ID,,}" + version_id="${VERSION_ID,,}" + + case "$distro_id" in + ubuntu) + distro="Ubuntu" + version="$version_id" + ;; + debian) + distro="Debian" + version="$version_id" + ;; + centos) + distro="CentOS" + version="$version_id" + ;; + rhel*) + distro="RHEL" + version="$version_id" + ;; + arch) + distro="Arch" + version="rolling" + ;; + *) + distro="${ID:-Unknown}" + version="$version_id" + ;; + esac + fi + + # Fallbacks for missing or invalid version + if [[ -z "$version" || "$version" == "unknown" || "$version" == "" ]]; then + if [ -f /etc/issue ]; then + version_guess=$(grep -oP '[0-9]+(\.[0-9]+)*' /etc/issue | head -1) + if [[ -n "$version_guess" ]]; then + version="$version_guess" + fi + fi + fi + + # Normalize version: keep only major version + version_full="$version" + cprint cyan "检测到操作系统: $distro $version_full" + cprint cyan "检测到架构: $arch" +} + +# Check if all required commands are available +check_required_commands() { + local missing=0 + + for cmd in "${required_commands[@]}"; do + if ! command -v "$cmd" >/dev/null 2>&1; then + echo "错误:必需的命令 '$cmd' 在PATH中不可用." + missing=1 + fi + done + + if [ "$missing" -ne 0 ]; then + echo "缺少一个或多个必需的命令。请安装后再试." + return 1 + fi + + cprint green "所有必需的命令都可用." + return 0 +} + +# Print with specified color and style, fallback to RESET if not supported. +# Supported colors*: black|red|green|yellow|blue|magenta|cyan|white +# Supported styles*: bold|underline|italic|clear_line|strikethrough +# *Note: some style may not necessarily work on all terminals. +# Example usage: +# cprint green bold "Installation completed successfully." +# cprint red underline "Failed to detect required command: wget" +# cprint yellow "Warning: Disk space is low." +# cprint underline "Failed to detect required command: wget" +# cprint bold green underline"Installation completed successfully." + +cprint() { + local color="" + local text="" + local styles="" + local disable_prefix=false + local disable_newline=false + + while [[ $# -gt 1 ]]; do + case "$1" in + black|red|green|yellow|blue|magenta|cyan|white) + color="$1" + ;; + bold|underline|italic|clear_line|strikethrough) + styles+="${STYLES[$1]}" + ;; + noprefix) + disable_prefix=true + ;; + nonl) + disable_newline=true + ;; + esac + shift + done + + text="$1" + + local prefix_text="" + if [[ "$disable_prefix" != true ]]; then + local timestamp="[$(date +%H:%M:%S)]" + local label="[MCSM Installer]" + prefix_text="${FG_COLORS[white]}$timestamp $label${RESET} " + fi + + local prefix="" + if [[ -n "$color" && "$SUPPORTS_COLOR" = true ]]; then + prefix+="${FG_COLORS[$color]}" + fi + if [[ "$SUPPORTS_STYLE" = true || "$styles" == *"${STYLES[clear_line]}"* ]]; then + prefix="$styles$prefix" + fi + + if [[ "$disable_newline" == true ]]; then + printf "%b%b%s%b" "$prefix_text" "$prefix" "$text" "$RESET" + else + printf "%b%b%s%b\n" "$prefix_text" "$prefix" "$text" "$RESET" + fi +} + + + + +# Permission check before proceed with installation +permission_barrier() { + if [[ "$web_installed" == false && "$daemon_installed" == false ]]; then + cprint cyan "当前没有安装组件-跳过权限检查." + return 0 + fi + + for component in web daemon; do + local is_installed_var="${component}_installed" + local installed_user_var="${component}_installed_user" + + if [[ "${!is_installed_var}" == true ]]; then + local installed_user="${!installed_user_var}" + + # Step 0: Ensure installed user is detected + if [[ -z "$installed_user" ]]; then + cprint red bold "检测到 '$component' 已安装,但无法从其systemd服务文件确定用户." + cprint red "这可能表示自定义或不支持的服务文件设置." + cprint red "拒绝执行以避免潜在的冲突." + exit 1 + fi + + # Step 1: User match check with optional force override + if [[ "$installed_user" != "$install_user" ]]; then + if [[ "$force_permission" == true ]]; then + cprint yellow bold "权限不匹配 '$component':" + cprint yellow "以用户身份安装: $installed_user" + cprint yellow "目标安装用户: $install_user" + cprint yellow "用户不匹配,但设置了--force-permission。继续和更新权限…" + sleep 3 + else + cprint red bold "权限不匹配 '$component':" + cprint red "以用户身份安装: $installed_user" + cprint red "目标安装用户: $install_user" + cprint red "用户不匹配,但设置了--force-permission。继续和更新权限..." + exit 1 + fi + else + cprint green bold "权限检查已通过: '$installed_user' 匹配目标用户." + fi + + fi + done + + # Step 2: Directory ownership check + local dir_owner + dir_owner=$(stat -c '%U' "$install_dir" 2>/dev/null) + + if [[ -z "$dir_owner" ]]; then + cprint red bold "无法确定安装目录的所有者: $install_dir" + exit 1 + fi + + if [[ "$dir_owner" != "$install_user" ]]; then + if [[ "$force_permission" == true ]]; then + cprint yellow bold "安装目录所有权不匹配:" + cprint yellow " 目录: $install_dir" + cprint yellow " 归: $dir_owner" + cprint yellow " 预期: $install_user" + cprint yellow " --force-permission设置。尽管不匹配,但继续." + sleep 3 + else + cprint red bold "安装目录所有权不匹配:" + cprint red " 目录: $install_dir" + cprint red " 归: $dir_owner" + cprint red " 预期: $install_user" + exit 1 + fi + else + cprint green bold "安装目录所有权检查通过: '$install_dir' is owned by '$install_user'." + fi + + cprint green bold "验证了权限和所有权。继续." + return 0 +} + + + +# Map OS arch with actual Node.js Arch name +# This function should be placed after var arch has been assigned a valid value. +resolve_node_arch() { + case "$arch" in + x86_64) + node_arch="x64" + ;; + aarch64) + node_arch="arm64" + ;; + armv7l) + node_arch="armv7l" + ;; + *) + cprint red bold "Node.js不支持的架构: $arch" + return 1 + ;; + esac + + # Assign node_path based on resolved arch and current version/install dir + node_path="${node_install_dir}/node-${node_version}-linux-${node_arch}" + + cprint cyan "解析了Node.js架构: $node_arch" + cprint cyan "Node.js安装路径: $node_path" +} + +# Check if Node.js at PATH is valid. +# This function check Node.js version + NPM (if Node.js valid) +verify_node_at_path() { + local node_path="$1" + node_bin_path="$node_path/bin/node" + npm_bin_path="$node_path/bin/npm" + + # Node binary missing + if [ ! -x "$node_bin_path" ]; then + return 1 + fi + + local installed_ver + installed_ver="$("$node_bin_path" -v 2>/dev/null | sed 's/^v//')" + + if [[ -z "$installed_ver" ]]; then + return 1 + fi + + if [ "$strict_node_version_check" = true ]; then + if [[ "$installed_ver" != "$required_node_ver" ]]; then + return 3 + fi + else + local cmp + cmp=$(printf "%s\n%s\n" "$required_node_ver" "$installed_ver" | sort -V | head -1) + if [[ "$cmp" != "$required_node_ver" ]]; then + return 2 + fi + fi + + # Check if npm exists and works using node (not $PATH/npm) + if [ ! -x "$npm_bin_path" ]; then + return 4 + fi + + # Use node to run npm.js directly, in case env is broken + local npm_version + npm_version="$("$node_bin_path" "$npm_bin_path" --version 2>/dev/null)" + if [[ -z "$npm_version" ]]; then + return 4 + fi + + return 0 +} + + +# Node.js pre-check. check if we need to install Node.js before installer run. +# Use postcheck_node_after_install() to check after install. +check_node_installed() { + verify_node_at_path "$node_path" + local result=$? + + case $result in + 0) + cprint green bold "Node.js和npm在 $node_path (版本 $required_node_ver 或兼容)" + install_node=false + ;; + 1) + cprint yellow bold "Node.js二进制文件未找到或无法使用 $node_path" + install_node=true + ;; + 2) + cprint red bold "Node.js版本 $node_path 太老. 要求: >= $required_node_ver" + install_node=true + ;; + 3) + cprint red bold "Node.js版本不匹配。要求: $required_node_ver, 发现了其他的Node.js版本." + install_node=true + ;; + 4) + cprint red bold "Node.js存在,但npm缺失或损坏." + install_node=true + ;; + *) + cprint red bold "Node验证中出现意外错误." + install_node=true + ;; + esac +} + +# Node.js post-check. check if Node.js is valid after install. +postcheck_node_after_install() { + verify_node_at_path "$node_path" + if [[ $? -ne 0 ]]; then + cprint red bold "Node.js安装失败或无效 $node_path" + return 1 + else + cprint green bold "Node.js的安装和运行在 $node_path" + return 0 + fi +} + +# Install Node.js and check +install_node() { + local archive_name="node-${node_version}-linux-${node_arch}.tar.xz" + local target_dir="${node_install_dir}/node-${node_version}-linux-${node_arch}" + local archive_path="${node_install_dir}/${archive_name}" + local download_url="${node_download_url_base}${node_version}/${archive_name}" + local fallback="$node_download_fallback" + + cprint cyan bold "安装Node.js $node_version 架构: $node_arch" + + mkdir -p "$node_install_dir" || { + cprint red bold "创建Node安装目录失败: $node_install_dir" + return 1 + } + + # Download + cprint cyan "下载Node.js: $download_url" + if ! wget --progress=bar:force -O "$archive_path" "$download_url"; then + cprint yellow "主下载失败。尝试备用下载……" + + if [[ -n "$fallback" ]]; then + if [[ "$fallback" =~ ^https?:// ]]; then + cprint cyan "从备用URL下载: $fallback" + if ! wget --progress=bar:force -O "$archive_path" "$fallback"; then + cprint red bold "备用下载失败: $fallback" + return 1 + fi + elif [ -f "$fallback" ]; then + cprint cyan "从本地备份进行复制: $fallback" + cp "$fallback" "$archive_path" || { + cprint red bold "复制备用Node.js存档失败 $fallback" + return 1 + } + else + cprint red bold "无效的备用路径: $fallback" + return 1 + fi + else + cprint red bold "没有配置备用源。不能继续进行." + return 1 + fi + fi + + # Extract archive + cprint cyan "提取Node.js存档..." + if ! tar -xf "$archive_path" -C "$node_install_dir"; then + cprint red bold "提取Node.js文件失败." + return 1 + fi + + chmod -R a+rx "$target_dir" || { + cprint red bold "在Node.js文件上设置执行权限失败." + return 1 + } + + verify_node_at_path "$target_dir" + local result=$? + if [[ $result -ne 0 ]]; then + cprint red bold "Node.js安装验证失败." + return 1 + fi + + cprint cyan "清理文件……" + rm -f "$archive_path" + + cprint green bold "Node.js $node_version 安装成功 $target_dir" + # Save resolved binary paths to global variables + node_bin_path="${target_dir}/bin/node" + npm_bin_path="${target_dir}/bin/npm" + + cprint green "Node.js 二进制文件: $node_bin_path" + cprint green "npm 二进制文件: $npm_bin_path" + return 0 +} + +# Function to download MCSM package. fetch from primary URL first, then fallback URL. +# This function only put extracted file(s) into install_dir, it does not perform the actual update. +download_mcsm() { + local archive_name="$package_name" + local archive_path="${tmp_dir}/${archive_name}" + local primary_url="${download_base_url}${archive_name}" + local fallback="$download_fallback_url" + + cprint cyan bold "下载MCSManager安装包…" + + # Step 1: Try downloading from primary URL + if ! wget --progress=bar:force -O "$archive_path" "$primary_url"; then + cprint yellow "主下载失败。尝试备用资源…" + + if [[ -z "$fallback" ]]; then + cprint red bold "没有指定备用URL或路径." + return 1 + fi + + if [[ "$fallback" =~ ^https?:// ]]; then + if ! wget --progress=bar:force -O "$archive_path" "$fallback"; then + cprint red bold "备用下载失败 $fallback" + return 1 + fi + elif [[ -f "$fallback" ]]; then + cp "$fallback" "$archive_path" || { + cprint red bold "未能复制备用文件 $fallback" + return 1 + } + else + cprint red bold "备用路径无效: $fallback" + return 1 + fi + fi + + # Step 2: Generate extract directory + local suffix + suffix=$(tr -dc 'a-z0-9' /dev/null; then + cprint green "用户 '$install_user' 已经存在." + else + cprint cyan "创建系统用户: $install_user (无登录,无密码)..." + if ! useradd --system --home "$install_dir" --shell /usr/sbin/nologin "$install_user"; then + cprint red bold "创建用户失败: $install_user" + exit 1 + fi + cprint green "用户 '$install_user' 已创建." + fi + + + # Docker integration + if command -v docker &>/dev/null; then + cprint cyan "Docker已被安装 -检查组分配…" + + if getent group docker &>/dev/null; then + if id -nG "$install_user" | grep -qw docker; then + cprint green "用户 '$install_user' 已经在“docker”组中." + else + cprint cyan "添加用户 '$install_user' 到 'docker' 组..." + if usermod -aG docker "$install_user"; then + cprint green "授予的Docker组访问权限 '$install_user'." + else + cprint red "未能添加 '$install_user' 给“Docker”组。这个用户可能无法使用Docker." + fi + fi + else + cprint red "安装了Docker,但没有找到Docker组。跳过组分配." + fi + else + cprint yellow "未安装Docker -跳过Docker组配置." + fi + + return 0 +} +# Function to stop MCSM services if they exist +stop_mcsm_services() { + cprint yellow bold "试图停止mcsm-web和mcsm-daemon服务..." + + # Attempt to stop mcsm-web + cprint blue "正在停止 mcsm-web..." + if systemctl stop mcsm-web; then + cprint green "mcsm-web 已停止." + else + cprint red bold "警告:未能停止mcsm-web(可能不存在或已停止)." + fi + + # Attempt to stop mcsm-daemon + cprint blue "正在停止 mcsm-daemon..." + if systemctl stop mcsm-daemon; then + cprint green "mcsm-daemon 已停止." + else + cprint red bold "警告:未能停止mcsm-daemon(可能不存在或已停止)." + fi +} +# Prepare file & permissions before install. +mcsm_install_prepare() { + + # Stop service if existed + stop_mcsm_services + + if [[ ! -d "$install_tmp_dir" ]]; then + cprint red bold "临时安装目录不存在: $install_tmp_dir" + exit 1 + fi + + cprint cyan "改变所有权 $install_tmp_dir 到用户 '$install_user'..." + chown -R "$install_user":"$install_user" "$install_tmp_dir" || { + cprint red bold "所有权变更失败 $install_tmp_dir" + cleanup_install_tmp + exit 1 + } + + # Normalize install_dir to ensure it ends with a slash + [[ "${install_dir}" != */ ]] && install_dir="${install_dir}/" + + if [[ "$web_installed" == false && "$daemon_installed" == false ]]; then + cprint cyan "没有检测到现有组件-跳过数据备份/清理." + return 0 + fi + + cprint green bold "已成功准备现有组件." + return 0 +} + +# Install or update a component +install_component() { + local component="$1" + local target_path="${install_dir}${component}" + local backup_data_path="${install_dir}${backup_prefix}${component}" + local source_path="${install_tmp_dir}/mcsmanager/${component}" + + cprint cyan bold "安装/更新组件: $component" + + # Step 1: Move new component to install_dir + if [[ ! -d "$source_path" ]]; then + cprint red bold "找不到源目录: $source_path" + cleanup_install_tmp + exit 1 + fi + +# [20:49:07] [MCSM Installer] 安装/更新组件: web +# [20:49:07] [MCSM Installer] 更新的文件 /opt/mcsmanager/mcsm_9gha/mcsmanager/web → /opt/mcsmanager/web +# [20:49:07] [MCSM Installer] 已移动 web 到 /opt/mcsmanager/web + cprint cyan "删除依赖库文件 $target_path/node_modules/" + if [[ -d "$target_path/node_modules/" ]]; then + rm -rf "$target_path/node_modules/" + + if cp -a "$source_path"/. "$target_path"; then + cprint green "更新的文件 $source_path → $target_path" + rm -rf "$source_path" + else + cprint red bold "更新文件失败 $source_path → $target_path" + cleanup_install_tmp + exit 1 + fi + cprint green "已移动 $component 到 $target_path" + + + # Step 3: Install NPM dependencies + if [[ ! -x "$npm_bin_path" ]]; then + cprint red bold "找不到npm二进制文件或无法执行: $npm_bin_path" + cleanup_install_tmp + exit 1 + fi + + cprint cyan "正在使用npm安装依赖库 $component ..." + pushd "$target_path" >/dev/null || { + cprint red bold "更改目录失败 $target_path" + cleanup_install_tmp + exit 1 + } + + + if ! "$node_bin_path" "$npm_bin_path" install --registry=https://registry.npmmirror.com --no-audit --no-fund --loglevel=warn; then + cprint red bold "NPM依赖项安装失败 $component" + popd >/dev/null + cleanup_install_tmp + exit 1 + fi + + popd >/dev/null + cprint green bold "组件 '$component' 安装/更新成功." +} + +# Create systemd service for a given component. +# This will overwrite the existing service file. +create_systemd_service() { + local component="$1" + local service_path="${systemd_file}${component}.service" + local working_dir="${install_dir}${component}" + local exec="${node_bin_path} app.js" + + if [[ ! -d "$working_dir" ]]; then + cprint red bold "找不到组件目录: $working_dir" + cleanup_install_tmp + return 1 + fi + + cprint cyan "创建systemd服务 '$component'..." + + cat > "$service_path" </dev/null | awk '{print $1}') + [[ -z "$ip_address" ]] && ip_address="你的IP" + + # Daemon info + if [[ "$install_daemon" == true ]]; then + local daemon_address="ws://$ip_address:${daemon_port:-Failed to Retrieve from Config file}" + local daemon_key_display="${daemon_key:-Failed to Retrieve from Config file}" + + cprint yellow noprefix "守护进程地址:" + cprint white noprefix " $daemon_address" + cprint yellow noprefix "守护进程秘钥:" + cprint white noprefix " $daemon_key_display" + echo "" + fi + + # Web info + if [[ "$install_web" == true ]]; then + local web_address="http://$ip_address:${web_port:-Failed to Retrieve from Config file}" + cprint yellow noprefix "HTTP面板地址:" + cprint white noprefix nonl " $web_address " + cprint yellow noprefix "(在你的浏览器中打开)" + echo "" + fi + + # Port guidance + cprint yellow noprefix "注意:" + cprint white noprefix " 确保防火墙放行上述端口." + cprint white noprefix " 如果从外部网络访问,您可能需要在路由器上配置端口转发." + echo "" + + # Service management help + cprint yellow noprefix "MCSManager管理命令:" + if [[ "$install_daemon" == true ]]; then + cprint white noprefix nonl " systemctl start " + cprint yellow noprefix "mcsm-daemon.service" + cprint white noprefix nonl " systemctl stop " + cprint yellow noprefix "mcsm-daemon.service" + cprint white noprefix nonl " systemctl restart " + cprint yellow noprefix "mcsm-daemon.service" + cprint white noprefix nonl " systemctl status " + cprint yellow noprefix "mcsm-daemon.service" + fi + if [[ "$install_web" == true ]]; then + cprint white noprefix nonl " systemctl start " + cprint yellow noprefix "mcsm-web.service" + cprint white noprefix nonl " systemctl stop " + cprint yellow noprefix "mcsm-web.service" + cprint white noprefix nonl " systemctl restart " + cprint yellow noprefix "mcsm-web.service" + cprint white noprefix nonl " systemctl status " + cprint yellow noprefix "mcsm-web.service" + fi + echo "" + + # Official doc + cprint yellow noprefix "官方文档:" + cprint white noprefix " https://docs.mcsmanager.com/zh_cn/" + echo "" + + # HTTPS support + cprint yellow noprefix "需要HTTPS?" + cprint white noprefix " 为了开启HTTPS安全访问,需要配置反向代理:" + cprint white noprefix " https://docs.mcsmanager.com/zh_cn/ops/proxy_https.html" + echo "" + + if [[ "$force_permission" == true ]]; then + cprint red noprefix "[重点] 您选择在安装期间重写权限." + cprint red noprefix " 你可能需要运行: chown -R $install_user 手动更新权限." + fi + + # Closing message + cprint green noprefix "安装完成。享受使用MCSManager管理服务器的乐趣!" + echo "" +} + +install_mcsm() { + local components=() + + if [[ "$install_web" == true ]]; then + install_component "web" + create_systemd_service "web" + components+=("web") + fi + + if [[ "$install_daemon" == true ]]; then + install_component "daemon" + create_systemd_service "daemon" + components+=("daemon") + fi + + # Reload systemd after any service file changes + if (( ${#components[@]} > 0 )); then + cprint cyan "重新加载systemd守护进程..." + # systemctl daemon-reexec + systemctl daemon-reload + + for comp in "${components[@]}"; do + local svc="mcsm-${comp}.service" + + cprint cyan "启用服务: $svc" + if systemctl enable "$svc" &>/dev/null; then + cprint green "已启用服务: $svc" + else + cprint red bold "启用服务失败: $svc" + cleanup_install_tmp + exit 1 + fi + done + fi + + # Clean tmp dir + cleanup_install_tmp + # Extract installed component info + safe_run extract_component_info "未能从已安装的服务中提取运行时信息" + safe_run print_install_result "未能打印安装结果" + +} + +main() { + trap 'echo "发生意外错误."; exit 99' ERR + safe_run detect_terminal_capabilities "检测终端功能失败" + safe_run check_root "脚本必须以root身份运行" + safe_run parse_args "解析参数失败" "$@" + safe_run detect_os_info "OS检测失败" + # To be moved to a master pre check function. + safe_run resolve_node_arch "解析Node.js架构失败" + + safe_run check_required_commands "缺少必要的系统命令" + + safe_run check_node_installed "在预期目录上检测到Node.js或npm失败。Node.js将被安装." + if [ "$install_node" = true ]; then + safe_run install_node "Node.js安装失败" + fi + + safe_run permission_barrier "权限验证失败-中止安装" + + safe_run prepare_user "准备用户权限失败。处理步骤." + + safe_run download_mcsm "获取MCSManager源失败。处理步骤" + safe_run mcsm_install_prepare "准备安装时出错" + + safe_run install_mcsm "未能安装 MCSManager" +} +main "$@" From 68995623b48ff92b892620f3140bfc152c624f7d Mon Sep 17 00:00:00 2001 From: YuMao233 Date: Thu, 26 Feb 2026 20:52:13 +0800 Subject: [PATCH 326/338] feat: add test install sh --- setup_cn_test.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/setup_cn_test.sh b/setup_cn_test.sh index 425d5e2..276e760 100644 --- a/setup_cn_test.sh +++ b/setup_cn_test.sh @@ -1028,6 +1028,7 @@ install_component() { cprint cyan "删除依赖库文件 $target_path/node_modules/" if [[ -d "$target_path/node_modules/" ]]; then rm -rf "$target_path/node_modules/" + fi if cp -a "$source_path"/. "$target_path"; then cprint green "更新的文件 $source_path → $target_path" From ffff3abac45e75fd1030a02260a85e921d22015f Mon Sep 17 00:00:00 2001 From: YuMao233 Date: Thu, 26 Feb 2026 20:57:42 +0800 Subject: [PATCH 327/338] fix: remove node_modules directory before component installation --- setup.sh | 5 +++++ setup_cn.sh | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index d532e13..4201f5e 100644 --- a/setup.sh +++ b/setup.sh @@ -1025,6 +1025,11 @@ install_component() { exit 1 fi + cprint cyan "Removing node_modules folder: $target_path/node_modules/" + if [[ -d "$target_path/node_modules/" ]]; then + rm -rf "$target_path/node_modules/" + fi + if cp -a "$source_path"/. "$target_path"; then cprint green "Updated files from $source_path → $target_path" rm -rf "$source_path" diff --git a/setup_cn.sh b/setup_cn.sh index b3f0c36..68e477d 100644 --- a/setup_cn.sh +++ b/setup_cn.sh @@ -1021,6 +1021,11 @@ install_component() { cleanup_install_tmp exit 1 fi + + cprint cyan "删除依赖库文件 $target_path/node_modules/" + if [[ -d "$target_path/node_modules/" ]]; then + rm -rf "$target_path/node_modules/" + fi if cp -a "$source_path"/. "$target_path"; then cprint green "更新的文件 $source_path → $target_path" @@ -1054,7 +1059,7 @@ install_component() { cleanup_install_tmp exit 1 fi - + popd >/dev/null cprint green bold "组件 '$component' 安装/更新成功." } From 07812cd8958f6065816ab84b11fa1f749b31eab1 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 27 Feb 2026 16:47:58 -0500 Subject: [PATCH 328/338] Fix: Node.js exception, using 16.20.2 for CentsOS7 --- setup.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/setup.sh b/setup.sh index d532e13..86a1e94 100644 --- a/setup.sh +++ b/setup.sh @@ -26,6 +26,7 @@ package_name="mcsmanager_linux_release.tar.gz" # Node.js version to be installed # Keep the leading "v" node_version="v20.12.2" +node_version_centos7="v16.20.2" # Node download base URL - primary node_download_url_base="https://nodejs.org/dist/" @@ -483,6 +484,16 @@ detect_os_info() { cprint cyan "Detected Architecture: $arch" } +version_specific_rules() { + # Default: do nothing unless a rule matches + + if [[ "$distro" == "CentOS" && "$version" == "7" ]]; then + cprint yellow "Detected CentOS 7 — overriding Node.js version." + node_version="$node_version_centos7" + required_node_ver="${node_version#v}" + fi +} + # Check if all required commands are available check_required_commands() { local missing=0 @@ -1338,6 +1349,8 @@ main() { safe_run check_root "Script must be run as root" safe_run parse_args "Failed to parse arguments" "$@" safe_run detect_os_info "Failed to detect OS" + safe_run version_specific_rules "Failed to apply distro/version specific rules" + # To be moved to a master pre check function. safe_run resolve_node_arch "Failed to resolve Node.js architecture" From e2a48f376f6b454963b729409e31705f441dab47 Mon Sep 17 00:00:00 2001 From: Yumao Date: Sat, 28 Feb 2026 10:25:00 +0800 Subject: [PATCH 329/338] Update setup_cn.sh --- setup_cn.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/setup_cn.sh b/setup_cn.sh index 68e477d..e47d0e0 100644 --- a/setup_cn.sh +++ b/setup_cn.sh @@ -26,6 +26,7 @@ package_name="mcsmanager_linux_release.tar.gz" # Node.js version to be installed # Keep the leading "v" node_version="v20.12.2" +node_version_centos7="v16.20.2" # Node download base URL - primary node_download_url_base="https://nodejs.org/dist/" @@ -480,6 +481,16 @@ detect_os_info() { cprint cyan "检测到架构: $arch" } +version_specific_rules() { + # Default: do nothing unless a rule matches + + if [[ "$distro" == "CentOS" && "$version" == "7" ]]; then + cprint yellow "Detected CentOS 7 — overriding Node.js version." + node_version="$node_version_centos7" + required_node_ver="${node_version#v}" + fi +} + # Check if all required commands are available check_required_commands() { local missing=0 @@ -1341,6 +1352,8 @@ main() { safe_run check_root "脚本必须以root身份运行" safe_run parse_args "解析参数失败" "$@" safe_run detect_os_info "OS检测失败" + safe_run version_specific_rules "Failed to apply distro/version specific rules" + # To be moved to a master pre check function. safe_run resolve_node_arch "解析Node.js架构失败" From ff01a9e87b0376110715b38e8585b09e58a1bfbf Mon Sep 17 00:00:00 2001 From: YuMao233 Date: Sat, 28 Feb 2026 21:35:09 +0800 Subject: [PATCH 330/338] Update Docker configurations in market.json for multiple game servers, including start, stop, and update commands, and standardize the Docker image to githubyumao/steam-game-runtime. --- market-v2.json | 479 +++++++++++++++++++++++++++++++++++++++++++++++++ market.json | 112 ++++++------ 2 files changed, 532 insertions(+), 59 deletions(-) create mode 100644 market-v2.json diff --git a/market-v2.json b/market-v2.json new file mode 100644 index 0000000..d0c2f9e --- /dev/null +++ b/market-v2.json @@ -0,0 +1,479 @@ +[ + { + "title": "Squad Docker Server", + "language": "en_us", + "platform": "Linux", + "description": "use the official Docker image of Squad Server to quickly get started!", + "image": "https://squadovo.cn/img/header.jpg", + "gameType": "Squad", + "category": "Latest Version", + "runtime": "Linux", + "hardware": "Intel Core platform、RAM 8G+", + "size": "", + "targetLink": "", + "author": "MCSManager", + "tags": [ + "Docker version" + ], + "setupInfo": { + "startCommand": "./SquadGameServer.sh", + "stopCommand": "^C", + "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 403240 validate\" +quit", + "ie": "utf8", + "oe": "utf8", + "type": "steam/universal", + "tag": [ + "Squad" + ], + "fileCode": "utf8", + "processType": "docker", + "runAs": "steam", + "docker": { + "image": "githubyumao/steam-game-runtime:latest", + "updateCommandImage": "githubyumao/steam-game-runtime:latest", + "ports": [ + "{mcsm_port1}:7787/udp", + "{mcsm_port2}:15000/udp" + ], + "changeWorkdir": true, + "workingDir": "/data", + "env": [], + "extraVolumes": [] + } + } + }, + { + "title": "Rust Docker Server", + "language": "en_us", + "platform": "Linux", + "description": "Use the steam-game-runtime Docker image and SteamCMD to run Rust Dedicated Server.", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/rust.jpg", + "gameType": "Rust", + "category": "Latest Version", + "runtime": "Linux", + "hardware": "", + "size": "", + "targetLink": "", + "author": "MCSManager", + "tags": [ + "Commercial Use Allowed", + "Docker version" + ], + "setupInfo": { + "startCommand": "./RustDedicated -batchmode -nographics +server.port 28015 +rcon.port 28016", + "stopCommand": "^C", + "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 258550 validate\" +quit", + "ie": "utf8", + "oe": "utf8", + "type": "steam/universal", + "tag": [ + "Rust" + ], + "fileCode": "utf8", + "processType": "docker", + "runAs": "steam", + "docker": { + "image": "githubyumao/steam-game-runtime:latest", + "updateCommandImage": "githubyumao/steam-game-runtime:latest", + "ports": [ + "{mcsm_port1}:28015/udp", + "{mcsm_port2}:28016/udp" + ], + "changeWorkdir": true, + "workingDir": "/data", + "env": [], + "extraVolumes": [] + } + } + }, + { + "title": "Factorio Docker Server", + "language": "en_us", + "platform": "Linux", + "description": "Use the steam-game-runtime Docker image and SteamCMD to run Factorio Dedicated Server.", + "image": "https://cdn.factorio.com/assets/img/web/factorio-logo2.png", + "gameType": "Factorio", + "category": "Latest Version", + "runtime": "Linux", + "hardware": "X86_64、RAM 4G+", + "size": "", + "targetLink": "", + "author": "TPing", + "tags": [ + "Docker version" + ], + "setupInfo": { + "startCommand": "./bin/x64/factorio --start-server-load-latest", + "stopCommand": "^C", + "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 427520 validate\" +quit", + "ie": "utf8", + "oe": "utf8", + "type": "steam/universal", + "tag": [ + "Factorio" + ], + "fileCode": "utf8", + "processType": "docker", + "runAs": "steam", + "docker": { + "image": "githubyumao/steam-game-runtime:latest", + "updateCommandImage": "githubyumao/steam-game-runtime:latest", + "ports": [ + "{mcsm_port1}:34197/udp" + ], + "changeWorkdir": true, + "workingDir": "/data", + "env": [], + "extraVolumes": [] + } + } + }, + { + "platform": "Linux", + "language": "en_us", + "image": "https://hytale.com/static/images/logo.png", + "gameType": "Hytale", + "description": "Use Eclipse Temurin Java Docker image to run Hytale Dedicated Server.", + "title": "Hytale Docker Server", + "category": "hytale", + "runtime": "Linux", + "hardware": "RAM 4G+", + "targetLink": "https://github.com/SkyKingPX/Hytale-Server-Installer/releases/download/1.0.0/hytale-server-installer-linux-mcsm.zip", + "author": "SkyKing_PX", + "tags": [ + "Docker version" + ], + "setupInfo": { + "type": "hytale", + "startCommand": "java -Xms2G -Xmx4G -XX:AOTCache=HytaleServer.aot -jar HytaleServer.jar --assets Assets.zip", + "stopCommand": "stop", + "updateCommand": "./hytale-server-installer-linux", + "ie": "UTF-8", + "oe": "UTF-8", + "processType": "docker", + "docker": { + "image": "eclipse-temurin:25-jdk", + "updateCommandImage": "eclipse-temurin:25-jdk", + "ports": [ + "{mcsm_port1}:5520/udp" + ], + "changeWorkdir": true, + "workingDir": "/data", + "env": [], + "extraVolumes": [] + } + } + }, + { + "title": "Terraria Server", + "language": "en_us", + "platform": "Linux", + "description": "Use the steam-game-runtime Docker image and SteamCMD to run Terraria Dedicated Server.", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/terraria.webp", + "gameType": "Terraria", + "category": "Latest Version", + "runtime": "Linux", + "hardware": "RAM 8G+", + "size": "", + "targetLink": "", + "author": "MCSManager", + "tags": [ + "Docker version" + ], + "setupInfo": { + "startCommand": "./TerrariaServer.bin.x86_64 -port 7777 -autocreate 2 -worldname world1", + "stopCommand": "exit", + "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 105600 validate\" +quit", + "ie": "utf8", + "oe": "utf8", + "type": "steam/terraria", + "tag": [ + "terraria" + ], + "fileCode": "utf8", + "processType": "docker", + "runAs": "steam", + "docker": { + "image": "githubyumao/steam-game-runtime:latest", + "updateCommandImage": "githubyumao/steam-game-runtime:latest", + "ports": [ + "{mcsm_port1}:7777/tcp" + ], + "changeWorkdir": true, + "workingDir": "/data", + "env": [], + "extraVolumes": [] + } + } + }, + { + "title": "Palworld Server", + "language": "en_us", + "platform": "Linux", + "description": "Use the steam-game-runtime Docker image and SteamCMD to run Palworld Dedicated Server.", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/palworld.webp", + "gameType": "Palworld", + "category": "Latest Version", + "runtime": "Linux", + "hardware": "RAM 8G+", + "size": "", + "targetLink": "", + "author": "MCSManager", + "tags": [ + "Docker version" + ], + "setupInfo": { + "startCommand": "./PalServer.sh -port=8211 -useperfthreads -NoAsyncLoadingThread -UseMultithreadForDS", + "stopCommand": "^C", + "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 2394010 validate\" +quit", + "ie": "utf8", + "oe": "utf8", + "type": "steam/universal", + "tag": [ + "Palworld" + ], + "fileCode": "utf8", + "processType": "docker", + "runAs": "steam", + "docker": { + "image": "githubyumao/steam-game-runtime:latest", + "updateCommandImage": "githubyumao/steam-game-runtime:latest", + "ports": [ + "{mcsm_port1}:8211/udp", + "{mcsm_port2}:25575/tcp" + ], + "changeWorkdir": true, + "workingDir": "/data", + "env": [], + "extraVolumes": [] + } + } + }, + { + "title": "Project Zomboid", + "title-zh": "僵尸毁灭工程", + "language": "en_us", + "platform": "Linux", + "description": "Use the steam-game-runtime Docker image and SteamCMD to run Project Zomboid Dedicated Server.", + "description-zh": "使用 steam-game-runtime Docker 镜像和 SteamCMD 运行 Project Zomboid 专用服务器。", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/pzomboid.webp", + "gameType": "Zombie Survival", + "category": "Latest Version", + "runtime": "Linux", + "hardware": "RAM 8G+", + "size": "", + "targetLink": "", + "author": "MCSManager", + "tags": [ + "Docker version" + ], + "setupInfo": { + "startCommand": "./start-server.sh", + "stopCommand": "^C", + "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 380870 validate\" +quit", + "ie": "utf8", + "oe": "utf8", + "type": "steam/universal", + "tag": [ + "Project Zomboid" + ], + "fileCode": "utf8", + "processType": "docker", + "runAs": "steam", + "docker": { + "image": "githubyumao/steam-game-runtime:latest", + "updateCommandImage": "githubyumao/steam-game-runtime:latest", + "ports": [ + "{mcsm_port1}:16261/udp", + "{mcsm_port2}:16262/udp" + ], + "changeWorkdir": true, + "workingDir": "/data", + "env": [], + "extraVolumes": [] + } + } + }, + { + "title": "Satisfactory Docker Server", + "title-zh": "幸福工厂 Docker 服务器", + "language": "en_us", + "platform": "Linux", + "description": "Use the steam-game-runtime Docker image and SteamCMD to run Satisfactory Dedicated Server.", + "description-zh": "使用 steam-game-runtime Docker 镜像和 SteamCMD 运行幸福工厂专用服务器。", + "image": "https://cdn.cloudflare.steamstatic.com/steam/apps/526870/header.jpg", + "gameType": "Satisfactory", + "category": "Latest Version", + "runtime": "Linux", + "hardware": "RAM 8G+", + "size": "", + "targetLink": "", + "author": "MCSManager", + "tags": [ + "Docker version" + ], + "setupInfo": { + "startCommand": "./FactoryServer.sh", + "stopCommand": "^C", + "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 1690800 validate\" +quit", + "ie": "utf8", + "oe": "utf8", + "type": "steam/universal", + "tag": [ + "Satisfactory" + ], + "fileCode": "utf8", + "processType": "docker", + "runAs": "steam", + "docker": { + "image": "githubyumao/steam-game-runtime:latest", + "updateCommandImage": "githubyumao/steam-game-runtime:latest", + "ports": [ + "{mcsm_port1}:7777/udp", + "{mcsm_port2}:15000/udp", + "{mcsm_port3}:15777/udp" + ], + "changeWorkdir": true, + "workingDir": "/data", + "env": [], + "extraVolumes": [] + } + } + }, + { + "title": "7 Days to Die Docker Server", + "title-zh": "七日杀 Docker 服务器", + "language": "en_us", + "platform": "Linux", + "description": "Use the steam-game-runtime Docker image and SteamCMD to run 7 Days to Die Dedicated Server.", + "description-zh": "使用 steam-game-runtime Docker 镜像和 SteamCMD 运行七日杀专用服务器。", + "image": "https://cdn.cloudflare.steamstatic.com/steam/apps/251570/header.jpg", + "gameType": "7 Days to Die", + "category": "Latest Version", + "runtime": "Linux", + "hardware": "RAM 12G+", + "size": "", + "targetLink": "", + "author": "MCSManager", + "tags": [ + "Docker version" + ], + "setupInfo": { + "startCommand": "./startserver.sh -configfile=serverconfig.xml", + "stopCommand": "^C", + "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 294420 validate\" +quit", + "ie": "utf8", + "oe": "utf8", + "type": "steam/universal", + "tag": [ + "7 Days to Die" + ], + "fileCode": "utf8", + "processType": "docker", + "runAs": "steam", + "docker": { + "image": "githubyumao/steam-game-runtime:latest", + "updateCommandImage": "githubyumao/steam-game-runtime:latest", + "ports": [ + "{mcsm_port1}:26900/udp", + "{mcsm_port2}:26900/tcp" + ], + "changeWorkdir": true, + "workingDir": "/data", + "env": [], + "extraVolumes": [] + } + } + }, + { + "title": "Left 4 Dead 2 Docker Server", + "title-zh": "求生之路2 Docker 服务器", + "language": "en_us", + "platform": "Linux", + "description": "Use the steam-game-runtime Docker image and SteamCMD to run Left 4 Dead 2 Dedicated Server.", + "description-zh": "使用 steam-game-runtime Docker 镜像和 SteamCMD 运行求生之路2专用服务器。", + "image": "https://cdn.cloudflare.steamstatic.com/steam/apps/550/header.jpg", + "gameType": "Left 4 Dead 2", + "category": "Latest Version", + "runtime": "Linux", + "hardware": "RAM 4G+", + "size": "", + "targetLink": "", + "author": "MCSManager", + "tags": [ + "Docker version" + ], + "setupInfo": { + "startCommand": "./srcds_run -game left4dead2 -port 27015 +maxplayers 8 +map c1m4_atrium", + "stopCommand": "^C", + "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 222860 validate\" +quit", + "ie": "utf8", + "oe": "utf8", + "type": "steam/universal", + "tag": [ + "Left 4 Dead 2" + ], + "fileCode": "utf8", + "processType": "docker", + "runAs": "steam", + "docker": { + "image": "githubyumao/steam-game-runtime:latest", + "updateCommandImage": "githubyumao/steam-game-runtime:latest", + "ports": [ + "{mcsm_port1}:27015/udp", + "{mcsm_port2}:27015/tcp" + ], + "changeWorkdir": true, + "workingDir": "/data", + "env": [], + "extraVolumes": [] + } + } + }, + { + "title": "ARK: Survival Evolved Docker Server", + "title-zh": "方舟:生存进化 Docker 服务器", + "language": "en_us", + "platform": "Linux", + "description": "Use the steam-game-runtime Docker image and SteamCMD to run ARK: Survival Evolved Dedicated Server.", + "description-zh": "使用 steam-game-runtime Docker 镜像和 SteamCMD 运行方舟:生存进化专用服务器。", + "image": "https://cdn.cloudflare.steamstatic.com/steam/apps/346110/header.jpg", + "gameType": "ARK: Survival Evolved", + "category": "Latest Version", + "runtime": "Linux", + "hardware": "RAM 8G+", + "size": "", + "targetLink": "", + "author": "MCSManager", + "tags": [ + "Docker version" + ], + "setupInfo": { + "startCommand": "./ShooterGame/Binaries/Linux/ShooterGameServer Ragnarok?listen?Port=7777?QueryPort=27015?MaxPlayers=120?bRawSockets?AllowCrateSpawnsOnTopOfStructures=True -UseBattlEye -nosteamclient -game -server -log", + "stopCommand": "^C", + "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 376030 validate\" +quit", + "ie": "utf8", + "oe": "utf8", + "type": "steam/universal", + "tag": [ + "ARK" + ], + "fileCode": "utf8", + "processType": "docker", + "runAs": "steam", + "docker": { + "image": "githubyumao/steam-game-runtime:latest", + "updateCommandImage": "githubyumao/steam-game-runtime:latest", + "ports": [ + "{mcsm_port1}:7777/udp", + "{mcsm_port2}:7778/udp", + "{mcsm_port3}:27015/udp" + ], + "changeWorkdir": true, + "workingDir": "/data", + "env": [], + "extraVolumes": [] + } + } + } +] \ No newline at end of file diff --git a/market.json b/market.json index 88e926c..1735b34 100644 --- a/market.json +++ b/market.json @@ -1713,8 +1713,9 @@ "Docker 版" ], "setupInfo": { - "startCommand": "", - "stopCommand": "docker stop squad-dedicated", + "startCommand": "./SquadGameServer.sh", + "stopCommand": "^C", + "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 403240 validate\" +quit", "ie": "utf8", "oe": "utf8", "type": "steam/universal", @@ -1723,20 +1724,18 @@ ], "fileCode": "utf8", "processType": "docker", - "updateCommand": "docker restart squad-dedicated", + "runAs": "steam", "docker": { - "image": "cm2network/squad", - "containerName": "squad-dedicated", + "image": "githubyumao/steam-game-runtime:latest", + "updateCommandImage": "githubyumao/steam-game-runtime:latest", "ports": [ "{mcsm_port1}:7787/udp", "{mcsm_port2}:15000/udp" ], - "extraVolumes": [ - "{mcsm_workspace}/SquadConfig|/home/steam/squad-dedicated/SquadGame/ServerConfig/" - ], - "workingDir": "", + "changeWorkdir": true, + "workingDir": "/data", "env": [], - "changeWorkdir": false + "extraVolumes": [] } } }, @@ -1758,8 +1757,9 @@ "Docker version" ], "setupInfo": { - "startCommand": "", - "stopCommand": "docker stop squad-dedicated", + "startCommand": "./SquadGameServer.sh", + "stopCommand": "^C", + "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 403240 validate\" +quit", "ie": "utf8", "oe": "utf8", "type": "steam/universal", @@ -1768,20 +1768,18 @@ ], "fileCode": "utf8", "processType": "docker", - "updateCommand": "docker restart squad-dedicated", + "runAs": "steam", "docker": { - "image": "cm2network/squad", - "containerName": "squad-dedicated", + "image": "githubyumao/steam-game-runtime:latest", + "updateCommandImage": "githubyumao/steam-game-runtime:latest", "ports": [ "{mcsm_port1}:7787/udp", "{mcsm_port2}:15000/udp" ], - "extraVolumes": [ - "{mcsm_workspace}/SquadConfig|/home/steam/squad-dedicated/SquadGame/ServerConfig/" - ], - "workingDir": "", + "changeWorkdir": true, + "workingDir": "/data", "env": [], - "changeWorkdir": false + "extraVolumes": [] } } }, @@ -1803,8 +1801,9 @@ "Docker 版" ], "setupInfo": { - "startCommand": "", - "stopCommand": "docker stop rust-server", + "startCommand": "./RustDedicated -batchmode -nographics +server.port 28015 +rcon.port 28016", + "stopCommand": "^C", + "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 258550 validate\" +quit", "ie": "utf8", "oe": "utf8", "type": "steam/universal", @@ -1813,22 +1812,18 @@ ], "fileCode": "utf8", "processType": "docker", - "updateCommand": "docker restart rust-server", + "runAs": "steam", "docker": { - "image": "didstopia/rust-server", - "containerName": "rust-server", + "image": "githubyumao/steam-game-runtime:latest", + "updateCommandImage": "githubyumao/steam-game-runtime:latest", "ports": [ "{mcsm_port1}:28015/udp", "{mcsm_port2}:28016/udp" ], - "extraVolumes": [ - "{mcsm_workspace}/server|/server", - "{mcsm_workspace}/config|/app/.config/unity3d/Facepunch/Rust", - "{mcsm_workspace}/data|/data" - ], - "workingDir": "", + "changeWorkdir": true, + "workingDir": "/data", "env": [], - "changeWorkdir": false + "extraVolumes": [] } } }, @@ -1850,8 +1845,9 @@ "Docker version" ], "setupInfo": { - "startCommand": "", - "stopCommand": "docker stop rust-server", + "startCommand": "./RustDedicated -batchmode -nographics +server.port 28015 +rcon.port 28016", + "stopCommand": "^C", + "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 258550 validate\" +quit", "ie": "utf8", "oe": "utf8", "type": "steam/universal", @@ -1860,22 +1856,18 @@ ], "fileCode": "utf8", "processType": "docker", - "updateCommand": "docker restart rust-server", + "runAs": "steam", "docker": { - "image": "didstopia/rust-server", - "containerName": "rust-server", + "image": "githubyumao/steam-game-runtime:latest", + "updateCommandImage": "githubyumao/steam-game-runtime:latest", "ports": [ "{mcsm_port1}:28015/udp", "{mcsm_port2}:28016/udp" ], - "extraVolumes": [ - "{mcsm_workspace}/server|/server", - "{mcsm_workspace}/config|/app/.config/unity3d/Facepunch/Rust", - "{mcsm_workspace}/data|/data" - ], - "workingDir": "", + "changeWorkdir": true, + "workingDir": "/data", "env": [], - "changeWorkdir": false + "extraVolumes": [] } } }, @@ -1896,8 +1888,9 @@ "Docker 版" ], "setupInfo": { - "startCommand": "", + "startCommand": "./bin/x64/factorio --start-server-load-latest", "stopCommand": "^C", + "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 427520 validate\" +quit", "ie": "utf8", "oe": "utf8", "type": "steam/universal", @@ -1906,17 +1899,17 @@ ], "fileCode": "utf8", "processType": "docker", - "updateCommand": "", + "runAs": "steam", "docker": { - "image": "factoriotools/factorio:latest", - "containerName": "", + "image": "githubyumao/steam-game-runtime:latest", + "updateCommandImage": "githubyumao/steam-game-runtime:latest", "ports": [ "{mcsm_port1}:34197/udp" ], - "extraVolumes": [], - "workingDir": "/factorio", + "changeWorkdir": true, + "workingDir": "/data", "env": [], - "changeWorkdir": false + "extraVolumes": [] } } }, @@ -1937,8 +1930,9 @@ "Docker version" ], "setupInfo": { - "startCommand": "", + "startCommand": "./bin/x64/factorio --start-server-load-latest", "stopCommand": "^C", + "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 427520 validate\" +quit", "ie": "utf8", "oe": "utf8", "type": "steam/universal", @@ -1947,17 +1941,17 @@ ], "fileCode": "utf8", "processType": "docker", - "updateCommand": "", + "runAs": "steam", "docker": { - "image": "factoriotools/factorio:latest", - "containerName": "", + "image": "githubyumao/steam-game-runtime:latest", + "updateCommandImage": "githubyumao/steam-game-runtime:latest", "ports": [ "{mcsm_port1}:34197/udp" ], - "extraVolumes": [], - "workingDir": "/factorio", + "changeWorkdir": true, + "workingDir": "/data", "env": [], - "changeWorkdir": false + "extraVolumes": [] } } }, @@ -2111,4 +2105,4 @@ } } ] -} +} \ No newline at end of file From ee91e301797bebf9298de4a3b38ae710c8443e20 Mon Sep 17 00:00:00 2001 From: YuMao233 Date: Sat, 28 Feb 2026 22:36:46 +0800 Subject: [PATCH 331/338] Refactor market-v2.json structure to include language and package arrays, enhancing organization and clarity for game server configurations. --- market-v2.json | 908 +++++++++++++++++++++++++------------------------ 1 file changed, 461 insertions(+), 447 deletions(-) diff --git a/market-v2.json b/market-v2.json index d0c2f9e..f2780d7 100644 --- a/market-v2.json +++ b/market-v2.json @@ -1,479 +1,493 @@ -[ - { - "title": "Squad Docker Server", - "language": "en_us", - "platform": "Linux", - "description": "use the official Docker image of Squad Server to quickly get started!", - "image": "https://squadovo.cn/img/header.jpg", - "gameType": "Squad", - "category": "Latest Version", - "runtime": "Linux", - "hardware": "Intel Core platform、RAM 8G+", - "size": "", - "targetLink": "", - "author": "MCSManager", - "tags": [ - "Docker version" - ], - "setupInfo": { - "startCommand": "./SquadGameServer.sh", - "stopCommand": "^C", - "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 403240 validate\" +quit", - "ie": "utf8", - "oe": "utf8", - "type": "steam/universal", - "tag": [ - "Squad" +{ + "languages": [ + { + "label": "English", + "value": "en_us", + "path": "templates-en.json" + }, + { + "label": "中文", + "value": "zh_cn", + "path": "templates-zh.json" + } + ], + "packages": [ + { + "title": "Squad Docker Server", + "language": "en_us", + "platform": "Linux", + "description": "use the official Docker image of Squad Server to quickly get started!", + "image": "https://squadovo.cn/img/header.jpg", + "gameType": "Squad", + "category": "Latest Version", + "runtime": "Linux", + "hardware": "Intel Core platform、RAM 8G+", + "size": "", + "targetLink": "", + "author": "MCSManager", + "tags": [ + "Docker version" ], - "fileCode": "utf8", - "processType": "docker", - "runAs": "steam", - "docker": { - "image": "githubyumao/steam-game-runtime:latest", - "updateCommandImage": "githubyumao/steam-game-runtime:latest", - "ports": [ - "{mcsm_port1}:7787/udp", - "{mcsm_port2}:15000/udp" + "setupInfo": { + "startCommand": "./SquadGameServer.sh", + "stopCommand": "^C", + "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 403240 validate\" +quit", + "ie": "utf8", + "oe": "utf8", + "type": "steam/universal", + "tag": [ + "Squad" ], - "changeWorkdir": true, - "workingDir": "/data", - "env": [], - "extraVolumes": [] + "fileCode": "utf8", + "processType": "docker", + "runAs": "steam", + "docker": { + "image": "githubyumao/steam-game-runtime:latest", + "updateCommandImage": "githubyumao/steam-game-runtime:latest", + "ports": [ + "{mcsm_port1}:7787/udp", + "{mcsm_port2}:15000/udp" + ], + "changeWorkdir": true, + "workingDir": "/data", + "env": [], + "extraVolumes": [] + } } - } - }, - { - "title": "Rust Docker Server", - "language": "en_us", - "platform": "Linux", - "description": "Use the steam-game-runtime Docker image and SteamCMD to run Rust Dedicated Server.", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/rust.jpg", - "gameType": "Rust", - "category": "Latest Version", - "runtime": "Linux", - "hardware": "", - "size": "", - "targetLink": "", - "author": "MCSManager", - "tags": [ - "Commercial Use Allowed", - "Docker version" - ], - "setupInfo": { - "startCommand": "./RustDedicated -batchmode -nographics +server.port 28015 +rcon.port 28016", - "stopCommand": "^C", - "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 258550 validate\" +quit", - "ie": "utf8", - "oe": "utf8", - "type": "steam/universal", - "tag": [ - "Rust" + }, + { + "title": "Rust Docker Server", + "language": "en_us", + "platform": "Linux", + "description": "Use the steam-game-runtime Docker image and SteamCMD to run Rust Dedicated Server.", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/rust.jpg", + "gameType": "Rust", + "category": "Latest Version", + "runtime": "Linux", + "hardware": "", + "size": "", + "targetLink": "", + "author": "MCSManager", + "tags": [ + "Commercial Use Allowed", + "Docker version" ], - "fileCode": "utf8", - "processType": "docker", - "runAs": "steam", - "docker": { - "image": "githubyumao/steam-game-runtime:latest", - "updateCommandImage": "githubyumao/steam-game-runtime:latest", - "ports": [ - "{mcsm_port1}:28015/udp", - "{mcsm_port2}:28016/udp" + "setupInfo": { + "startCommand": "./RustDedicated -batchmode -nographics +server.port 28015 +rcon.port 28016", + "stopCommand": "^C", + "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 258550 validate\" +quit", + "ie": "utf8", + "oe": "utf8", + "type": "steam/universal", + "tag": [ + "Rust" ], - "changeWorkdir": true, - "workingDir": "/data", - "env": [], - "extraVolumes": [] + "fileCode": "utf8", + "processType": "docker", + "runAs": "steam", + "docker": { + "image": "githubyumao/steam-game-runtime:latest", + "updateCommandImage": "githubyumao/steam-game-runtime:latest", + "ports": [ + "{mcsm_port1}:28015/udp", + "{mcsm_port2}:28016/udp" + ], + "changeWorkdir": true, + "workingDir": "/data", + "env": [], + "extraVolumes": [] + } } - } - }, - { - "title": "Factorio Docker Server", - "language": "en_us", - "platform": "Linux", - "description": "Use the steam-game-runtime Docker image and SteamCMD to run Factorio Dedicated Server.", - "image": "https://cdn.factorio.com/assets/img/web/factorio-logo2.png", - "gameType": "Factorio", - "category": "Latest Version", - "runtime": "Linux", - "hardware": "X86_64、RAM 4G+", - "size": "", - "targetLink": "", - "author": "TPing", - "tags": [ - "Docker version" - ], - "setupInfo": { - "startCommand": "./bin/x64/factorio --start-server-load-latest", - "stopCommand": "^C", - "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 427520 validate\" +quit", - "ie": "utf8", - "oe": "utf8", - "type": "steam/universal", - "tag": [ - "Factorio" + }, + { + "title": "Factorio Docker Server", + "language": "en_us", + "platform": "Linux", + "description": "Use the steam-game-runtime Docker image and SteamCMD to run Factorio Dedicated Server.", + "image": "https://cdn.factorio.com/assets/img/web/factorio-logo2.png", + "gameType": "Factorio", + "category": "Latest Version", + "runtime": "Linux", + "hardware": "X86_64、RAM 4G+", + "size": "", + "targetLink": "", + "author": "TPing", + "tags": [ + "Docker version" ], - "fileCode": "utf8", - "processType": "docker", - "runAs": "steam", - "docker": { - "image": "githubyumao/steam-game-runtime:latest", - "updateCommandImage": "githubyumao/steam-game-runtime:latest", - "ports": [ - "{mcsm_port1}:34197/udp" + "setupInfo": { + "startCommand": "./bin/x64/factorio --start-server-load-latest", + "stopCommand": "^C", + "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 427520 validate\" +quit", + "ie": "utf8", + "oe": "utf8", + "type": "steam/universal", + "tag": [ + "Factorio" ], - "changeWorkdir": true, - "workingDir": "/data", - "env": [], - "extraVolumes": [] + "fileCode": "utf8", + "processType": "docker", + "runAs": "steam", + "docker": { + "image": "githubyumao/steam-game-runtime:latest", + "updateCommandImage": "githubyumao/steam-game-runtime:latest", + "ports": [ + "{mcsm_port1}:34197/udp" + ], + "changeWorkdir": true, + "workingDir": "/data", + "env": [], + "extraVolumes": [] + } } - } - }, - { - "platform": "Linux", - "language": "en_us", - "image": "https://hytale.com/static/images/logo.png", - "gameType": "Hytale", - "description": "Use Eclipse Temurin Java Docker image to run Hytale Dedicated Server.", - "title": "Hytale Docker Server", - "category": "hytale", - "runtime": "Linux", - "hardware": "RAM 4G+", - "targetLink": "https://github.com/SkyKingPX/Hytale-Server-Installer/releases/download/1.0.0/hytale-server-installer-linux-mcsm.zip", - "author": "SkyKing_PX", - "tags": [ - "Docker version" - ], - "setupInfo": { - "type": "hytale", - "startCommand": "java -Xms2G -Xmx4G -XX:AOTCache=HytaleServer.aot -jar HytaleServer.jar --assets Assets.zip", - "stopCommand": "stop", - "updateCommand": "./hytale-server-installer-linux", - "ie": "UTF-8", - "oe": "UTF-8", - "processType": "docker", - "docker": { - "image": "eclipse-temurin:25-jdk", - "updateCommandImage": "eclipse-temurin:25-jdk", - "ports": [ - "{mcsm_port1}:5520/udp" - ], - "changeWorkdir": true, - "workingDir": "/data", - "env": [], - "extraVolumes": [] + }, + { + "platform": "Linux", + "language": "en_us", + "image": "https://hytale.com/static/images/logo.png", + "gameType": "Hytale", + "description": "Use Eclipse Temurin Java Docker image to run Hytale Dedicated Server.", + "title": "Hytale Docker Server", + "category": "hytale", + "runtime": "Linux", + "hardware": "RAM 4G+", + "targetLink": "https://github.com/SkyKingPX/Hytale-Server-Installer/releases/download/1.0.0/hytale-server-installer-linux-mcsm.zip", + "author": "SkyKing_PX", + "tags": [ + "Docker version" + ], + "setupInfo": { + "type": "hytale", + "startCommand": "java -Xms2G -Xmx4G -XX:AOTCache=HytaleServer.aot -jar HytaleServer.jar --assets Assets.zip", + "stopCommand": "stop", + "updateCommand": "./hytale-server-installer-linux", + "ie": "UTF-8", + "oe": "UTF-8", + "processType": "docker", + "docker": { + "image": "eclipse-temurin:25-jdk", + "updateCommandImage": "eclipse-temurin:25-jdk", + "ports": [ + "{mcsm_port1}:5520/udp" + ], + "changeWorkdir": true, + "workingDir": "/data", + "env": [], + "extraVolumes": [] + } } - } - }, - { - "title": "Terraria Server", - "language": "en_us", - "platform": "Linux", - "description": "Use the steam-game-runtime Docker image and SteamCMD to run Terraria Dedicated Server.", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/terraria.webp", - "gameType": "Terraria", - "category": "Latest Version", - "runtime": "Linux", - "hardware": "RAM 8G+", - "size": "", - "targetLink": "", - "author": "MCSManager", - "tags": [ - "Docker version" - ], - "setupInfo": { - "startCommand": "./TerrariaServer.bin.x86_64 -port 7777 -autocreate 2 -worldname world1", - "stopCommand": "exit", - "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 105600 validate\" +quit", - "ie": "utf8", - "oe": "utf8", - "type": "steam/terraria", - "tag": [ - "terraria" + }, + { + "title": "Terraria Server", + "language": "en_us", + "platform": "Linux", + "description": "Use the steam-game-runtime Docker image and SteamCMD to run Terraria Dedicated Server.", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/terraria.webp", + "gameType": "Terraria", + "category": "Latest Version", + "runtime": "Linux", + "hardware": "RAM 8G+", + "size": "", + "targetLink": "", + "author": "MCSManager", + "tags": [ + "Docker version" ], - "fileCode": "utf8", - "processType": "docker", - "runAs": "steam", - "docker": { - "image": "githubyumao/steam-game-runtime:latest", - "updateCommandImage": "githubyumao/steam-game-runtime:latest", - "ports": [ - "{mcsm_port1}:7777/tcp" + "setupInfo": { + "startCommand": "./TerrariaServer.bin.x86_64 -port 7777 -autocreate 2 -worldname world1", + "stopCommand": "exit", + "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 105600 validate\" +quit", + "ie": "utf8", + "oe": "utf8", + "type": "steam/terraria", + "tag": [ + "terraria" ], - "changeWorkdir": true, - "workingDir": "/data", - "env": [], - "extraVolumes": [] + "fileCode": "utf8", + "processType": "docker", + "runAs": "steam", + "docker": { + "image": "githubyumao/steam-game-runtime:latest", + "updateCommandImage": "githubyumao/steam-game-runtime:latest", + "ports": [ + "{mcsm_port1}:7777/tcp" + ], + "changeWorkdir": true, + "workingDir": "/data", + "env": [], + "extraVolumes": [] + } } - } - }, - { - "title": "Palworld Server", - "language": "en_us", - "platform": "Linux", - "description": "Use the steam-game-runtime Docker image and SteamCMD to run Palworld Dedicated Server.", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/palworld.webp", - "gameType": "Palworld", - "category": "Latest Version", - "runtime": "Linux", - "hardware": "RAM 8G+", - "size": "", - "targetLink": "", - "author": "MCSManager", - "tags": [ - "Docker version" - ], - "setupInfo": { - "startCommand": "./PalServer.sh -port=8211 -useperfthreads -NoAsyncLoadingThread -UseMultithreadForDS", - "stopCommand": "^C", - "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 2394010 validate\" +quit", - "ie": "utf8", - "oe": "utf8", - "type": "steam/universal", - "tag": [ - "Palworld" + }, + { + "title": "Palworld Server", + "language": "en_us", + "platform": "Linux", + "description": "Use the steam-game-runtime Docker image and SteamCMD to run Palworld Dedicated Server.", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/palworld.webp", + "gameType": "Palworld", + "category": "Latest Version", + "runtime": "Linux", + "hardware": "RAM 8G+", + "size": "", + "targetLink": "", + "author": "MCSManager", + "tags": [ + "Docker version" ], - "fileCode": "utf8", - "processType": "docker", - "runAs": "steam", - "docker": { - "image": "githubyumao/steam-game-runtime:latest", - "updateCommandImage": "githubyumao/steam-game-runtime:latest", - "ports": [ - "{mcsm_port1}:8211/udp", - "{mcsm_port2}:25575/tcp" + "setupInfo": { + "startCommand": "./PalServer.sh -port=8211 -useperfthreads -NoAsyncLoadingThread -UseMultithreadForDS", + "stopCommand": "^C", + "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 2394010 validate\" +quit", + "ie": "utf8", + "oe": "utf8", + "type": "steam/universal", + "tag": [ + "Palworld" ], - "changeWorkdir": true, - "workingDir": "/data", - "env": [], - "extraVolumes": [] + "fileCode": "utf8", + "processType": "docker", + "runAs": "steam", + "docker": { + "image": "githubyumao/steam-game-runtime:latest", + "updateCommandImage": "githubyumao/steam-game-runtime:latest", + "ports": [ + "{mcsm_port1}:8211/udp", + "{mcsm_port2}:25575/tcp" + ], + "changeWorkdir": true, + "workingDir": "/data", + "env": [], + "extraVolumes": [] + } } - } - }, - { - "title": "Project Zomboid", - "title-zh": "僵尸毁灭工程", - "language": "en_us", - "platform": "Linux", - "description": "Use the steam-game-runtime Docker image and SteamCMD to run Project Zomboid Dedicated Server.", - "description-zh": "使用 steam-game-runtime Docker 镜像和 SteamCMD 运行 Project Zomboid 专用服务器。", - "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/pzomboid.webp", - "gameType": "Zombie Survival", - "category": "Latest Version", - "runtime": "Linux", - "hardware": "RAM 8G+", - "size": "", - "targetLink": "", - "author": "MCSManager", - "tags": [ - "Docker version" - ], - "setupInfo": { - "startCommand": "./start-server.sh", - "stopCommand": "^C", - "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 380870 validate\" +quit", - "ie": "utf8", - "oe": "utf8", - "type": "steam/universal", - "tag": [ - "Project Zomboid" + }, + { + "title": "Project Zomboid", + "title-zh": "僵尸毁灭工程", + "language": "en_us", + "platform": "Linux", + "description": "Use the steam-game-runtime Docker image and SteamCMD to run Project Zomboid Dedicated Server.", + "description-zh": "使用 steam-game-runtime Docker 镜像和 SteamCMD 运行 Project Zomboid 专用服务器。", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/pzomboid.webp", + "gameType": "Zombie Survival", + "category": "Latest Version", + "runtime": "Linux", + "hardware": "RAM 8G+", + "size": "", + "targetLink": "", + "author": "MCSManager", + "tags": [ + "Docker version" ], - "fileCode": "utf8", - "processType": "docker", - "runAs": "steam", - "docker": { - "image": "githubyumao/steam-game-runtime:latest", - "updateCommandImage": "githubyumao/steam-game-runtime:latest", - "ports": [ - "{mcsm_port1}:16261/udp", - "{mcsm_port2}:16262/udp" + "setupInfo": { + "startCommand": "./start-server.sh", + "stopCommand": "^C", + "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 380870 validate\" +quit", + "ie": "utf8", + "oe": "utf8", + "type": "steam/universal", + "tag": [ + "Project Zomboid" ], - "changeWorkdir": true, - "workingDir": "/data", - "env": [], - "extraVolumes": [] + "fileCode": "utf8", + "processType": "docker", + "runAs": "steam", + "docker": { + "image": "githubyumao/steam-game-runtime:latest", + "updateCommandImage": "githubyumao/steam-game-runtime:latest", + "ports": [ + "{mcsm_port1}:16261/udp", + "{mcsm_port2}:16262/udp" + ], + "changeWorkdir": true, + "workingDir": "/data", + "env": [], + "extraVolumes": [] + } } - } - }, - { - "title": "Satisfactory Docker Server", - "title-zh": "幸福工厂 Docker 服务器", - "language": "en_us", - "platform": "Linux", - "description": "Use the steam-game-runtime Docker image and SteamCMD to run Satisfactory Dedicated Server.", - "description-zh": "使用 steam-game-runtime Docker 镜像和 SteamCMD 运行幸福工厂专用服务器。", - "image": "https://cdn.cloudflare.steamstatic.com/steam/apps/526870/header.jpg", - "gameType": "Satisfactory", - "category": "Latest Version", - "runtime": "Linux", - "hardware": "RAM 8G+", - "size": "", - "targetLink": "", - "author": "MCSManager", - "tags": [ - "Docker version" - ], - "setupInfo": { - "startCommand": "./FactoryServer.sh", - "stopCommand": "^C", - "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 1690800 validate\" +quit", - "ie": "utf8", - "oe": "utf8", - "type": "steam/universal", - "tag": [ - "Satisfactory" + }, + { + "title": "Satisfactory Docker Server", + "title-zh": "幸福工厂 Docker 服务器", + "language": "en_us", + "platform": "Linux", + "description": "Use the steam-game-runtime Docker image and SteamCMD to run Satisfactory Dedicated Server.", + "description-zh": "使用 steam-game-runtime Docker 镜像和 SteamCMD 运行幸福工厂专用服务器。", + "image": "https://cdn.cloudflare.steamstatic.com/steam/apps/526870/header.jpg", + "gameType": "Satisfactory", + "category": "Latest Version", + "runtime": "Linux", + "hardware": "RAM 8G+", + "size": "", + "targetLink": "", + "author": "MCSManager", + "tags": [ + "Docker version" ], - "fileCode": "utf8", - "processType": "docker", - "runAs": "steam", - "docker": { - "image": "githubyumao/steam-game-runtime:latest", - "updateCommandImage": "githubyumao/steam-game-runtime:latest", - "ports": [ - "{mcsm_port1}:7777/udp", - "{mcsm_port2}:15000/udp", - "{mcsm_port3}:15777/udp" + "setupInfo": { + "startCommand": "./FactoryServer.sh", + "stopCommand": "^C", + "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 1690800 validate\" +quit", + "ie": "utf8", + "oe": "utf8", + "type": "steam/universal", + "tag": [ + "Satisfactory" ], - "changeWorkdir": true, - "workingDir": "/data", - "env": [], - "extraVolumes": [] + "fileCode": "utf8", + "processType": "docker", + "runAs": "steam", + "docker": { + "image": "githubyumao/steam-game-runtime:latest", + "updateCommandImage": "githubyumao/steam-game-runtime:latest", + "ports": [ + "{mcsm_port1}:7777/udp", + "{mcsm_port2}:15000/udp", + "{mcsm_port3}:15777/udp" + ], + "changeWorkdir": true, + "workingDir": "/data", + "env": [], + "extraVolumes": [] + } } - } - }, - { - "title": "7 Days to Die Docker Server", - "title-zh": "七日杀 Docker 服务器", - "language": "en_us", - "platform": "Linux", - "description": "Use the steam-game-runtime Docker image and SteamCMD to run 7 Days to Die Dedicated Server.", - "description-zh": "使用 steam-game-runtime Docker 镜像和 SteamCMD 运行七日杀专用服务器。", - "image": "https://cdn.cloudflare.steamstatic.com/steam/apps/251570/header.jpg", - "gameType": "7 Days to Die", - "category": "Latest Version", - "runtime": "Linux", - "hardware": "RAM 12G+", - "size": "", - "targetLink": "", - "author": "MCSManager", - "tags": [ - "Docker version" - ], - "setupInfo": { - "startCommand": "./startserver.sh -configfile=serverconfig.xml", - "stopCommand": "^C", - "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 294420 validate\" +quit", - "ie": "utf8", - "oe": "utf8", - "type": "steam/universal", - "tag": [ - "7 Days to Die" + }, + { + "title": "7 Days to Die Docker Server", + "title-zh": "七日杀 Docker 服务器", + "language": "en_us", + "platform": "Linux", + "description": "Use the steam-game-runtime Docker image and SteamCMD to run 7 Days to Die Dedicated Server.", + "description-zh": "使用 steam-game-runtime Docker 镜像和 SteamCMD 运行七日杀专用服务器。", + "image": "https://cdn.cloudflare.steamstatic.com/steam/apps/251570/header.jpg", + "gameType": "7 Days to Die", + "category": "Latest Version", + "runtime": "Linux", + "hardware": "RAM 12G+", + "size": "", + "targetLink": "", + "author": "MCSManager", + "tags": [ + "Docker version" ], - "fileCode": "utf8", - "processType": "docker", - "runAs": "steam", - "docker": { - "image": "githubyumao/steam-game-runtime:latest", - "updateCommandImage": "githubyumao/steam-game-runtime:latest", - "ports": [ - "{mcsm_port1}:26900/udp", - "{mcsm_port2}:26900/tcp" + "setupInfo": { + "startCommand": "./startserver.sh -configfile=serverconfig.xml", + "stopCommand": "^C", + "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 294420 validate\" +quit", + "ie": "utf8", + "oe": "utf8", + "type": "steam/universal", + "tag": [ + "7 Days to Die" ], - "changeWorkdir": true, - "workingDir": "/data", - "env": [], - "extraVolumes": [] + "fileCode": "utf8", + "processType": "docker", + "runAs": "steam", + "docker": { + "image": "githubyumao/steam-game-runtime:latest", + "updateCommandImage": "githubyumao/steam-game-runtime:latest", + "ports": [ + "{mcsm_port1}:26900/udp", + "{mcsm_port2}:26900/tcp" + ], + "changeWorkdir": true, + "workingDir": "/data", + "env": [], + "extraVolumes": [] + } } - } - }, - { - "title": "Left 4 Dead 2 Docker Server", - "title-zh": "求生之路2 Docker 服务器", - "language": "en_us", - "platform": "Linux", - "description": "Use the steam-game-runtime Docker image and SteamCMD to run Left 4 Dead 2 Dedicated Server.", - "description-zh": "使用 steam-game-runtime Docker 镜像和 SteamCMD 运行求生之路2专用服务器。", - "image": "https://cdn.cloudflare.steamstatic.com/steam/apps/550/header.jpg", - "gameType": "Left 4 Dead 2", - "category": "Latest Version", - "runtime": "Linux", - "hardware": "RAM 4G+", - "size": "", - "targetLink": "", - "author": "MCSManager", - "tags": [ - "Docker version" - ], - "setupInfo": { - "startCommand": "./srcds_run -game left4dead2 -port 27015 +maxplayers 8 +map c1m4_atrium", - "stopCommand": "^C", - "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 222860 validate\" +quit", - "ie": "utf8", - "oe": "utf8", - "type": "steam/universal", - "tag": [ - "Left 4 Dead 2" + }, + { + "title": "Left 4 Dead 2 Docker Server", + "title-zh": "求生之路2 Docker 服务器", + "language": "en_us", + "platform": "Linux", + "description": "Use the steam-game-runtime Docker image and SteamCMD to run Left 4 Dead 2 Dedicated Server.", + "description-zh": "使用 steam-game-runtime Docker 镜像和 SteamCMD 运行求生之路2专用服务器。", + "image": "https://cdn.cloudflare.steamstatic.com/steam/apps/550/header.jpg", + "gameType": "Left 4 Dead 2", + "category": "Latest Version", + "runtime": "Linux", + "hardware": "RAM 4G+", + "size": "", + "targetLink": "", + "author": "MCSManager", + "tags": [ + "Docker version" ], - "fileCode": "utf8", - "processType": "docker", - "runAs": "steam", - "docker": { - "image": "githubyumao/steam-game-runtime:latest", - "updateCommandImage": "githubyumao/steam-game-runtime:latest", - "ports": [ - "{mcsm_port1}:27015/udp", - "{mcsm_port2}:27015/tcp" + "setupInfo": { + "startCommand": "./srcds_run -game left4dead2 -port 27015 +maxplayers 8 +map c1m4_atrium", + "stopCommand": "^C", + "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 222860 validate\" +quit", + "ie": "utf8", + "oe": "utf8", + "type": "steam/universal", + "tag": [ + "Left 4 Dead 2" ], - "changeWorkdir": true, - "workingDir": "/data", - "env": [], - "extraVolumes": [] + "fileCode": "utf8", + "processType": "docker", + "runAs": "steam", + "docker": { + "image": "githubyumao/steam-game-runtime:latest", + "updateCommandImage": "githubyumao/steam-game-runtime:latest", + "ports": [ + "{mcsm_port1}:27015/udp", + "{mcsm_port2}:27015/tcp" + ], + "changeWorkdir": true, + "workingDir": "/data", + "env": [], + "extraVolumes": [] + } } - } - }, - { - "title": "ARK: Survival Evolved Docker Server", - "title-zh": "方舟:生存进化 Docker 服务器", - "language": "en_us", - "platform": "Linux", - "description": "Use the steam-game-runtime Docker image and SteamCMD to run ARK: Survival Evolved Dedicated Server.", - "description-zh": "使用 steam-game-runtime Docker 镜像和 SteamCMD 运行方舟:生存进化专用服务器。", - "image": "https://cdn.cloudflare.steamstatic.com/steam/apps/346110/header.jpg", - "gameType": "ARK: Survival Evolved", - "category": "Latest Version", - "runtime": "Linux", - "hardware": "RAM 8G+", - "size": "", - "targetLink": "", - "author": "MCSManager", - "tags": [ - "Docker version" - ], - "setupInfo": { - "startCommand": "./ShooterGame/Binaries/Linux/ShooterGameServer Ragnarok?listen?Port=7777?QueryPort=27015?MaxPlayers=120?bRawSockets?AllowCrateSpawnsOnTopOfStructures=True -UseBattlEye -nosteamclient -game -server -log", - "stopCommand": "^C", - "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 376030 validate\" +quit", - "ie": "utf8", - "oe": "utf8", - "type": "steam/universal", - "tag": [ - "ARK" + }, + { + "title": "ARK: Survival Evolved Docker Server", + "title-zh": "方舟:生存进化 Docker 服务器", + "language": "en_us", + "platform": "Linux", + "description": "Use the steam-game-runtime Docker image and SteamCMD to run ARK: Survival Evolved Dedicated Server.", + "description-zh": "使用 steam-game-runtime Docker 镜像和 SteamCMD 运行方舟:生存进化专用服务器。", + "image": "https://cdn.cloudflare.steamstatic.com/steam/apps/346110/header.jpg", + "gameType": "ARK: Survival Evolved", + "category": "Latest Version", + "runtime": "Linux", + "hardware": "RAM 8G+", + "size": "", + "targetLink": "", + "author": "MCSManager", + "tags": [ + "Docker version" ], - "fileCode": "utf8", - "processType": "docker", - "runAs": "steam", - "docker": { - "image": "githubyumao/steam-game-runtime:latest", - "updateCommandImage": "githubyumao/steam-game-runtime:latest", - "ports": [ - "{mcsm_port1}:7777/udp", - "{mcsm_port2}:7778/udp", - "{mcsm_port3}:27015/udp" + "setupInfo": { + "startCommand": "./ShooterGame/Binaries/Linux/ShooterGameServer Ragnarok?listen?Port=7777?QueryPort=27015?MaxPlayers=120?bRawSockets?AllowCrateSpawnsOnTopOfStructures=True -UseBattlEye -nosteamclient -game -server -log", + "stopCommand": "^C", + "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 376030 validate\" +quit", + "ie": "utf8", + "oe": "utf8", + "type": "steam/universal", + "tag": [ + "ARK" ], - "changeWorkdir": true, - "workingDir": "/data", - "env": [], - "extraVolumes": [] + "fileCode": "utf8", + "processType": "docker", + "runAs": "steam", + "docker": { + "image": "githubyumao/steam-game-runtime:latest", + "updateCommandImage": "githubyumao/steam-game-runtime:latest", + "ports": [ + "{mcsm_port1}:7777/udp", + "{mcsm_port2}:7778/udp", + "{mcsm_port3}:27015/udp" + ], + "changeWorkdir": true, + "workingDir": "/data", + "env": [], + "extraVolumes": [] + } } } - } -] \ No newline at end of file + ] +} \ No newline at end of file From 05f98482be3824a6aca7bb6257d9c9bc599a1d7f Mon Sep 17 00:00:00 2001 From: YuMao233 Date: Sun, 1 Mar 2026 20:13:40 +0800 Subject: [PATCH 332/338] Add Docker support for Java 25 in market.json, enhancing server configuration options. --- market.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/market.json b/market.json index 1735b34..88a2f8c 100644 --- a/market.json +++ b/market.json @@ -26,6 +26,10 @@ "remark": "包含基础插件,萌新快速开服!低配机器专属!", "targetLink": "https://cloud.alongw.cn/f/DzvHK/Paper-1.21.1-ZH.zip", "author": "alongw.cn", + "dockerSupport": { + "image": "eclipse-temurin:25-jdk", + "updateCommandImage": "eclipse-temurin:25-jdk" + }, "setupInfo": { "type": "minecraft/java", "startCommand": "java -Xms4096M -Xmx4096M -jar server.jar nogui", From bc80355ecf4e1f29f496070f9c18d072d9b9eb26 Mon Sep 17 00:00:00 2001 From: Yumao Date: Mon, 2 Mar 2026 14:48:32 +0800 Subject: [PATCH 333/338] Update market.json --- market.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/market.json b/market.json index 88a2f8c..4ff7947 100644 --- a/market.json +++ b/market.json @@ -26,7 +26,7 @@ "remark": "包含基础插件,萌新快速开服!低配机器专属!", "targetLink": "https://cloud.alongw.cn/f/DzvHK/Paper-1.21.1-ZH.zip", "author": "alongw.cn", - "dockerSupport": { + "dockerOptional": { "image": "eclipse-temurin:25-jdk", "updateCommandImage": "eclipse-temurin:25-jdk" }, @@ -2109,4 +2109,4 @@ } } ] -} \ No newline at end of file +} From 785b509ca9c41620dbb51af99cb0cf3bbdee8fb4 Mon Sep 17 00:00:00 2001 From: yumao233 Date: Mon, 9 Mar 2026 20:09:46 +0800 Subject: [PATCH 334/338] Update Docker configurations in market.json to use Java 21 and 17 for various Minecraft server setups, enhancing compatibility and performance. --- market.json | 198 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 195 insertions(+), 3 deletions(-) diff --git a/market.json b/market.json index 4ff7947..711c456 100644 --- a/market.json +++ b/market.json @@ -27,8 +27,8 @@ "targetLink": "https://cloud.alongw.cn/f/DzvHK/Paper-1.21.1-ZH.zip", "author": "alongw.cn", "dockerOptional": { - "image": "eclipse-temurin:25-jdk", - "updateCommandImage": "eclipse-temurin:25-jdk" + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" }, "setupInfo": { "type": "minecraft/java", @@ -53,6 +53,10 @@ "remark": "支持插件,最低 8GB 内存要求", "targetLink": "https://url.alww.top/mcsm/paper1.20.4.zip", "author": "alongw.cn", + "dockerOptional": { + "image": "eclipse-temurin:17-jdk", + "updateCommandImage": "eclipse-temurin:17-jdk" + }, "setupInfo": { "type": "minecraft/java", "startCommand": "java -Xms6144M -Xmx6144M -jar server.jar nogui", @@ -253,6 +257,10 @@ "remark": "仅包含 Paper 版本", "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.10/builds/84/downloads/paper-1.21.10-84.jar", "author": "papermc.io", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, "setupInfo": { "type": "minecraft/java/paper", "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.10-84.jar nogui", @@ -276,6 +284,10 @@ "remark": "仅包含 Paper 版本", "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.8/builds/60/downloads/paper-1.21.8-60.jar", "author": "papermc.io", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, "setupInfo": { "type": "minecraft/java/paper", "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.8-60.jar nogui", @@ -299,6 +311,10 @@ "remark": "仅包含 Paper 版本", "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.1/builds/133/downloads/paper-1.21.1-133.jar", "author": "papermc.io", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, "setupInfo": { "type": "minecraft/java/paper", "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.1-133.jar nogui", @@ -322,6 +338,10 @@ "remark": "Minecraft Forge", "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.1-47.3.33/forge-1.20.1-47.3.33-installer.jar", "author": "minecraftforge.net", + "dockerOptional": { + "image": "eclipse-temurin:17-jdk", + "updateCommandImage": "eclipse-temurin:17-jdk" + }, "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", @@ -345,6 +365,10 @@ "remark": "Minecraft Forge", "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.1-47.3.33/forge-1.20.1-47.3.33-installer.jar", "author": "minecraftforge.net", + "dockerOptional": { + "image": "eclipse-temurin:17-jdk", + "updateCommandImage": "eclipse-temurin:17-jdk" + }, "setupInfo": { "type": "minecraft/java/forge", "startCommand": ".\\run.bat", @@ -368,6 +392,10 @@ "remark": "Minecraft Forge", "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.6-50.1.48/forge-1.20.6-50.1.48-installer.jar", "author": "minecraftforge.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, "setupInfo": { "type": "minecraft/java/forge", "startCommand": ".\\run.bat", @@ -391,6 +419,10 @@ "remark": "Minecraft Forge", "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.19.2-43.4.20/forge-1.19.2-43.4.20-installer.jar", "author": "minecraftforge.net", + "dockerOptional": { + "image": "eclipse-temurin:17-jdk", + "updateCommandImage": "eclipse-temurin:17-jdk" + }, "setupInfo": { "type": "minecraft/java/forge", "startCommand": ".\\run.bat", @@ -545,6 +577,10 @@ "remark": "Minecraft Paper", "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.11/builds/39/downloads/paper-1.21.11-39.jar", "author": "papermc.io", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, "setupInfo": { "type": "minecraft/java/paper", "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.11-39.jar nogui", @@ -568,6 +604,10 @@ "remark": "Minecraft Paper", "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.10/builds/117/downloads/paper-1.21.10-117.jar", "author": "papermc.io", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, "setupInfo": { "type": "minecraft/java/paper", "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.10-117.jar nogui", @@ -591,6 +631,10 @@ "remark": "Minecraft Paper", "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.8/builds/60/downloads/paper-1.21.8-60.jar", "author": "papermc.io", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, "setupInfo": { "type": "minecraft/java/paper", "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.8-60.jar nogui", @@ -614,6 +658,10 @@ "remark": "Minecraft Paper", "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/232/downloads/paper-1.21.4-232.jar", "author": "papermc.io", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, "setupInfo": { "type": "minecraft/java/paper", "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.4-232.jar nogui", @@ -637,6 +685,10 @@ "remark": "Minecraft Paper", "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.1/builds/133/downloads/paper-1.21.1-133.jar", "author": "papermc.io", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, "setupInfo": { "type": "minecraft/java/paper", "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.1-133.jar nogui", @@ -660,6 +712,10 @@ "remark": "Minecraft Purpur", "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.11-2538.jar", "author": "purpurmc.org", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, "setupInfo": { "type": "minecraft/java/purpur", "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.11-2538.jar nogui", @@ -683,6 +739,10 @@ "remark": "Minecraft Purpur", "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.10-2535.jar", "author": "purpurmc.org", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, "setupInfo": { "type": "minecraft/java/purpur", "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.10-2535.jar nogui", @@ -706,6 +766,10 @@ "remark": "Minecraft Purpur", "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.8-2497.jar", "author": "purpurmc.org", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, "setupInfo": { "type": "minecraft/java/purpur", "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.8-2497.jar nogui", @@ -729,6 +793,10 @@ "remark": "Only Purpur included", "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.4-2416.jar", "author": "purpurmc.org", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, "setupInfo": { "type": "minecraft/java/purpur", "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.4-2416.jar nogui", @@ -752,6 +820,10 @@ "remark": "Minecraft Forge", "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.11-61.0.3/forge-1.21.11-61.0.3-installer.jar", "author": "minecraftforge.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", @@ -775,6 +847,10 @@ "remark": "Minecraft Forge", "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.11-61.0.3/forge-1.21.11-61.0.3-installer.jar", "author": "minecraftforge.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, "setupInfo": { "type": "minecraft/java/forge", "startCommand": ".\\run.bat", @@ -798,6 +874,10 @@ "remark": "Minecraft Forge", "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.10-60.1.5/forge-1.21.10-60.1.5-installer.jar", "author": "minecraftforge.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", @@ -821,6 +901,10 @@ "remark": "Minecraft Forge", "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.10-60.1.5/forge-1.21.10-60.1.5-installer.jar", "author": "minecraftforge.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, "setupInfo": { "type": "minecraft/java/forge", "startCommand": ".\\run.bat", @@ -844,6 +928,10 @@ "remark": "Minecraft Forge", "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.8-58.1.9/forge-1.21.8-58.1.9-installer.jar", "author": "minecraftforge.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", @@ -867,6 +955,10 @@ "remark": "Minecraft Forge", "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.8-58.1.9/forge-1.21.8-58.1.9-installer.jar", "author": "minecraftforge.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, "setupInfo": { "type": "minecraft/java/forge", "startCommand": ".\\run.bat", @@ -890,6 +982,10 @@ "remark": "Minecraft Forge", "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.4-54.1.8/forge-1.21.4-54.1.8-installer.jar", "author": "minecraftforge.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", @@ -913,6 +1009,10 @@ "remark": "Minecraft Forge", "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.4-54.1.8/forge-1.21.4-54.1.8-installer.jar", "author": "minecraftforge.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, "setupInfo": { "type": "minecraft/java/forge", "startCommand": ".\\run.bat", @@ -936,6 +1036,10 @@ "remark": "Minecraft Forge", "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.1-52.1.6/forge-1.21.1-52.1.6-installer.jar", "author": "minecraftforge.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, "setupInfo": { "type": "minecraft/java/forge", "startCommand": "sh ./run.sh", @@ -959,6 +1063,10 @@ "remark": "Minecraft Forge", "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.1-52.1.6/forge-1.21.1-52.1.6-installer.jar", "author": "minecraftforge.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, "setupInfo": { "type": "minecraft/java/forge", "startCommand": ".\\run.bat", @@ -982,6 +1090,10 @@ "remark": "Minecraft NeoForge", "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.11.8-beta/neoforge-21.11.8-beta-installer.jar", "author": "neoforged.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, "setupInfo": { "type": "minecraft/java/neoforge", "startCommand": "sh ./run.sh", @@ -1005,6 +1117,10 @@ "remark": "Minecraft NeoForge", "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.11.8-beta/neoforge-21.11.8-beta-installer.jar", "author": "neoforged.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, "setupInfo": { "type": "minecraft/java/neoforge", "startCommand": ".\\run.bat", @@ -1028,6 +1144,10 @@ "remark": "Minecraft NeoForge", "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.10.63/neoforge-21.10.63-installer.jar", "author": "neoforged.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, "setupInfo": { "type": "minecraft/java/neoforge", "startCommand": "sh ./run.sh", @@ -1051,6 +1171,10 @@ "remark": "Minecraft NeoForge", "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.10.63/neoforge-21.10.63-installer.jar", "author": "neoforged.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, "setupInfo": { "type": "minecraft/java/neoforge", "startCommand": ".\\run.bat", @@ -1074,6 +1198,10 @@ "remark": "Minecraft NeoForge", "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.8.52/neoforge-21.8.52-installer.jar", "author": "neoforged.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, "setupInfo": { "type": "minecraft/java/neoforge", "startCommand": "sh ./run.sh", @@ -1097,6 +1225,10 @@ "remark": "Minecraft NeoForge", "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.8.52/neoforge-21.8.52-installer.jar", "author": "neoforged.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, "setupInfo": { "type": "minecraft/java/neoforge", "startCommand": ".\\run.bat", @@ -1120,6 +1252,10 @@ "remark": "Minecraft NeoForge", "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.4.155/neoforge-21.4.155-installer.jar", "author": "neoforged.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, "setupInfo": { "type": "minecraft/java/neoforge", "startCommand": "sh ./run.sh", @@ -1143,6 +1279,10 @@ "remark": "Minecraft NeoForge", "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.4.155/neoforge-21.4.155-installer.jar", "author": "neoforged.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, "setupInfo": { "type": "minecraft/java/neoforge", "startCommand": ".\\run.bat", @@ -1166,6 +1306,10 @@ "remark": "Minecraft NeoForge", "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.1.213/neoforge-21.1.213-installer.jar", "author": "neoforged.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, "setupInfo": { "type": "minecraft/java/neoforge", "startCommand": "sh ./run.sh", @@ -1189,6 +1333,10 @@ "remark": "Minecraft NeoForge", "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.1.213/neoforge-21.1.213-installer.jar", "author": "neoforged.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, "setupInfo": { "type": "minecraft/java/neoforge", "startCommand": ".\\run.bat", @@ -1212,6 +1360,10 @@ "remark": "Minecraft Fabric", "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar", "author": "fabricmc.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, "setupInfo": { "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", @@ -1235,6 +1387,10 @@ "remark": "Minecraft Fabric", "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar", "author": "fabricmc.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, "setupInfo": { "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", @@ -1258,6 +1414,10 @@ "remark": "Minecraft Fabric", "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar", "author": "fabricmc.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, "setupInfo": { "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", @@ -1281,6 +1441,10 @@ "remark": "Minecraft Fabric", "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar", "author": "fabricmc.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, "setupInfo": { "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", @@ -1304,6 +1468,10 @@ "remark": "Minecraft Fabric", "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar", "author": "fabricmc.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, "setupInfo": { "type": "minecraft/java/fabric", "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", @@ -1327,6 +1495,10 @@ "remark": "Minecraft Java", "targetLink": "https://piston-data.mojang.com/v1/objects/64bb6d763bed0a9f1d632ec347938594144943ed/server.jar", "author": "Mojang Studios", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, "setupInfo": { "type": "minecraft/java", "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", @@ -1350,6 +1522,10 @@ "remark": "Minecraft Java", "targetLink": "https://piston-data.mojang.com/v1/objects/95495a7f485eedd84ce928cef5e223b757d2f764/server.jar", "author": "Mojang Studios", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, "setupInfo": { "type": "minecraft/java", "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", @@ -1373,6 +1549,10 @@ "remark": "Minecraft Java", "targetLink": "https://piston-data.mojang.com/v1/objects/6bce4ef400e4efaa63a13d5e6f6b500be969ef81/server.jar", "author": "Mojang Studios", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, "setupInfo": { "type": "minecraft/java", "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", @@ -1396,6 +1576,10 @@ "remark": "Minecraft Java", "targetLink": "https://piston-data.mojang.com/v1/objects/4707d00eb834b446575d89a61a11b5d548d8c001/server.jar", "author": "Mojang Studios", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, "setupInfo": { "type": "minecraft/java", "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", @@ -2076,6 +2260,10 @@ "remark": "Minecraft Folia", "targetLink": "https://fill-data.papermc.io/v1/objects/f4e9c5c374a53d17b6173cac35242c05c12217b656b6cc5dc07354cc37ec4066/folia-1.21.11-11.jar", "author": "papermc.io", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, "setupInfo": { "type": "minecraft/java/folia", "startCommand": "java -Xms4096M -Xmx4096M -XX:+AlwaysPreTouch -XX:+DisableExplicitGC -XX:+ParallelRefProcEnabled -XX:+PerfDisableSharedMem -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1HeapRegionSize=8M -XX:G1HeapWastePercent=5 -XX:G1MaxNewSizePercent=40 -XX:G1MixedGCCountTarget=4 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1NewSizePercent=30 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:G1ReservePercent=20 -XX:InitiatingHeapOccupancyPercent=15 -XX:MaxGCPauseMillis=200 -XX:MaxTenuringThreshold=1 -XX:SurvivorRatio=32 -jar folia-1.21.11-11.jar nogui", @@ -2099,6 +2287,10 @@ "remark": "Minecraft Folia", "targetLink": "https://fill-data.papermc.io/v1/objects/233843cfd5001b6f658fcab549178d694cc37f0277d004ea295de0a94c57278f/folia-1.21.8-6.jar", "author": "papermc.io", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, "setupInfo": { "type": "minecraft/java/folia", "startCommand": "java -Xms4096M -Xmx4096M -XX:+AlwaysPreTouch -XX:+DisableExplicitGC -XX:+ParallelRefProcEnabled -XX:+PerfDisableSharedMem -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1HeapRegionSize=8M -XX:G1HeapWastePercent=5 -XX:G1MaxNewSizePercent=40 -XX:G1MixedGCCountTarget=4 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1NewSizePercent=30 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:G1ReservePercent=20 -XX:InitiatingHeapOccupancyPercent=15 -XX:MaxGCPauseMillis=200 -XX:MaxTenuringThreshold=1 -XX:SurvivorRatio=32 -jar folia-1.21.8-6.jar nogui", @@ -2109,4 +2301,4 @@ } } ] -} +} \ No newline at end of file From c4c93567b9a3f79a17df911b1003745aa1e4e2f2 Mon Sep 17 00:00:00 2001 From: yumao233 Date: Mon, 9 Mar 2026 20:21:35 +0800 Subject: [PATCH 335/338] Add new Minecraft server configurations to market-v2.json, including EndStone MC Server and multiple PaperMC versions (1.21.1, 1.21.4, 1.21.8, 1.21.10, 1.21.11) with updated setup information and Docker support. --- market-v2.json | 1123 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 1122 insertions(+), 1 deletion(-) diff --git a/market-v2.json b/market-v2.json index f2780d7..10900d1 100644 --- a/market-v2.json +++ b/market-v2.json @@ -488,6 +488,1127 @@ "extraVolumes": [] } } + }, + { + "title": "EndStone MC Server", + "language": "en_us", + "platform": "Linux", + "description": "For Linux, using the official EndStone MC Docker image, one-click to quickly set up the server!", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/endstone_mc.webp", + "gameType": "Minecraft", + "category": "Latest Version", + "runtime": "Ubuntu/Centos LTS", + "hardware": "RAM 2G+", + "size": "", + "targetLink": "", + "author": "EndStone", + "tags": [ + "Docker version" + ], + "setupInfo": { + "startCommand": "endstone -y -s .", + "stopCommand": "stop", + "ie": "utf8", + "oe": "utf8", + "type": "minecraft/bedrock", + "tag": [ + "bedrock" + ], + "fileCode": "utf8", + "processType": "docker", + "updateCommand": "", + "docker": { + "image": "endstone/endstone:latest", + "containerName": "endstone-server", + "ports": [ + "{mcsm_port1}:19132/udp" + ], + "extraVolumes": [], + "workingDir": "", + "env": [], + "changeWorkdir": true + } + } + }, + { + "platform": "ALL", + "language": "en_us", + "gameType": "Minecraft", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "description": "Minecraft 1.21.11 Paper Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support", + "title": "[PaperMC] Minecraft 1.21.11", + "category": "mc-paper", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "100MB", + "remark": "Minecraft Paper", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.11/builds/39/downloads/paper-1.21.11-39.jar", + "author": "papermc.io", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, + "setupInfo": { + "type": "minecraft/java/paper", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.11-39.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "ALL", + "language": "en_us", + "gameType": "Minecraft", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "description": "Minecraft 1.21.10 Paper Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support", + "title": "[PaperMC] Minecraft 1.21.10", + "category": "mc-paper", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "100MB", + "remark": "Minecraft Paper", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.10/builds/117/downloads/paper-1.21.10-117.jar", + "author": "papermc.io", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, + "setupInfo": { + "type": "minecraft/java/paper", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.10-117.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "ALL", + "language": "en_us", + "gameType": "Minecraft", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "description": "Minecraft 1.21.8 Paper Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support", + "title": "[PaperMC] Minecraft 1.21.8", + "category": "mc-paper", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "100MB", + "remark": "Minecraft Paper", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.8/builds/60/downloads/paper-1.21.8-60.jar", + "author": "papermc.io", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, + "setupInfo": { + "type": "minecraft/java/paper", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.8-60.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "ALL", + "language": "en_us", + "gameType": "Minecraft", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "description": "Minecraft 1.21.4 Paper Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support", + "title": "[PaperMC] Minecraft 1.21.4", + "category": "mc-paper", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "50MB", + "remark": "Minecraft Paper", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/232/downloads/paper-1.21.4-232.jar", + "author": "papermc.io", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, + "setupInfo": { + "type": "minecraft/java/paper", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.4-232.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "ALL", + "language": "en_us", + "gameType": "Minecraft", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "description": "Minecraft 1.21.1 Paper Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support", + "title": "[PaperMC] Minecraft 1.21.1", + "category": "mc-paper", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "100MB", + "remark": "Minecraft Paper", + "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.1/builds/133/downloads/paper-1.21.1-133.jar", + "author": "papermc.io", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, + "setupInfo": { + "type": "minecraft/java/paper", + "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.1-133.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "ALL", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "gameType": "Minecraft", + "description": "Minecraft 1.21.11 Purpur Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support", + "title": "[PurpurMC] Minecraft 1.21.11", + "category": "mc-purpur", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "55MB", + "remark": "Minecraft Purpur", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.11-2538.jar", + "author": "purpurmc.org", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, + "setupInfo": { + "type": "minecraft/java/purpur", + "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.11-2538.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "ALL", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "gameType": "Minecraft", + "description": "Minecraft 1.21.10 Purpur Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support", + "title": "[PurpurMC] Minecraft 1.21.10", + "category": "mc-purpur", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "55MB", + "remark": "Minecraft Purpur", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.10-2535.jar", + "author": "purpurmc.org", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, + "setupInfo": { + "type": "minecraft/java/purpur", + "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.10-2535.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "ALL", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "gameType": "Minecraft", + "description": "Minecraft 1.21.8 Purpur Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support", + "title": "[PurpurMC] Minecraft 1.21.8", + "category": "mc-purpur", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "55MB", + "remark": "Minecraft Purpur", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.8-2497.jar", + "author": "purpurmc.org", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, + "setupInfo": { + "type": "minecraft/java/purpur", + "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.8-2497.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "ALL", + "language": "en_us", + "gameType": "Minecraft", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "description": "Minecraft 1.21.4 Purpur Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support", + "title": "[PurpurMC] Minecraft 1.21.4", + "category": "mc-purpur", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "50MB", + "remark": "Only Purpur included", + "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.4-2416.jar", + "author": "purpurmc.org", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, + "setupInfo": { + "type": "minecraft/java/purpur", + "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.4-2416.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "Linux", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp", + "gameType": "Minecraft", + "description": "Minecraft 1.21.11 Forge Quick Server Setup, Mod Support for Linux", + "title": "[Forge] Minecraft 1.21.11", + "category": "mc-forge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.11-61.0.3/forge-1.21.11-61.0.3-installer.jar", + "author": "minecraftforge.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.21.11-61.0.3-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "Windows", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp", + "gameType": "Minecraft", + "description": "Minecraft 1.21.11 Forge Quick Server Setup, Mod Support for Windows", + "title": "[Forge] Minecraft 1.21.11", + "category": "mc-forge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.11-61.0.3/forge-1.21.11-61.0.3-installer.jar", + "author": "minecraftforge.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": ".\\run.bat", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.21.11-61.0.3-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "Linux", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp", + "gameType": "Minecraft", + "description": "Minecraft 1.21.10 Forge Quick Server Setup, Mod Support for Linux", + "title": "[Forge] Minecraft 1.21.10", + "category": "mc-forge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.10-60.1.5/forge-1.21.10-60.1.5-installer.jar", + "author": "minecraftforge.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.21.10-60.1.5-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "Windows", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp", + "gameType": "Minecraft", + "description": "Minecraft 1.21.10 Forge Quick Server Setup, Mod Support for Windows", + "title": "[Forge] Minecraft 1.21.10", + "category": "mc-forge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.10-60.1.5/forge-1.21.10-60.1.5-installer.jar", + "author": "minecraftforge.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": ".\\run.bat", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.21.10-60.1.5-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "Linux", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp", + "gameType": "Minecraft", + "description": "Minecraft 1.21.8 Forge Quick Server Setup, Mod Support for Linux", + "title": "[Forge] Minecraft 1.21.8", + "category": "mc-forge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.8-58.1.9/forge-1.21.8-58.1.9-installer.jar", + "author": "minecraftforge.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.21.8-58.1.9-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "Windows", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp", + "gameType": "Minecraft", + "description": "Minecraft 1.21.8 Forge Quick Server Setup, Mod Support for Windows", + "title": "[Forge] Minecraft 1.21.8", + "category": "mc-forge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.8-58.1.9/forge-1.21.8-58.1.9-installer.jar", + "author": "minecraftforge.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": ".\\run.bat", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.21.8-58.1.9-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "Linux", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp", + "gameType": "Minecraft", + "description": "Minecraft 1.21.4 Forge Quick Server Setup, Mod Support for Linux", + "title": "[Forge] Minecraft 1.21.4", + "category": "mc-forge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.4-54.1.8/forge-1.21.4-54.1.8-installer.jar", + "author": "minecraftforge.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.21.4-54.1.8-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "Windows", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp", + "gameType": "Minecraft", + "description": "Minecraft 1.21.4 Forge Quick Server Setup, Mod Support for Windows", + "title": "[Forge] Minecraft 1.21.4", + "category": "mc-forge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.4-54.1.8/forge-1.21.4-54.1.8-installer.jar", + "author": "minecraftforge.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": ".\\run.bat", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.21.4-54.1.8-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "Linux", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp", + "gameType": "Minecraft", + "description": "Minecraft 1.21.1 Forge Quick Server Setup, Mod Support for Linux", + "title": "[Forge] Minecraft 1.21.1", + "category": "mc-forge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.1-52.1.6/forge-1.21.1-52.1.6-installer.jar", + "author": "minecraftforge.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.21.1-52.1.6-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "Windows", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp", + "gameType": "Minecraft", + "description": "Minecraft 1.21.1 Forge Quick Server Setup, Mod Support for Windows", + "title": "[Forge] Minecraft 1.21.1", + "category": "mc-forge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft Forge", + "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.1-52.1.6/forge-1.21.1-52.1.6-installer.jar", + "author": "minecraftforge.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, + "setupInfo": { + "type": "minecraft/java/forge", + "startCommand": ".\\run.bat", + "stopCommand": "stop", + "updateCommand": "java -jar forge-1.21.1-52.1.6-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "Linux", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "gameType": "Minecraft", + "description": "Minecraft 1.21.11 NeoForge Quick Server Setup, Mod Support for Linux", + "title": "[NeoForge] Minecraft 1.21.11", + "category": "mc-neoforge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft NeoForge", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.11.8-beta/neoforge-21.11.8-beta-installer.jar", + "author": "neoforged.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, + "setupInfo": { + "type": "minecraft/java/neoforge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar neoforge-21.11.8-beta-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "Windows", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "gameType": "Minecraft", + "description": "Minecraft 1.21.11 NeoForge Quick Server Setup, Mod Support for Windows", + "title": "[NeoForge] Minecraft 1.21.11", + "category": "mc-neoforge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft NeoForge", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.11.8-beta/neoforge-21.11.8-beta-installer.jar", + "author": "neoforged.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, + "setupInfo": { + "type": "minecraft/java/neoforge", + "startCommand": ".\\run.bat", + "stopCommand": "stop", + "updateCommand": "java -jar neoforge-21.11.8-beta-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "Linux", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "gameType": "Minecraft", + "description": "Minecraft 1.21.10 NeoForge Quick Server Setup, Mod Support for Linux", + "title": "[NeoForge] Minecraft 1.21.10", + "category": "mc-neoforge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft NeoForge", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.10.63/neoforge-21.10.63-installer.jar", + "author": "neoforged.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, + "setupInfo": { + "type": "minecraft/java/neoforge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar neoforge-21.10.63-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "Windows", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "gameType": "Minecraft", + "description": "Minecraft 1.21.10 NeoForge Quick Server Setup, Mod Support for Windows", + "title": "[NeoForge] Minecraft 1.21.10", + "category": "mc-neoforge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft NeoForge", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.10.63/neoforge-21.10.63-installer.jar", + "author": "neoforged.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, + "setupInfo": { + "type": "minecraft/java/neoforge", + "startCommand": ".\\run.bat", + "stopCommand": "stop", + "updateCommand": "java -jar neoforge-21.10.63-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "Linux", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "gameType": "Minecraft", + "description": "Minecraft 1.21.8 NeoForge Quick Server Setup, Mod Support for Linux", + "title": "[NeoForge] Minecraft 1.21.8", + "category": "mc-neoforge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft NeoForge", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.8.52/neoforge-21.8.52-installer.jar", + "author": "neoforged.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, + "setupInfo": { + "type": "minecraft/java/neoforge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar neoforge-21.8.52-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "Windows", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "gameType": "Minecraft", + "description": "Minecraft 1.21.8 NeoForge Quick Server Setup, Mod Support for Windows", + "title": "[NeoForge] Minecraft 1.21.8", + "category": "mc-neoforge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft NeoForge", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.8.52/neoforge-21.8.52-installer.jar", + "author": "neoforged.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, + "setupInfo": { + "type": "minecraft/java/neoforge", + "startCommand": ".\\run.bat", + "stopCommand": "stop", + "updateCommand": "java -jar neoforge-21.8.52-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "Linux", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "gameType": "Minecraft", + "description": "Minecraft 1.21.4 NeoForge Quick Server Setup, Mod Support for Linux", + "title": "[NeoForge] Minecraft 1.21.4", + "category": "mc-neoforge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft NeoForge", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.4.155/neoforge-21.4.155-installer.jar", + "author": "neoforged.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, + "setupInfo": { + "type": "minecraft/java/neoforge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar neoforge-21.4.155-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "Windows", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "gameType": "Minecraft", + "description": "Minecraft 1.21.4 NeoForge Quick Server Setup, Mod Support for Windows", + "title": "[NeoForge] Minecraft 1.21.4", + "category": "mc-neoforge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft NeoForge", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.4.155/neoforge-21.4.155-installer.jar", + "author": "neoforged.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, + "setupInfo": { + "type": "minecraft/java/neoforge", + "startCommand": ".\\run.bat", + "stopCommand": "stop", + "updateCommand": "java -jar neoforge-21.4.155-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "Linux", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "gameType": "Minecraft", + "description": "Minecraft 1.21.1 NeoForge Quick Server Setup, Mod Support for Linux", + "title": "[NeoForge] Minecraft 1.21.1", + "category": "mc-neoforge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft NeoForge", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.1.213/neoforge-21.1.213-installer.jar", + "author": "neoforged.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, + "setupInfo": { + "type": "minecraft/java/neoforge", + "startCommand": "sh ./run.sh", + "stopCommand": "stop", + "updateCommand": "java -jar neoforge-21.1.213-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "Windows", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "gameType": "Minecraft", + "description": "Minecraft 1.21.1 NeoForge Quick Server Setup, Mod Support for Windows", + "title": "[NeoForge] Minecraft 1.21.1", + "category": "mc-neoforge", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "7MB", + "remark": "Minecraft NeoForge", + "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.1.213/neoforge-21.1.213-installer.jar", + "author": "neoforged.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, + "setupInfo": { + "type": "minecraft/java/neoforge", + "startCommand": ".\\run.bat", + "stopCommand": "stop", + "updateCommand": "java -jar neoforge-21.1.213-installer.jar --installServer", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "ALL", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "gameType": "Minecraft", + "description": "Minecraft 1.21.11 Fabric Quick Server Setup, Mod Support", + "title": "[FabricMC] Minecraft 1.21.11", + "category": "mc-fabric", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "5MB", + "remark": "Minecraft Fabric", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar", + "author": "fabricmc.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, + "setupInfo": { + "type": "minecraft/java/fabric", + "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", + "stopCommand": "stop", + "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.21.11 -downloadMinecraft -noprofile", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "ALL", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "gameType": "Minecraft", + "description": "Minecraft 1.21.10 Fabric Quick Server Setup, Mod Support", + "title": "[FabricMC] Minecraft 1.21.10", + "category": "mc-fabric", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "5MB", + "remark": "Minecraft Fabric", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar", + "author": "fabricmc.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, + "setupInfo": { + "type": "minecraft/java/fabric", + "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", + "stopCommand": "stop", + "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.21.10 -downloadMinecraft -noprofile", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "ALL", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "gameType": "Minecraft", + "description": "Minecraft 1.21.8 Fabric Quick Server Setup, Mod Support", + "title": "[FabricMC] Minecraft 1.21.8", + "category": "mc-fabric", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "5MB", + "remark": "Minecraft Fabric", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar", + "author": "fabricmc.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, + "setupInfo": { + "type": "minecraft/java/fabric", + "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", + "stopCommand": "stop", + "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.21.8 -downloadMinecraft -noprofile", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "ALL", + "language": "en_us", + "gameType": "Minecraft", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "description": "Minecraft 1.21.4 Fabric Quick Server Setup, Mod Support", + "title": "[FabricMC] Minecraft 1.21.4", + "category": "mc-fabric", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "5MB", + "remark": "Minecraft Fabric", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar", + "author": "fabricmc.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, + "setupInfo": { + "type": "minecraft/java/fabric", + "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", + "stopCommand": "stop", + "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.21.4 -downloadMinecraft -noprofile", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "ALL", + "language": "en_us", + "gameType": "Minecraft", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "description": "Minecraft 1.21.1 Fabric Quick Server Setup, Mod Support", + "title": "[FabricMC] Minecraft 1.21.1", + "category": "mc-fabric", + "runtime": "Java 21+", + "hardware": "RAM 8G+", + "size": "5MB", + "remark": "Minecraft Fabric", + "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar", + "author": "fabricmc.net", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, + "setupInfo": { + "type": "minecraft/java/fabric", + "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui", + "stopCommand": "stop", + "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.21.1 -downloadMinecraft -noprofile", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "ALL", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "gameType": "Minecraft", + "description": "Standard Vanilla Minecraft 1.21.11 Server Setup (Official) - No Mod/Plugin Support", + "title": "[Vanilla] Minecraft 1.21.11", + "category": "mc-vanilla", + "runtime": "Java 21+", + "hardware": "RAM 2G+", + "size": "55MB", + "remark": "Minecraft Java", + "targetLink": "https://piston-data.mojang.com/v1/objects/64bb6d763bed0a9f1d632ec347938594144943ed/server.jar", + "author": "Mojang Studios", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "ALL", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "gameType": "Minecraft", + "description": "Standard Vanilla Minecraft 1.21.10 Server Setup (Official) - No Mod/Plugin Support", + "title": "[Vanilla] Minecraft 1.21.10", + "category": "mc-vanilla", + "runtime": "Java 21+", + "hardware": "RAM 2G+", + "size": "55MB", + "remark": "Minecraft Java", + "targetLink": "https://piston-data.mojang.com/v1/objects/95495a7f485eedd84ce928cef5e223b757d2f764/server.jar", + "author": "Mojang Studios", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "ALL", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "gameType": "Minecraft", + "description": "Standard Vanilla Minecraft 1.21.8 Server Setup (Official) - No Mod/Plugin Support", + "title": "[Vanilla] Minecraft 1.21.8", + "category": "mc-vanilla", + "runtime": "Java 21+", + "hardware": "RAM 2G+", + "size": "55MB", + "remark": "Minecraft Java", + "targetLink": "https://piston-data.mojang.com/v1/objects/6bce4ef400e4efaa63a13d5e6f6b500be969ef81/server.jar", + "author": "Mojang Studios", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "ALL", + "language": "en_us", + "gameType": "Minecraft", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "description": "Standard Vanilla Minecraft 1.21.4 Server Setup (Official) - No Mod/Plugin Support", + "title": "[Vanilla] Minecraft 1.21.4", + "category": "mc-vanilla", + "runtime": "Java 21+", + "hardware": "RAM 2G+", + "size": "55MB", + "remark": "Minecraft Java", + "targetLink": "https://piston-data.mojang.com/v1/objects/4707d00eb834b446575d89a61a11b5d548d8c001/server.jar", + "author": "Mojang Studios", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, + "setupInfo": { + "type": "minecraft/java", + "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "ALL", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "gameType": "Minecraft", + "description": "Minecraft 1.21.11 Folia Quick Server Setup, Plugin Support", + "title": "[Folia] Minecraft 1.21.11", + "category": "mc-folia", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Minecraft Folia", + "targetLink": "https://fill-data.papermc.io/v1/objects/f4e9c5c374a53d17b6173cac35242c05c12217b656b6cc5dc07354cc37ec4066/folia-1.21.11-11.jar", + "author": "papermc.io", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, + "setupInfo": { + "type": "minecraft/java/folia", + "startCommand": "java -Xms4096M -Xmx4096M -XX:+AlwaysPreTouch -XX:+DisableExplicitGC -XX:+ParallelRefProcEnabled -XX:+PerfDisableSharedMem -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1HeapRegionSize=8M -XX:G1HeapWastePercent=5 -XX:G1MaxNewSizePercent=40 -XX:G1MixedGCCountTarget=4 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1NewSizePercent=30 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:G1ReservePercent=20 -XX:InitiatingHeapOccupancyPercent=15 -XX:MaxGCPauseMillis=200 -XX:MaxTenuringThreshold=1 -XX:SurvivorRatio=32 -jar folia-1.21.11-11.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } + }, + { + "platform": "ALL", + "language": "en_us", + "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp", + "gameType": "Minecraft", + "description": "Minecraft 1.21.8 Folia Quick Server Setup, Plugin Support", + "title": "[Folia] Minecraft 1.21.8", + "category": "mc-folia", + "runtime": "Java 21+", + "hardware": "RAM 4G+", + "size": "50MB", + "remark": "Minecraft Folia", + "targetLink": "https://fill-data.papermc.io/v1/objects/233843cfd5001b6f658fcab549178d694cc37f0277d004ea295de0a94c57278f/folia-1.21.8-6.jar", + "author": "papermc.io", + "dockerOptional": { + "image": "eclipse-temurin:21-jdk", + "updateCommandImage": "eclipse-temurin:21-jdk" + }, + "setupInfo": { + "type": "minecraft/java/folia", + "startCommand": "java -Xms4096M -Xmx4096M -XX:+AlwaysPreTouch -XX:+DisableExplicitGC -XX:+ParallelRefProcEnabled -XX:+PerfDisableSharedMem -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1HeapRegionSize=8M -XX:G1HeapWastePercent=5 -XX:G1MaxNewSizePercent=40 -XX:G1MixedGCCountTarget=4 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1NewSizePercent=30 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:G1ReservePercent=20 -XX:InitiatingHeapOccupancyPercent=15 -XX:MaxGCPauseMillis=200 -XX:MaxTenuringThreshold=1 -XX:SurvivorRatio=32 -jar folia-1.21.8-6.jar nogui", + "stopCommand": "stop", + "updateCommand": "", + "ie": "utf-8", + "oe": "utf-8" + } } ] -} \ No newline at end of file +} From 68d98bb33c13f90bbe90127edc284c151b4c2919 Mon Sep 17 00:00:00 2001 From: KatyushaScarlet Date: Sat, 14 Mar 2026 19:57:46 +0800 Subject: [PATCH 336/338] feat: add loong64 support --- setup.sh | 8 ++++++++ setup_cn.sh | 8 ++++++++ setup_cn_test.sh | 8 ++++++++ 3 files changed, 24 insertions(+) diff --git a/setup.sh b/setup.sh index 60897e2..d75b71c 100644 --- a/setup.sh +++ b/setup.sh @@ -31,6 +31,9 @@ node_version_centos7="v16.20.2" # Node download base URL - primary node_download_url_base="https://nodejs.org/dist/" +# Unoffical build of Node.js, for more ISA support +node_unoffical_build_url="https://unofficial-builds.nodejs.org/download/release/" + # Node download URL - fallback. # This is the URL points directly to the file, not the base. This can also be a local absolute path. # Only supports https:// or http:// for web locations. @@ -668,6 +671,11 @@ resolve_node_arch() { armv7l) node_arch="armv7l" ;; + loongarch64) + node_arch="loong64" + # Use unoffical build + node_download_url_base=$node_unoffical_build_url + ;; *) cprint red bold "Unsupported architecture for Node.js: $arch" return 1 diff --git a/setup_cn.sh b/setup_cn.sh index e47d0e0..7450d9b 100644 --- a/setup_cn.sh +++ b/setup_cn.sh @@ -31,6 +31,9 @@ node_version_centos7="v16.20.2" # Node download base URL - primary node_download_url_base="https://nodejs.org/dist/" +# Unoffical build of Node.js, for more ISA support +node_unoffical_build_url="https://unofficial-builds.nodejs.org/download/release/" + # Node download URL - fallback. # This is the URL points directly to the file, not the base. This can also be a local absolute path. # Only supports https:// or http:// for web locations. @@ -665,6 +668,11 @@ resolve_node_arch() { armv7l) node_arch="armv7l" ;; + loongarch64) + node_arch="loong64" + # Use unoffical build + node_download_url_base=$node_unoffical_build_url + ;; *) cprint red bold "Node.js不支持的架构: $arch" return 1 diff --git a/setup_cn_test.sh b/setup_cn_test.sh index 276e760..ffbf7f0 100644 --- a/setup_cn_test.sh +++ b/setup_cn_test.sh @@ -30,6 +30,9 @@ node_version="v20.12.2" # Node download base URL - primary node_download_url_base="https://nodejs.org/dist/" +# Unoffical build of Node.js, for more ISA support +node_unoffical_build_url="https://unofficial-builds.nodejs.org/download/release/" + # Node download URL - fallback. # This is the URL points directly to the file, not the base. This can also be a local absolute path. # Only supports https:// or http:// for web locations. @@ -654,6 +657,11 @@ resolve_node_arch() { armv7l) node_arch="armv7l" ;; + loongarch64) + node_arch="loong64" + # Use unoffical build + node_download_url_base=$node_unoffical_build_url + ;; *) cprint red bold "Node.js不支持的架构: $arch" return 1 From dec69590ef40c5f2fe355ffe35483d100878a4ee Mon Sep 17 00:00:00 2001 From: xkmxz Date: Tue, 17 Mar 2026 17:57:30 +0800 Subject: [PATCH 337/338] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=B9=B8=E7=A6=8F?= =?UTF-8?q?=E5=B7=A5=E5=8E=82=E7=AB=AF=E5=8F=A3=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- market-v2.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/market-v2.json b/market-v2.json index 10900d1..23c5448 100644 --- a/market-v2.json +++ b/market-v2.json @@ -343,8 +343,8 @@ "updateCommandImage": "githubyumao/steam-game-runtime:latest", "ports": [ "{mcsm_port1}:7777/udp", - "{mcsm_port2}:15000/udp", - "{mcsm_port3}:15777/udp" + "{mcsm_port2}:7777/udp", + "{mcsm_port3}:8888/udp" ], "changeWorkdir": true, "workingDir": "/data", From fac962c0afcdf9b44481e197ce142e671f9e3d87 Mon Sep 17 00:00:00 2001 From: xkmxz Date: Wed, 18 Mar 2026 10:55:04 +0800 Subject: [PATCH 338/338] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=B9=B8=E7=A6=8F?= =?UTF-8?q?=E5=B7=A5=E5=8E=82=E7=AB=AF=E5=8F=A3=E8=AE=BE=E7=BD=AE-1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- market-v2.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/market-v2.json b/market-v2.json index 23c5448..33c22a6 100644 --- a/market-v2.json +++ b/market-v2.json @@ -342,9 +342,9 @@ "image": "githubyumao/steam-game-runtime:latest", "updateCommandImage": "githubyumao/steam-game-runtime:latest", "ports": [ - "{mcsm_port1}:7777/udp", + "{mcsm_port1}:7777/tcp", "{mcsm_port2}:7777/udp", - "{mcsm_port3}:8888/udp" + "{mcsm_port3}:8888/tcp" ], "changeWorkdir": true, "workingDir": "/data",