forked from 1Panel-dev/1Panel
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.sh
More file actions
executable file
·45 lines (36 loc) · 1.25 KB
/
script.sh
File metadata and controls
executable file
·45 lines (36 loc) · 1.25 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
#!/bin/bash
set -e
command -v wget >/dev/null || {
echo "wget not found, please install it and try again."
exit 1
}
if [ ! -f "1pctl" ]; then
wget https://github.com/1Panel-dev/installer/raw/v2/1pctl
fi
if [ ! -f "install.sh" ]; then
wget https://github.com/1Panel-dev/installer/raw/v2/install.sh
fi
if [ ! -d "initscript" ]; then
wget https://github.com/1Panel-dev/installer/raw/v2/initscript/1panel-core.service
wget https://github.com/1Panel-dev/installer/raw/v2/initscript/1panel-agent.service
mkdir -p initscript && cd initscript
for file in 1panel-core.init 1panel-agent.init 1panel-core.openrc 1panel-agent.openrc 1panel-core.procd 1panel-agent.procd 1panel-core.service 1panel-agent.service; do
wget -q https://github.com/1Panel-dev/installer/raw/v2/initscript/$file
done
cd ..
fi
if [ ! -d "lang" ]; then
mkdir -p lang && cd lang
for lang in en fa pt-BR ru zh; do
wget -q https://github.com/1Panel-dev/installer/raw/v2/lang/$lang.sh
done
cd ..
fi
if [ ! -f "GeoIP.mmdb" ]; then
wget https://resource.fit2cloud.com/1panel/package/v2/geo/GeoIP.mmdb
fi
chmod 755 1pctl install.sh
# Make the AI tools installer available
if [ -f "$(dirname "$0")/install_ai_tools.sh" ]; then
chmod +x "$(dirname "$0")/install_ai_tools.sh"
fi