From ef5e567519eea5f06efb395927225a64af942aa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=8C=E6=A3=AE?= Date: Tue, 13 Aug 2024 18:24:32 +0800 Subject: [PATCH] =?UTF-8?q?=E7=88=B1=E5=BD=B1CMS=20=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 萌森 --- apps/iycms/3.3.44/scripts/init.sh | 11 ++++++++++- apps/iycms/3.3.44/scripts/upgrade.sh | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/apps/iycms/3.3.44/scripts/init.sh b/apps/iycms/3.3.44/scripts/init.sh index 73da5365..930b83d7 100644 --- a/apps/iycms/3.3.44/scripts/init.sh +++ b/apps/iycms/3.3.44/scripts/init.sh @@ -9,7 +9,16 @@ if [ -f .env ]; then echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env if [ ! -d "$IYCMS_ROOT_PATH/config" ]; then - cp -r ./config "$IYCMS_ROOT_PATH/config" + mkdir -p "$IYCMS_ROOT_PATH/config" + fi + + if [ -d "$IYCMS_ROOT_PATH/config/config.conf" ]; then + rm -r "$IYCMS_ROOT_PATH/config/config.conf" + touch "$IYCMS_ROOT_PATH/config/config.conf" + elif [ ! -f "$IYCMS_ROOT_PATH/config/config.conf" ]; then + cp ./config/config.conf "$IYCMS_ROOT_PATH/config/config.conf" + else + echo "config.conf cp error." fi echo "Check Finish." diff --git a/apps/iycms/3.3.44/scripts/upgrade.sh b/apps/iycms/3.3.44/scripts/upgrade.sh index 73da5365..930b83d7 100644 --- a/apps/iycms/3.3.44/scripts/upgrade.sh +++ b/apps/iycms/3.3.44/scripts/upgrade.sh @@ -9,7 +9,16 @@ if [ -f .env ]; then echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env if [ ! -d "$IYCMS_ROOT_PATH/config" ]; then - cp -r ./config "$IYCMS_ROOT_PATH/config" + mkdir -p "$IYCMS_ROOT_PATH/config" + fi + + if [ -d "$IYCMS_ROOT_PATH/config/config.conf" ]; then + rm -r "$IYCMS_ROOT_PATH/config/config.conf" + touch "$IYCMS_ROOT_PATH/config/config.conf" + elif [ ! -f "$IYCMS_ROOT_PATH/config/config.conf" ]; then + cp ./config/config.conf "$IYCMS_ROOT_PATH/config/config.conf" + else + echo "config.conf cp error." fi echo "Check Finish."