First of all you'll need to add bitcoind as a service (if you want, it will start every time that you start your computer):
Ubuntu Linux — How do I start bitcoind as a service to run automatically?You'll need to setup a crontab or something similar, since bitcoin daemon does not have such any kind of method for restarting the daemon after crash.
Here is basically a copy paste guide for restarting the daemon every time after crash
How To Use a Simple Bash Script To Restart Server Programs.
However the bash script would go as something like this:
#!/bin/sh
ps auxw | grep bitcoind | grep -v grep > /dev/null
if [ $? != 0 ]
then
/bitcoind start > /dev/null
fi
Im assuming that by root directory you mean that the bitcoind file is on the root folder which would be /.
I hope this is helpful, so far this kind of solutions is only one that i have found.