Parcourir la source

revert changes restore db

tomishinets.v il y a 6 ans
Parent
commit
f93cae6962
1 fichiers modifiés avec 6 ajouts et 6 suppressions
  1. 6 6
      updatedb.sh

+ 6 - 6
updatedb.sh

@@ -1,12 +1,12 @@
 #!/bin/sh
 
 # Проверяем наличие 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} ${MONGODB}
-  if [[ $? -ne 0 ]]; then echo "Database ${MONGODB} is not restored!!!";rm -rf /tmp/${MONGODB};exit 1;fi
-  rm -rf /tmp/${MONGODB}
-fi
+#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} ${MONGODB}
+#  if [[ $? -ne 0 ]]; then echo "Database ${MONGODB} is not restored!!!";rm -rf /tmp/${MONGODB};exit 1;fi
+#  rm -rf /tmp/${MONGODB}
+#fi
 
 
 FB_USER=$(cat /run/secrets/FB3_USER_NAME)