2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 07:57:21 +08:00

feat: 部分软件增加安装校验

This commit is contained in:
耗子
2024-06-28 16:41:57 +08:00
parent 5f85e7fbe0
commit 32fb87243b
9 changed files with 42 additions and 2 deletions

View File

@@ -151,14 +151,14 @@ Prepare_System() {
# Rocky Linux
/usr/bin/crb enable
dnf makecache -y
dnf install -y bash curl wget zip unzip tar p7zip p7zip-plugins git jq git-core dos2unix rsyslog
dnf install -y bash curl wget zip unzip tar p7zip p7zip-plugins git jq git-core dos2unix rsyslog make
elif [ "${OS}" == "debian" ]; then
if ${inChina}; then
sed -i 's/deb.debian.org/mirrors.tencent.com/g' /etc/apt/sources.list
sed -i 's/security.debian.org/mirrors.tencent.com/g' /etc/apt/sources.list
fi
apt-get update -y
apt-get install -y bash curl wget zip unzip tar p7zip p7zip-full git jq git dos2unix rsyslog
apt-get install -y bash curl wget zip unzip tar p7zip p7zip-full git jq git dos2unix rsyslog make
fi
if [ "$?" != "0" ]; then
echo -e $HR

View File

@@ -59,6 +59,11 @@ else
echo "错误:耗子面板不支持该系统"
exit 1
fi
if [ "$?" != "0" ]; then
echo -e $HR
echo "错误:安装依赖软件失败,请截图错误信息寻求帮助。"
exit 1
fi
mysqlUserCheck=$(cat /etc/passwd | grep mysql)
if [ "${mysqlUserCheck}" == "" ]; then

View File

@@ -42,6 +42,11 @@ else
echo "错误:耗子面板不支持该系统"
exit 1
fi
if [ "$?" != "0" ]; then
echo -e $HR
echo "错误:安装依赖软件失败,请截图错误信息寻求帮助。"
exit 1
fi
# 准备目录
rm -rf ${openrestyPath}

View File

@@ -53,6 +53,11 @@ else
echo "错误:耗子面板不支持该系统"
exit 1
fi
if [ "$?" != "0" ]; then
echo -e $HR
echo "错误:安装依赖软件失败,请截图错误信息寻求帮助。"
exit 1
fi
# 准备安装目录
rm -rf ${phpPath}

View File

@@ -53,6 +53,11 @@ else
echo "错误:耗子面板不支持该系统"
exit 1
fi
if [ "$?" != "0" ]; then
echo -e $HR
echo "错误:安装依赖软件失败,请截图错误信息寻求帮助。"
exit 1
fi
postgresqlUserCheck=$(cat /etc/passwd | grep postgres)
if [ "${postgresqlUserCheck}" == "" ]; then

View File

@@ -45,6 +45,11 @@ else
echo "错误:耗子面板不支持该系统"
exit 1
fi
if [ "$?" != "0" ]; then
echo -e $HR
echo "错误:安装依赖软件失败,请截图错误信息寻求帮助。"
exit 1
fi
# 准备目录
rm -rf ${redisPath}

View File

@@ -30,6 +30,11 @@ else
echo "错误:不支持的操作系统"
exit 1
fi
if [ "$?" != "0" ]; then
echo -e $HR
echo "错误:安装软件失败,请截图错误信息寻求帮助。"
exit 1
fi
# 写入配置
cat > /etc/rsyncd.conf << EOF

View File

@@ -30,5 +30,10 @@ else
echo "错误:不支持的操作系统"
exit 1
fi
if [ "$?" != "0" ]; then
echo -e $HR
echo "错误:安装软件失败,请截图错误信息寻求帮助。"
exit 1
fi
panel writePlugin s3fs 1.9

View File

@@ -35,5 +35,10 @@ else
echo "错误:不支持的操作系统"
exit 1
fi
if [ "$?" != "0" ]; then
echo -e $HR
echo "错误:安装软件失败,请截图错误信息寻求帮助。"
exit 1
fi
panel writePlugin supervisor 4.2.5