修改PANEL_DB_TYPE的值以兼容pg数据库 (#1418)

This commit is contained in:
Anye 2024-05-14 17:59:00 +08:00 committed by GitHub
parent 1304c40bea
commit 36e8fe8285
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 22 additions and 0 deletions

View File

@ -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

View File

@ -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