Update wp.sh

This commit is contained in:
NewName
2024-08-17 08:32:14 +08:00
parent c010d1749c
commit 9775c2cf0e

9
wp.sh
View File

@@ -1,15 +1,6 @@
#!/bin/bash #!/bin/bash
# 一键部署WordPress脚本 # 一键部署WordPress脚本
# 检测操作系统类型
OS=$(lsb_release -si)
# 检查操作系统是否为 Debian 或 Ubuntu
if [[ "$OS" != "Debian" && "$OS" != "Ubuntu" ]]; then
echo -e "\033[31m该脚本仅支持在 Debian 或 Ubuntu 系统上运行。\033[0m"
exit 1
fi
# 检查是否已经安装 WordPress # 检查是否已经安装 WordPress
if [ -f "/var/www/html/wordpress/wp-config.php" ]; then if [ -f "/var/www/html/wordpress/wp-config.php" ]; then
echo -e "\033[32mWordPress 已经安装。\033[0m" echo -e "\033[32mWordPress 已经安装。\033[0m"