#!/bin/sh
#
# x-stop-ldap
#
# andrew.findlay@skills-1st.co.uk
#
# $Id$

PROG=`basename "$0"`

if test ! -f slapd.conf -a -f openldap/slapd.conf
then
	cd openldap
fi

if test ! -f slapd.conf
then
	echo "$PROG: must be run from the directory containing slapd.conf" 1>&2
	exit 1
fi

if test ! -f slapd.pid
then
	echo "$PROG: no slapd.pid file so the server is probably stopped already" 1>&2
	exit 1
fi

kill -INT `cat slapd.pid`

