This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
franceconnect/ldap/convert-schema-to-ldif.sh

17 lines
370 B
Bash
Executable File

#!/bin/sh
SLAPD_CONF=`mktemp --suffix=fca`
SLAPD_DIR=`mktemp -d --suffix=fca`
trap "rm -rf $SLAPD_DIR $SLAPD_CONF" EXIT
cat >$SLAPD_CONF <<EOF
include /etc/ldap/schema/core.schema
include `pwd`/schema/franceconnect.schema
EOF
/usr/sbin/slaptest -f $SLAPD_CONF -F $SLAPD_DIR
cp $SLAPD_DIR/cn\=config/cn\=schema/cn\=\{1\}franceconnect.ldif schema/franceconnect.ldif