aboutsummaryrefslogtreecommitdiffstats
path: root/net/openldap/files
diff options
context:
space:
mode:
authorknu <knu@FreeBSD.org>2000-09-25 13:43:46 +0800
committerknu <knu@FreeBSD.org>2000-09-25 13:43:46 +0800
commit1d71d2f7e02152db58f5244f19818a9e6345b339 (patch)
treebc2d7cb35ddcacadeeaaf2ccdbec04724531c9a0 /net/openldap/files
parent3123b8648e831c11d581fbdc6b408387e6a3a81d (diff)
downloadfreebsd-ports-gnome-1d71d2f7e02152db58f5244f19818a9e6345b339.tar.gz
freebsd-ports-gnome-1d71d2f7e02152db58f5244f19818a9e6345b339.tar.zst
freebsd-ports-gnome-1d71d2f7e02152db58f5244f19818a9e6345b339.zip
Add a startup script for slapd.
Approved by: Lachlan O'Dea <lodea@vet.com.au> (MAINTAINER)
Diffstat (limited to 'net/openldap/files')
-rw-r--r--net/openldap/files/slapd.sh31
1 files changed, 31 insertions, 0 deletions
diff --git a/net/openldap/files/slapd.sh b/net/openldap/files/slapd.sh
new file mode 100644
index 000000000000..1704074b7968
--- /dev/null
+++ b/net/openldap/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