aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorAkinori MUSHA <knu@FreeBSD.org>2000-09-25 05:43:46 +0000
committerAkinori MUSHA <knu@FreeBSD.org>2000-09-25 05:43:46 +0000
commitad82bf983f0713dbffc1f90aac9ab03938f49ed0 (patch)
tree22cc31072a763b41efe81153ed8e7bd56a88449c /net
parent57754ba65d94c10da517d1aa94507ac1639823f3 (diff)
downloadports-ad82bf983f0713dbffc1f90aac9ab03938f49ed0.tar.gz
ports-ad82bf983f0713dbffc1f90aac9ab03938f49ed0.zip
Notes
Diffstat (limited to 'net')
-rw-r--r--net/openldap/Makefile4
-rw-r--r--net/openldap/files/slapd.sh31
-rw-r--r--net/openldap12/Makefile4
-rw-r--r--net/openldap12/files/slapd.sh31
-rw-r--r--net/openldap2/Makefile4
-rw-r--r--net/openldap2/files/slapd.sh31
-rw-r--r--net/openldap20-server/Makefile4
-rw-r--r--net/openldap20-server/files/slapd.sh31
-rw-r--r--net/openldap20/Makefile4
-rw-r--r--net/openldap20/files/slapd.sh31
-rw-r--r--net/openldap21-server/Makefile4
-rw-r--r--net/openldap21-server/files/slapd.sh31
-rw-r--r--net/openldap21/Makefile4
-rw-r--r--net/openldap21/files/slapd.sh31
-rw-r--r--net/openldap22-server/Makefile4
-rw-r--r--net/openldap22-server/files/slapd.sh31
-rw-r--r--net/openldap22/Makefile4
-rw-r--r--net/openldap22/files/slapd.sh31
-rw-r--r--net/openldap23-server/Makefile4
-rw-r--r--net/openldap23-server/files/slapd.sh31
-rw-r--r--net/openldap24-server/Makefile4
-rw-r--r--net/openldap24-server/files/slapd.sh31
22 files changed, 385 insertions, 0 deletions
diff --git a/net/openldap/Makefile b/net/openldap/Makefile
index 1e83b6785b3d..e73d39f48e88 100644
--- a/net/openldap/Makefile
+++ b/net/openldap/Makefile
@@ -42,6 +42,9 @@ CONFIGURE_ARGS+= --enable-wrappers
pre-build:
cd ${WRKSRC} ; make depend
+post-build:
+ ${SED} 's,@@PREFIX@@,${PREFIX},g' ${FILESDIR}/slapd.sh >${WRKDIR}/slapd.sh
+
post-install:
strip ${PREFIX}/bin/ldapadd ${PREFIX}/bin/ldapdelete \
${PREFIX}/bin/ldapmodrdn ${PREFIX}/bin/ldapsearch ${PREFIX}/bin/ud \
@@ -54,5 +57,6 @@ post-install:
${PREFIX}/sbin/ldif2id2children ${PREFIX}/sbin/ldif2id2entry \
${PREFIX}/sbin/ldif2index ${PREFIX}/sbin/ldif2ldbm \
${PREFIX}/bin/ldapmodify ${PREFIX}/bin/ldappasswd
+ ${INSTALL_SCRIPT} ${WRKDIR}/slapd.sh ${PREFIX}/etc/rc.d/slapd.sh.sample
.include <bsd.port.post.mk>
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
diff --git a/net/openldap12/Makefile b/net/openldap12/Makefile
index 1e83b6785b3d..e73d39f48e88 100644
--- a/net/openldap12/Makefile
+++ b/net/openldap12/Makefile
@@ -42,6 +42,9 @@ CONFIGURE_ARGS+= --enable-wrappers
pre-build:
cd ${WRKSRC} ; make depend
+post-build:
+ ${SED} 's,@@PREFIX@@,${PREFIX},g' ${FILESDIR}/slapd.sh >${WRKDIR}/slapd.sh
+
post-install:
strip ${PREFIX}/bin/ldapadd ${PREFIX}/bin/ldapdelete \
${PREFIX}/bin/ldapmodrdn ${PREFIX}/bin/ldapsearch ${PREFIX}/bin/ud \
@@ -54,5 +57,6 @@ post-install:
${PREFIX}/sbin/ldif2id2children ${PREFIX}/sbin/ldif2id2entry \
${PREFIX}/sbin/ldif2index ${PREFIX}/sbin/ldif2ldbm \
${PREFIX}/bin/ldapmodify ${PREFIX}/bin/ldappasswd
+ ${INSTALL_SCRIPT} ${WRKDIR}/slapd.sh ${PREFIX}/etc/rc.d/slapd.sh.sample
.include <bsd.port.post.mk>
diff --git a/net/openldap12/files/slapd.sh b/net/openldap12/files/slapd.sh
new file mode 100644
index 000000000000..1704074b7968
--- /dev/null
+++ b/net/openldap12/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
diff --git a/net/openldap2/Makefile b/net/openldap2/Makefile
index 1e83b6785b3d..e73d39f48e88 100644
--- a/net/openldap2/Makefile
+++ b/net/openldap2/Makefile
@@ -42,6 +42,9 @@ CONFIGURE_ARGS+= --enable-wrappers
pre-build:
cd ${WRKSRC} ; make depend
+post-build:
+ ${SED} 's,@@PREFIX@@,${PREFIX},g' ${FILESDIR}/slapd.sh >${WRKDIR}/slapd.sh
+
post-install:
strip ${PREFIX}/bin/ldapadd ${PREFIX}/bin/ldapdelete \
${PREFIX}/bin/ldapmodrdn ${PREFIX}/bin/ldapsearch ${PREFIX}/bin/ud \
@@ -54,5 +57,6 @@ post-install:
${PREFIX}/sbin/ldif2id2children ${PREFIX}/sbin/ldif2id2entry \
${PREFIX}/sbin/ldif2index ${PREFIX}/sbin/ldif2ldbm \
${PREFIX}/bin/ldapmodify ${PREFIX}/bin/ldappasswd
+ ${INSTALL_SCRIPT} ${WRKDIR}/slapd.sh ${PREFIX}/etc/rc.d/slapd.sh.sample
.include <bsd.port.post.mk>
diff --git a/net/openldap2/files/slapd.sh b/net/openldap2/files/slapd.sh
new file mode 100644
index 000000000000..1704074b7968
--- /dev/null
+++ b/net/openldap2/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
diff --git a/net/openldap20-server/Makefile b/net/openldap20-server/Makefile
index 1e83b6785b3d..e73d39f48e88 100644
--- a/net/openldap20-server/Makefile
+++ b/net/openldap20-server/Makefile
@@ -42,6 +42,9 @@ CONFIGURE_ARGS+= --enable-wrappers
pre-build:
cd ${WRKSRC} ; make depend
+post-build:
+ ${SED} 's,@@PREFIX@@,${PREFIX},g' ${FILESDIR}/slapd.sh >${WRKDIR}/slapd.sh
+
post-install:
strip ${PREFIX}/bin/ldapadd ${PREFIX}/bin/ldapdelete \
${PREFIX}/bin/ldapmodrdn ${PREFIX}/bin/ldapsearch ${PREFIX}/bin/ud \
@@ -54,5 +57,6 @@ post-install:
${PREFIX}/sbin/ldif2id2children ${PREFIX}/sbin/ldif2id2entry \
${PREFIX}/sbin/ldif2index ${PREFIX}/sbin/ldif2ldbm \
${PREFIX}/bin/ldapmodify ${PREFIX}/bin/ldappasswd
+ ${INSTALL_SCRIPT} ${WRKDIR}/slapd.sh ${PREFIX}/etc/rc.d/slapd.sh.sample
.include <bsd.port.post.mk>
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
diff --git a/net/openldap20/Makefile b/net/openldap20/Makefile
index 1e83b6785b3d..e73d39f48e88 100644
--- a/net/openldap20/Makefile
+++ b/net/openldap20/Makefile
@@ -42,6 +42,9 @@ CONFIGURE_ARGS+= --enable-wrappers
pre-build:
cd ${WRKSRC} ; make depend
+post-build:
+ ${SED} 's,@@PREFIX@@,${PREFIX},g' ${FILESDIR}/slapd.sh >${WRKDIR}/slapd.sh
+
post-install:
strip ${PREFIX}/bin/ldapadd ${PREFIX}/bin/ldapdelete \
${PREFIX}/bin/ldapmodrdn ${PREFIX}/bin/ldapsearch ${PREFIX}/bin/ud \
@@ -54,5 +57,6 @@ post-install:
${PREFIX}/sbin/ldif2id2children ${PREFIX}/sbin/ldif2id2entry \
${PREFIX}/sbin/ldif2index ${PREFIX}/sbin/ldif2ldbm \
${PREFIX}/bin/ldapmodify ${PREFIX}/bin/ldappasswd
+ ${INSTALL_SCRIPT} ${WRKDIR}/slapd.sh ${PREFIX}/etc/rc.d/slapd.sh.sample
.include <bsd.port.post.mk>
diff --git a/net/openldap20/files/slapd.sh b/net/openldap20/files/slapd.sh
new file mode 100644
index 000000000000..1704074b7968
--- /dev/null
+++ b/net/openldap20/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
diff --git a/net/openldap21-server/Makefile b/net/openldap21-server/Makefile
index 1e83b6785b3d..e73d39f48e88 100644
--- a/net/openldap21-server/Makefile
+++ b/net/openldap21-server/Makefile
@@ -42,6 +42,9 @@ CONFIGURE_ARGS+= --enable-wrappers
pre-build:
cd ${WRKSRC} ; make depend
+post-build:
+ ${SED} 's,@@PREFIX@@,${PREFIX},g' ${FILESDIR}/slapd.sh >${WRKDIR}/slapd.sh
+
post-install:
strip ${PREFIX}/bin/ldapadd ${PREFIX}/bin/ldapdelete \
${PREFIX}/bin/ldapmodrdn ${PREFIX}/bin/ldapsearch ${PREFIX}/bin/ud \
@@ -54,5 +57,6 @@ post-install:
${PREFIX}/sbin/ldif2id2children ${PREFIX}/sbin/ldif2id2entry \
${PREFIX}/sbin/ldif2index ${PREFIX}/sbin/ldif2ldbm \
${PREFIX}/bin/ldapmodify ${PREFIX}/bin/ldappasswd
+ ${INSTALL_SCRIPT} ${WRKDIR}/slapd.sh ${PREFIX}/etc/rc.d/slapd.sh.sample
.include <bsd.port.post.mk>
diff --git a/net/openldap21-server/files/slapd.sh b/net/openldap21-server/files/slapd.sh
new file mode 100644
index 000000000000..1704074b7968
--- /dev/null
+++ b/net/openldap21-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
diff --git a/net/openldap21/Makefile b/net/openldap21/Makefile
index 1e83b6785b3d..e73d39f48e88 100644
--- a/net/openldap21/Makefile
+++ b/net/openldap21/Makefile
@@ -42,6 +42,9 @@ CONFIGURE_ARGS+= --enable-wrappers
pre-build:
cd ${WRKSRC} ; make depend
+post-build:
+ ${SED} 's,@@PREFIX@@,${PREFIX},g' ${FILESDIR}/slapd.sh >${WRKDIR}/slapd.sh
+
post-install:
strip ${PREFIX}/bin/ldapadd ${PREFIX}/bin/ldapdelete \
${PREFIX}/bin/ldapmodrdn ${PREFIX}/bin/ldapsearch ${PREFIX}/bin/ud \
@@ -54,5 +57,6 @@ post-install:
${PREFIX}/sbin/ldif2id2children ${PREFIX}/sbin/ldif2id2entry \
${PREFIX}/sbin/ldif2index ${PREFIX}/sbin/ldif2ldbm \
${PREFIX}/bin/ldapmodify ${PREFIX}/bin/ldappasswd
+ ${INSTALL_SCRIPT} ${WRKDIR}/slapd.sh ${PREFIX}/etc/rc.d/slapd.sh.sample
.include <bsd.port.post.mk>
diff --git a/net/openldap21/files/slapd.sh b/net/openldap21/files/slapd.sh
new file mode 100644
index 000000000000..1704074b7968
--- /dev/null
+++ b/net/openldap21/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
diff --git a/net/openldap22-server/Makefile b/net/openldap22-server/Makefile
index 1e83b6785b3d..e73d39f48e88 100644
--- a/net/openldap22-server/Makefile
+++ b/net/openldap22-server/Makefile
@@ -42,6 +42,9 @@ CONFIGURE_ARGS+= --enable-wrappers
pre-build:
cd ${WRKSRC} ; make depend
+post-build:
+ ${SED} 's,@@PREFIX@@,${PREFIX},g' ${FILESDIR}/slapd.sh >${WRKDIR}/slapd.sh
+
post-install:
strip ${PREFIX}/bin/ldapadd ${PREFIX}/bin/ldapdelete \
${PREFIX}/bin/ldapmodrdn ${PREFIX}/bin/ldapsearch ${PREFIX}/bin/ud \
@@ -54,5 +57,6 @@ post-install:
${PREFIX}/sbin/ldif2id2children ${PREFIX}/sbin/ldif2id2entry \
${PREFIX}/sbin/ldif2index ${PREFIX}/sbin/ldif2ldbm \
${PREFIX}/bin/ldapmodify ${PREFIX}/bin/ldappasswd
+ ${INSTALL_SCRIPT} ${WRKDIR}/slapd.sh ${PREFIX}/etc/rc.d/slapd.sh.sample
.include <bsd.port.post.mk>
diff --git a/net/openldap22-server/files/slapd.sh b/net/openldap22-server/files/slapd.sh
new file mode 100644
index 000000000000..1704074b7968
--- /dev/null
+++ b/net/openldap22-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
diff --git a/net/openldap22/Makefile b/net/openldap22/Makefile
index 1e83b6785b3d..e73d39f48e88 100644
--- a/net/openldap22/Makefile
+++ b/net/openldap22/Makefile
@@ -42,6 +42,9 @@ CONFIGURE_ARGS+= --enable-wrappers
pre-build:
cd ${WRKSRC} ; make depend
+post-build:
+ ${SED} 's,@@PREFIX@@,${PREFIX},g' ${FILESDIR}/slapd.sh >${WRKDIR}/slapd.sh
+
post-install:
strip ${PREFIX}/bin/ldapadd ${PREFIX}/bin/ldapdelete \
${PREFIX}/bin/ldapmodrdn ${PREFIX}/bin/ldapsearch ${PREFIX}/bin/ud \
@@ -54,5 +57,6 @@ post-install:
${PREFIX}/sbin/ldif2id2children ${PREFIX}/sbin/ldif2id2entry \
${PREFIX}/sbin/ldif2index ${PREFIX}/sbin/ldif2ldbm \
${PREFIX}/bin/ldapmodify ${PREFIX}/bin/ldappasswd
+ ${INSTALL_SCRIPT} ${WRKDIR}/slapd.sh ${PREFIX}/etc/rc.d/slapd.sh.sample
.include <bsd.port.post.mk>
diff --git a/net/openldap22/files/slapd.sh b/net/openldap22/files/slapd.sh
new file mode 100644
index 000000000000..1704074b7968
--- /dev/null
+++ b/net/openldap22/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
diff --git a/net/openldap23-server/Makefile b/net/openldap23-server/Makefile
index 1e83b6785b3d..e73d39f48e88 100644
--- a/net/openldap23-server/Makefile
+++ b/net/openldap23-server/Makefile
@@ -42,6 +42,9 @@ CONFIGURE_ARGS+= --enable-wrappers
pre-build:
cd ${WRKSRC} ; make depend
+post-build:
+ ${SED} 's,@@PREFIX@@,${PREFIX},g' ${FILESDIR}/slapd.sh >${WRKDIR}/slapd.sh
+
post-install:
strip ${PREFIX}/bin/ldapadd ${PREFIX}/bin/ldapdelete \
${PREFIX}/bin/ldapmodrdn ${PREFIX}/bin/ldapsearch ${PREFIX}/bin/ud \
@@ -54,5 +57,6 @@ post-install:
${PREFIX}/sbin/ldif2id2children ${PREFIX}/sbin/ldif2id2entry \
${PREFIX}/sbin/ldif2index ${PREFIX}/sbin/ldif2ldbm \
${PREFIX}/bin/ldapmodify ${PREFIX}/bin/ldappasswd
+ ${INSTALL_SCRIPT} ${WRKDIR}/slapd.sh ${PREFIX}/etc/rc.d/slapd.sh.sample
.include <bsd.port.post.mk>
diff --git a/net/openldap23-server/files/slapd.sh b/net/openldap23-server/files/slapd.sh
new file mode 100644
index 000000000000..1704074b7968
--- /dev/null
+++ b/net/openldap23-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
diff --git a/net/openldap24-server/Makefile b/net/openldap24-server/Makefile
index 1e83b6785b3d..e73d39f48e88 100644
--- a/net/openldap24-server/Makefile
+++ b/net/openldap24-server/Makefile
@@ -42,6 +42,9 @@ CONFIGURE_ARGS+= --enable-wrappers
pre-build:
cd ${WRKSRC} ; make depend
+post-build:
+ ${SED} 's,@@PREFIX@@,${PREFIX},g' ${FILESDIR}/slapd.sh >${WRKDIR}/slapd.sh
+
post-install:
strip ${PREFIX}/bin/ldapadd ${PREFIX}/bin/ldapdelete \
${PREFIX}/bin/ldapmodrdn ${PREFIX}/bin/ldapsearch ${PREFIX}/bin/ud \
@@ -54,5 +57,6 @@ post-install:
${PREFIX}/sbin/ldif2id2children ${PREFIX}/sbin/ldif2id2entry \
${PREFIX}/sbin/ldif2index ${PREFIX}/sbin/ldif2ldbm \
${PREFIX}/bin/ldapmodify ${PREFIX}/bin/ldappasswd
+ ${INSTALL_SCRIPT} ${WRKDIR}/slapd.sh ${PREFIX}/etc/rc.d/slapd.sh.sample
.include <bsd.port.post.mk>
diff --git a/net/openldap24-server/files/slapd.sh b/net/openldap24-server/files/slapd.sh
new file mode 100644
index 000000000000..1704074b7968
--- /dev/null
+++ b/net/openldap24-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