moved open_ports to __main__ so noauth can run director