The solution seems to be passing in the hostname via a system property as -Dhost.name=$HOSTNAME
or -Dhost.name=$(hostname)
. I'd imagine in windows it would be something else, but this works for *NIX environments.
Unless anyone can come up with something cleaner this will be the accepted answer.