mirror of
https://github.com/QYG2297248353/appstore-1panel.git
synced 2024-12-03 12:52:45 +08:00
27bf3dd5fb
* chore(deps): update nocodb/nocodb docker tag to v0.255.2 * Update app version [skip ci] --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: github-action update-app-version <githubaction@githubaction.com>
22 lines
560 B
Bash
22 lines
560 B
Bash
#!/bin/bash
|
|
|
|
ENV_FILE=".env"
|
|
|
|
if [ -f "$ENV_FILE" ]; then
|
|
PANEL_DB_TYPE=$(grep '^PANEL_DB_TYPE=' "$ENV_FILE" | cut -d '=' -f 2 | tr -d '"')
|
|
|
|
if [ "$PANEL_DB_TYPE" == "postgresql" ]; then
|
|
NEW_DB_TYPE="pg"
|
|
elif [ "$PANEL_DB_TYPE" == "mysql" ] || [ "$PANEL_DB_TYPE" == "mariadb" ]; then
|
|
NEW_DB_TYPE="mysql2"
|
|
else
|
|
echo "Unsupported PANEL_DB_TYPE value: $PANEL_DB_TYPE"
|
|
exit 1
|
|
fi
|
|
|
|
sed -i "s/^PANEL_DB_TYPE=.*/PANEL_DB_TYPE=\"$NEW_DB_TYPE\"/" "$ENV_FILE"
|
|
|
|
else
|
|
echo ".env file not found!"
|
|
exit 1
|
|
fi |