restart.sh: add check mongodb logic