ad db exists check

make port and host configurable