Skip to content

Commit fb29775

Browse files
authored
mimic blank-state's behavior (#7447)
1 parent 1b1e137 commit fb29775

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

database/admin_user.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
44
cd "$parent_path"
55

6-
DB=${1:-uwazi_development}
7-
HOST=${2:-${DBHOST:-127.0.0.1}}
6+
DB=${filtered[0]:-${DATABASE_NAME:-uwazi_development}}
7+
HOST=${filtered[1]:-${DBHOST:-127.0.0.1}}
88

99
echo -e "\n\nDeleting $DB database on $HOST"
10-
mongosh --quiet -host $HOST $DB --eval "db.users.drop()"
11-
mongorestore -h $HOST blank_state/admin_user/ --db=$DB
10+
mongosh --quiet -host "$HOST" "$DB" --eval "db.users.drop()"
11+
mongorestore -h "$HOST" blank_state/admin_user/ --db="$DB"

0 commit comments

Comments
 (0)