Quellcode durchsuchen

Add correcting updatedb.sh

Vadim Surkov vor 6 Jahren
Ursprung
Commit
bef9fb9663
1 geänderte Dateien mit 8 neuen und 8 gelöschten Zeilen
  1. 8 8
      updatedb.sh

+ 8 - 8
updatedb.sh

@@ -61,15 +61,15 @@ mongo --host ${DB_CLUSTER} ${MONGODB} --eval "if (db.getCollection('parameters')
     })
     })
 }"
 }"
 
 
-mongo --host ${DB_CLUSTER} ${MONGODB} --eval "if (db.getCollection('accounts').count() == 0) {
-    db.getCollection('accounts').insert({
-      '_class' : 'ru.alfatell.webinfoclinic.admin.commons.security.UserAccount',
-      'username' : 'admin',
-      'password' : '$2a$10$ah3safqEyaoYGnvsBEarqOfp9cJZvCZlCUg3jEM5S37zhXPPWJnda',
-      'roleName' : 'ROLE_ADMIN_DEFAULT',
-      'enabled' : true
+mongo --host ${DB_CLUSTER} ${MONGODB} --eval 'if (db.getCollection("accounts").count() == 0) {
+    db.getCollection("accounts").insert({
+      "_class" : "ru.alfatell.webinfoclinic.admin.commons.security.UserAccount",
+      "username" : "admin",
+      "password" : "$2a$10$ah3safqEyaoYGnvsBEarqOfp9cJZvCZlCUg3jEM5S37zhXPPWJnda",
+      "roleName" : "ROLE_ADMIN_DEFAULT",
+      "enabled" : true
     })
     })
-}"
+}'
 
 
 mongo --host ${DB_CLUSTER} ${MONGODB} --eval "if (db.getCollection('systems').count() == 0) {
 mongo --host ${DB_CLUSTER} ${MONGODB} --eval "if (db.getCollection('systems').count() == 0) {
     db.getCollection('systems').insert({
     db.getCollection('systems').insert({