diff options
Diffstat (limited to 'net/openldap20-server/files/slapd.sh')
-rw-r--r-- | net/openldap20-server/files/slapd.sh | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/net/openldap20-server/files/slapd.sh b/net/openldap20-server/files/slapd.sh new file mode 100644 index 000000000000..1704074b7968 --- /dev/null +++ b/net/openldap20-server/files/slapd.sh @@ -0,0 +1,31 @@ +#!/bin/sh +# +# $FreeBSD$ + +slapd=@@PREFIX@@/libexec/slapd +pidfile=/var/run/slapd.pid + +case "$1" in +start) + if [ -x $slapd ]; then + echo -n ' slapd' + $slapd + fi + ;; +stop) + if [ -f $pidfile ]; then + kill `cat $pidfile` + telnet localhost ldap </dev/null >/dev/null 2>&1 + echo -n ' slapd' + rm $pidfile + else + echo ' slapd: not running' + fi + ;; +*) + echo "Usage: `basename $0` {start|stop}" >&2 + exit 64 + ;; +esac + +exit 0 |