chore(build): optimize build script

This commit is contained in:
wanghe-fit2cloud
2025-04-18 14:48:50 +08:00
parent 713202b6eb
commit 47a16bc9a9
2 changed files with 18 additions and 12 deletions

View File

@@ -9,22 +9,28 @@ if [ ! -f "1pctl" ]; then
wget https://github.com/1Panel-dev/installer/raw/main/1pctl
fi
if [ ! -f "1panel.service" ]; then
wget https://github.com/1Panel-dev/installer/raw/main/1panel.service
fi
if [ ! -f "install.sh" ]; then
wget https://github.com/1Panel-dev/installer/raw/main/install.sh
fi
if [ ! -f "GeoIP.mmdb" ]; then
wget https://resource.1panel.pro/geo/GeoIP.mmdb
if [ ! -d "initscript" ]; then
mkdir -p initscript && cd initscript
for file in 1panel.service 1paneld.init 1paneld.openrc 1paneld.procd; do
wget -q https://github.com/1Panel-dev/installer/raw/main/initscript/$file
done
cd ..
fi
if [ ! -f "lang.tar.gz" ]; then
wget https://resource.1panel.pro/language/lang.tar.gz
tar zxvf lang.tar.gz
rm -rf lang.tar.gz
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/main/lang/$lang.sh
done
cd ..
fi
if [ ! -f "GeoIP.mmdb" ]; then
wget https://resource.fit2cloud.com/1panel/package/geo/GeoIP.mmdb
fi
chmod 755 1pctl install.sh