Browse Source

missprint

OBT-SYSADM\tomishinets 6 years ago
parent
commit
b568e68098
1 changed files with 3 additions and 3 deletions
  1. 3 3
      updatedb.sh

+ 3 - 3
updatedb.sh

@@ -3,9 +3,9 @@
 # Проверяем наличие DB laboratory
 if [[ $(mongo --host ${DB_CLUSTER} --quiet --eval  "printjson(db.adminCommand('listDatabases'))"|grep -q "${MONGODB}";echo $?) -ne 0 ]];then
   cd /tmp && tar xvf /opt/dev-${MONGODB}.tar.gz
-  mongorestore --host ${DB_CLUSTER} -d ${MONGODB} dev-${MONGODB}
-  if [[ $? -ne 0 ]]; then echo "Database ${MONGODB} is not restored!!!";rm -rf /tmp/dev-${MONGODB};exit 1;fi
-  rm -rf /tmp/dev-${MONGODB}
+  mongorestore --host ${DB_CLUSTER} -d ${MONGODB} ${MONGODB}
+  if [[ $? -ne 0 ]]; then echo "Database ${MONGODB} is not restored!!!";rm -rf /tmp/${MONGODB};exit 1;fi
+  rm -rf /tmp/${MONGODB}
 fi