Initial YakPanel commit

This commit is contained in:
Niranjan
2026-04-07 02:30:14 +05:30
parent 38568a474b
commit 47e0977b72
3 changed files with 16 additions and 7 deletions

View File

@@ -9,7 +9,7 @@
# sudo -E bash install.sh
#
# Environment (optional):
# REPO_URL Git URL (default: https://source.yakpanel.com/admin/yakpanel-core)
# REPO_URL Git URL (default: public GitHub; set to source.yakpanel.com if anonymous clone works)
# YAKPANEL_BRANCH Branch/tag for shallow clone (default: default branch)
# GIT_REF Alias for YAKPANEL_BRANCH
# INSTALL_PATH Install dir (default: /www/server/YakPanel-server)
@@ -202,6 +202,7 @@ if [ -n "${YAKPANEL_SOURCE_DIR:-}" ]; then
else
TMP_DIR="$(mktemp -d)"
trap 'rm -rf "$TMP_DIR"' EXIT
export GIT_TERMINAL_PROMPT=0
CLONE_ARGS=(git clone --depth 1)
if [ -n "$YAKPANEL_BRANCH" ]; then
CLONE_ARGS+=(--branch "$YAKPANEL_BRANCH")
@@ -209,7 +210,9 @@ else
CLONE_ARGS+=("$REPO_URL" "$TMP_DIR/repo")
if ! "${CLONE_ARGS[@]}"; then
echo "Git clone failed. Check REPO_URL=$REPO_URL, DNS, and outbound HTTPS."
echo "Try public fallback: sudo -E env REPO_URL=https://github.com/YakPanel/YakPanel.git bash install.sh"
echo "If using source.yakpanel.com: enable anonymous Git read, or use a token URL, e.g."
echo " REPO_URL=https://USER:TOKEN@source.yakpanel.com/admin/yakpanel-core"
echo "Public tree: REPO_URL=https://github.com/YakPanel/YakPanel.git"
exit 1
fi
SRC_DIR="$(find_yakpanel_root_in_tree "$TMP_DIR/repo")"