Skip to content

Commit

Permalink
mimic blank-state's behavior (#7447)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zasa-san authored Nov 18, 2024
1 parent 1b1e137 commit fb29775
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions database/admin_user.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
cd "$parent_path"

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

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

0 comments on commit fb29775

Please sign in to comment.