#!/bin/sh

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

exec ldapvi -b dc=scripts,dc=mit,dc=edu "(|(&(objectClass=apacheConfig)(|(apacheServerName=$1)(apacheServerAlias=$1)))(&(objectClass=scriptsVhost)(|(scriptsVhostName=$1)(scriptsVhostAlias=$1))))"
