For Auto-Restart Ubuntu a .sh script.
Source:http://stackoverflow.com/questions/25816330/auto-restart-sh-script-on-crash
running=1
finish()
{
running=0
}
trap finish SIGINT
while (( running )); do
// Execute the command here that starts your server.
echo “Restarting server on crash…”
sleep 5
done