void-packages/srcpkgs/openldap/files/slapd/run

11 lines
228 B
Bash

#!/bin/sh
[ -r ./conf ] && . ./conf
: ${LDAPUSER:=ldap}
: ${LDAPGROUP:=ldap}
if [ ! -d /run/openldap ]; then
mkdir /run/openldap
chown $LDAPUSER:$LDAPGROUP /run/openldap
fi
exec 2>&1
exec slapd -u $LDAPUSER -g $LDAPGROUP -d 0