#!/bin/sh

if [ ! "$2" ]; then
    echo "Usage: $0 <vhost>"
    exit 2
fi

exec ldapvi --bind sasl -Y GSSAPI -h $1 -b dc=scripts,dc=mit,dc=edu \
       "(|(&(objectClass=apacheConfig)(|(apacheServerName=$2)(apacheServerAlias=$2)))(&(objectClass=scriptsVhost)(|(scriptsVhostName=$2)(scriptsVhostAlias=$2))))"
