bash /root/.bash_profile
will create a new bash
process, run that file (and I assume set your env variables while doing so), and then exit, taking those newly set env variables with it.
Try . /root/.bash_profile
. Or source /root/.bash_profile
. That will execute the file in the current bash process, so your env variables will be available to the current process.
You may also want to use #!/bin/bash
instead of #!/bin/sh
if you're going to do bash-style invocations.