-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathinstall.sh
More file actions
61 lines (46 loc) · 1.57 KB
/
install.sh
File metadata and controls
61 lines (46 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash
set -e
APP_NAME="ov-panel"
INSTALL_DIR="/opt/$APP_NAME"
REPO_URL="https://github.com/primeZdev/ov-panel"
PYTHON="/usr/bin/python3"
GREEN="\033[0;32m"
YELLOW="\033[1;33m"
CYAN="\033[0;36m"
BLUE="\033[0;34m"
NC="\033[0m"
echo -e "${YELLOW}Updating system...${NC}"
apt update -y
apt install -y python3 python3-full python3-venv wget curl git
echo -e "${YELLOW}Installing uv...${NC}"
wget -qO- https://astral.sh/uv/uv/install.sh | sh
export PATH="$HOME/.local/bin:$PATH"
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
if ! command -v uv &> /dev/null; then
echo -e "${YELLOW}uv not found in PATH, trying alternative installation...${NC}"
curl -LsSf https://astral.sh/uv/install.sh | sh
export PATH="$HOME/.local/bin:$PATH"
fi
if [ ! -d "$INSTALL_DIR" ]; then
echo -e "${YELLOW}Downloading latest release...${NC}"
LATEST_URL=$(curl -s https://api.github.com/repos/primeZdev/ov-panel/releases/latest \
| grep "tarball_url" \
| cut -d '"' -f 4)
mkdir -p "$INSTALL_DIR"
cd /tmp
wget -O latest.tar.gz "$LATEST_URL"
echo -e "${YELLOW}Extracting...${NC}"
tar -xzf latest.tar.gz -C "$INSTALL_DIR" --strip-components=1
rm -f latest.tar.gz
else
echo -e "${GREEN}Directory exists, skipping download.${NC}"
fi
cd "$INSTALL_DIR"
echo -e "${YELLOW}Installing dependencies...${NC}"
uv sync
# Node.js
echo -e "${YELLOW}Installing NodeJS...${NC}"
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
apt install -y nodejs build-essential
echo -e "${YELLOW}Installing Python dependencies...${NC}"
uv run python installer.py