changed script to create missing database server directories, allow separate endpoint for database host (which could be an internal network IP)