summaryrefslogtreecommitdiff
path: root/package/openldap/files
diff options
context:
space:
mode:
authorwbx <wbx@hydrogenium.(none)>2009-05-17 14:41:34 +0200
committerwbx <wbx@hydrogenium.(none)>2009-05-17 14:41:34 +0200
commit219a6dab8995aad9ac4860cc1a84d6f3509a03a4 (patch)
treeb9c0f3c43aebba2fcfef777592d0add39f2072f4 /package/openldap/files
Initial import
Diffstat (limited to 'package/openldap/files')
-rw-r--r--package/openldap/files/slapd.conf30
-rw-r--r--package/openldap/files/slapd.init28
2 files changed, 58 insertions, 0 deletions
diff --git a/package/openldap/files/slapd.conf b/package/openldap/files/slapd.conf
new file mode 100644
index 000000000..d458fc495
--- /dev/null
+++ b/package/openldap/files/slapd.conf
@@ -0,0 +1,30 @@
+# See slapd.conf(5) for details on configuration options.
+# This file should NOT be world readable.
+#
+include /etc/openldap/schema/core.schema
+
+pidfile /var/run/slapd.pid
+argsfile /var/run/slapd.args
+
+# Load dynamic backend modules:
+# modulepath /usr/sbin/openldap
+# moduleload back_bdb.la
+# moduleload back_hdb.la
+# moduleload back_ldap.la
+
+#######################################################################
+# BDB database definitions
+#######################################################################
+database bdb
+suffix "dc=my-domain,dc=com"
+rootdn "cn=Manager,dc=my-domain,dc=com"
+# Cleartext passwords, especially for the rootdn, should
+# be avoid. See slappasswd(8) and slapd.conf(5) for details.
+# Use of strong authentication encouraged.
+rootpw secret
+# The database directory MUST exist prior to running slapd AND
+# should only be accessible by the slapd and slap tools.
+# Mode 700 recommended.
+directory /var/openldap-data
+# Indices to maintain
+index objectClass eq
diff --git a/package/openldap/files/slapd.init b/package/openldap/files/slapd.init
new file mode 100644
index 000000000..814345c44
--- /dev/null
+++ b/package/openldap/files/slapd.init
@@ -0,0 +1,28 @@
+#!/bin/sh
+#FWINIT 70
+. /etc/rc.conf
+
+case $1 in
+autostop) ;;
+autostart)
+ [[ $slapd = NO ]] && exit 0
+ exec sh $0 start
+ ;;
+start)
+ /usr/sbin/slapd
+ ;;
+stop)
+ if [ -e /var/run/slapd.pid ]; then
+ kill $(cat /var/run/slapd.pid)
+ fi
+ ;;
+restart)
+ sh $0 stop
+ sh $0 start
+ ;;
+*)
+ echo "Usage: $0 {start | stop | restart}"
+ exit 1
+ ;;
+esac
+exit $?