From 36e8fe8285c73494e0859be580ed73c36f85a226 Mon Sep 17 00:00:00 2001 From: Anye <53684988+Anyexyz@users.noreply.github.com> Date: Tue, 14 May 2024 17:59:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9PANEL=5FDB=5FTYPE=E7=9A=84?= =?UTF-8?q?=E5=80=BC=E4=BB=A5=E5=85=BC=E5=AE=B9pg=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=20(#1418)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/firefly-iii/6.1.15/scripts/init.sh | 11 +++++++++++ apps/firefly-iii/6.1.15/scripts/upgrade.sh | 11 +++++++++++ 2 files changed, 22 insertions(+) create mode 100644 apps/firefly-iii/6.1.15/scripts/init.sh create mode 100644 apps/firefly-iii/6.1.15/scripts/upgrade.sh diff --git a/apps/firefly-iii/6.1.15/scripts/init.sh b/apps/firefly-iii/6.1.15/scripts/init.sh new file mode 100644 index 00000000..0aacc7cc --- /dev/null +++ b/apps/firefly-iii/6.1.15/scripts/init.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +if [[ -f ./.env ]]; then + if grep -q 'PANEL_DB_TYPE="mysql"' ./.env; then + echo "PANEL_DB_TYPE 为 Mysql 数据库, 不作修改" + else + sed -i 's/PANEL_DB_TYPE="postgres"/PANEL_DB_HOST="pgsql"/g' ./.env + fi +else + echo ".env 文件不存在" +fi \ No newline at end of file diff --git a/apps/firefly-iii/6.1.15/scripts/upgrade.sh b/apps/firefly-iii/6.1.15/scripts/upgrade.sh new file mode 100644 index 00000000..0aacc7cc --- /dev/null +++ b/apps/firefly-iii/6.1.15/scripts/upgrade.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +if [[ -f ./.env ]]; then + if grep -q 'PANEL_DB_TYPE="mysql"' ./.env; then + echo "PANEL_DB_TYPE 为 Mysql 数据库, 不作修改" + else + sed -i 's/PANEL_DB_TYPE="postgres"/PANEL_DB_HOST="pgsql"/g' ./.env + fi +else + echo ".env 文件不存在" +fi \ No newline at end of file