I have been struggling on creating mongodb start-up script.
I have this file here "script.js" that contain my scripts that i want to execute every-time the server boot.
My script file is under "/opt/temp/script.js"
db.getCollectionNames().forEach(function(collection) {
print(collection);
});
Which command should I write to execute this file every time after the sever restarted ? Where to put that command ? Please help me
Thanks you..