Update wp.sh
This commit is contained in:
13
wp.sh
13
wp.sh
@@ -1,11 +1,16 @@
|
||||
#!/bin/bash
|
||||
# 一键部署WordPress脚本
|
||||
|
||||
if [[ "$OS" != "Debian" && "$OS" != "Ubuntu" ]]; thenecho -e "\033[31m该脚本仅支持在 Debian 或 Ubuntu 系统上运行。\033[0m"exit 1
|
||||
# 检查操作系统是否为 Debian 或 Ubuntu
|
||||
if [[ "$OS" != "Debian" && "$OS" != "Ubuntu" ]]; then
|
||||
echo -e "\033[31m该脚本仅支持在 Debian 或 Ubuntu 系统上运行。\033[0m"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 检查是否已经安装WordPress
|
||||
if [ -d "/var/www/html/wordpress/wp-config.php" ]; then
|
||||
echo -e "\033[32mWordPress 已经安装,跳过部署步骤,如需重新安装,请先删除/var/www/html/wordpress和备份相关数据\033[0m"
|
||||
# 检查是否已经安装 WordPress
|
||||
if [ -f "/var/www/html/wordpress/wp-config.php" ]; then
|
||||
echo -e "\033[32mWordPress 已经安装。\033[0m"
|
||||
echo -e "\033[33m如需重新安装,请先删除 /var/www/html/wordpress 并备份相关数据。\033[0m"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user