Update import-db.sh
Browse files- import-db.sh +3 -3
import-db.sh
CHANGED
@@ -6,8 +6,8 @@ DB_NAME="$DB_POSTGRESDB_DATABASE"
|
|
6 |
DB_USER="$DB_POSTGRESDB_USER"
|
7 |
DB_PASS="$DB_POSTGRESDB_PASSWORD"
|
8 |
WEBDAV_URL="$WEBDAV_URL"
|
9 |
-
WEBDAV_USER="WEBDAV_USER"
|
10 |
-
WEBDAV_PASSWORD="WEBDAV_PASSWORD"
|
11 |
DB_IMPORT="$DB_IMPORT"
|
12 |
|
13 |
# 检查是否需要导入数据库
|
@@ -19,7 +19,7 @@ if [ "$DB_IMPORT" = "yes" ]; then
|
|
19 |
if curl -u "$WEBDAV_USER:$WEBDAV_PASSWORD" -f -o "$DUMP_FILE" "${WEBDAV_URL}/backup.dump"; then
|
20 |
echo "下载成功."
|
21 |
else
|
22 |
-
echo "下载失败. 无法从 ${WEBDAV_URL}/backup.dump
|
23 |
exit 1
|
24 |
fi
|
25 |
|
|
|
6 |
DB_USER="$DB_POSTGRESDB_USER"
|
7 |
DB_PASS="$DB_POSTGRESDB_PASSWORD"
|
8 |
WEBDAV_URL="$WEBDAV_URL"
|
9 |
+
WEBDAV_USER="$WEBDAV_USER"
|
10 |
+
WEBDAV_PASSWORD="$WEBDAV_PASSWORD"
|
11 |
DB_IMPORT="$DB_IMPORT"
|
12 |
|
13 |
# 检查是否需要导入数据库
|
|
|
19 |
if curl -u "$WEBDAV_USER:$WEBDAV_PASSWORD" -f -o "$DUMP_FILE" "${WEBDAV_URL}/backup.dump"; then
|
20 |
echo "下载成功."
|
21 |
else
|
22 |
+
echo "下载失败. 无法从 ${WEBDAV_URL}/backup.dump 获取数据库备份文件.$WEBDAV_USER:$WEBDAV_PASSWORD"
|
23 |
exit 1
|
24 |
fi
|
25 |
|