extended start script clean up and fixes for install/upgrade

This doesn't work on Mac, but "hostname -f" works on both OS.