#!/bin/sh

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

exec ldapvi -b dc=scripts,dc=mit,dc=edu "(&(objectClass=scriptsVhost)(|$(printf '(scriptsVhostName=%s)' "$@")$(printf '(scriptsVhostAlias=%s)' "$@")))"
