diff --git a/DatabaseScripts/MongoDB/appveyor.ps1 b/DatabaseScripts/MongoDB/appveyor.ps1 index 6c7e10e1..872beb42 100644 --- a/DatabaseScripts/MongoDB/appveyor.ps1 +++ b/DatabaseScripts/MongoDB/appveyor.ps1 @@ -1,8 +1,8 @@ # init mongodb data $initFolder = "$($env:appveyor_build_folder)\DatabaseScripts\MongoDB" cd $initFolder -$cmd = "C:\mongodb\bin\mongo $initFolder\init.js" -iex "& $cmd" + +cmd.exe /c "C:\mongodb\bin\mongo init.js" $cmd = 'C:\mongodb\bin\mongo BootstrapAdmin --eval "printjson(db.getCollectionNames())"' iex "& $cmd" diff --git a/DatabaseScripts/MongoDB/init.js b/DatabaseScripts/MongoDB/init.js index ffb76473..115669ad 100644 --- a/DatabaseScripts/MongoDB/init.js +++ b/DatabaseScripts/MongoDB/init.js @@ -1,8 +1,8 @@ -load("Dicts.js"); -load("Navigations.js"); -load("Groups.js"); -load("Roles.js"); -load("Users.js"); +load("./Dicts.js"); +load("./Navigations.js"); +load("./Groups.js"); +load("./Roles.js"); +load("./Users.js"); conn = new Mongo("localhost:27017"); db = conn.getDB("BootstrapAdmin"); diff --git a/DatabaseScripts/MongoDB/install.sh b/DatabaseScripts/MongoDB/install.sh index 8633014b..8e8ff90b 100644 --- a/DatabaseScripts/MongoDB/install.sh +++ b/DatabaseScripts/MongoDB/install.sh @@ -1,3 +1,3 @@ # init mongodb data -mongo ~/src/Longbow/BootstrapAdmin/DatabaseScripts/MongoDB/init.js +mongo ./init.js mongo BootstrapAdmin --eval "printjson(db.getCollectionNames())" \ No newline at end of file