Files
CyberPanel/upgrade_modules/04_git_url.sh
master3395 6d932c7d41 Modularize upgrade script: loader + upgrade_modules, keep monolithic backup
- cyberpanel_upgrade.sh is now a loader that sources upgrade_modules/*.sh
- When upgrade_modules/ is missing (e.g. one-liner), loader downloads modules from GitHub
- All modules kept under 500 lines for easier debugging
- cyberpanel_upgrade_monolithic.sh preserves full original script
- to-do/UPGRADE-MODULES-DESIGN.md documents module layout
2026-02-15 19:32:03 +01:00

28 lines
922 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env bash
# CyberPanel upgrade set Git content and clone URLs (usmannasir or override).
# Sourced by cyberpanel_upgrade.sh.
Pre_Upgrade_Setup_Git_URL() {
if [[ $Server_Country != "CN" ]] ; then
if [[ -n "$Git_User_Override" ]]; then
Git_User="$Git_User_Override"
echo -e "\nUsing GitHub repo: ${Git_User}/cyberpanel (same URL structure as usmannasir)\n"
else
Git_User="usmannasir"
fi
Git_Content_URL="https://raw.githubusercontent.com/${Git_User}/cyberpanel"
Git_Clone_URL="https://github.com/${Git_User}/cyberpanel.git"
else
if [[ -n "$Git_User_Override" ]]; then
Git_User="$Git_User_Override"
else
Git_User="qtwrk"
fi
Git_Content_URL="https://gitee.com/${Git_User}/cyberpanel/raw"
Git_Clone_URL="https://gitee.com/${Git_User}/cyberpanel.git"
fi
if [[ "$Debug" = "On" ]] ; then
Debug_Log "Git_URL" "$Git_Content_URL"
fi
}