In the folder /etc/init.d/ put the script for mongodb:
#!/bin/bash
sudo /usr/bin/mongod --config /etc/mongod.conf --dbpath /var/lib/mongodb &
When you boot the system it fails to start the Mongo daemon is not enabled. What could it be? The rights to the script changed.