Skip to content

Commit

Permalink
use new 2.3 openldap-initscript (references #13)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcoutadeur committed Mar 31, 2018
1 parent e9555e4 commit fcf9a7b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/usr/local/openldap/etc/openldap/slapd.conf
/usr/local/openldap/etc/openldap/slapd-cli.conf
/usr/local/openldap/etc/openldap/ldap.conf
/usr/local/openldap/var/openldap-data/DB_CONFIG
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ usr/local/openldap/etc/openldap/*.default
usr/local/openldap/etc/openldap/*.ldif
usr/local/openldap/etc/openldap/ldap.conf
usr/local/openldap/etc/openldap/slapd.conf
usr/local/openldap/etc/openldap/slapd-cli.conf
usr/local/openldap/etc/openldap/schema
usr/local/openldap/include
usr/local/openldap/lib*/lib*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
BUILD_DIR="$( pwd )"
BDBDIR="/usr/local/berkeleydb"
REAL_NAME="openldap"
REAL_VERSION="2.4.45"
REAL_VERSION="2.4.46"
INSTALL_DIR="${BUILD_DIR}/debian/tmp"
INSTALL_DIR_CP="${BUILD_DIR}/debian/openldap-ltb-check-password"
INSTALL_DIR_PPM="${BUILD_DIR}/debian/openldap-ltb-ppm"
Expand All @@ -26,7 +26,7 @@ LDAPUSER="ldap"
LDAPGROUP="ldap"

SLAPD_INIT_NAME="ltb-project-openldap-initscript"
SLAPD_INIT_VERSION="2.2"
SLAPD_INIT_VERSION="2.3"

CHECK_PASSWORD_NAME="ltb-project-openldap-ppolicy-check-password"
CHECK_PASSWORD_VERSION="1.1"
Expand Down
20 changes: 10 additions & 10 deletions debian/paquet-openldap-debian/openldap-ltb-2.4.46/debian/postbuild
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,24 @@ mkdir -p "${INSTALL_DIR}/${LDAPDATADIR}"
mkdir -p "${INSTALL_DIR}/etc/logrotate.d"
mkdir -p "${INSTALL_DIR}/etc/profile.d"
mkdir -p "${INSTALL_DIR}/etc/init.d"
mkdir -p "${INSTALL_DIR}/etc/default"

# copy some more files
cp -f "../DB_CONFIG" "${INSTALL_DIR}/${LDAPDATADIR}"
cp -f "../openldap.logrotate" "${INSTALL_DIR}/etc/logrotate.d/openldap"
cp -f "../openldap.sh" "${INSTALL_DIR}/etc/profile.d"
cp -f "${SLAPD_INIT_NAME}-${SLAPD_INIT_VERSION}/slapd" "${INSTALL_DIR}/etc/init.d"
cp -f "${SLAPD_INIT_NAME}-${SLAPD_INIT_VERSION}/slapd.init" "${INSTALL_DIR}/etc/init.d/slapd"
chmod 755 "${INSTALL_DIR}/etc/init.d/slapd"
cp -f "${SLAPD_INIT_NAME}-${SLAPD_INIT_VERSION}/slapd.default" "${INSTALL_DIR}/etc/default/slapd"
cp -f "${SLAPD_INIT_NAME}-${SLAPD_INIT_VERSION}/slapd-cli" "${INSTALL_DIR}/usr/local/openldap/sbin/"
cp -f "${SLAPD_INIT_NAME}-${SLAPD_INIT_VERSION}/slapd-cli.conf" "${INSTALL_DIR}/usr/local/openldap/etc/openldap/"

# replace variable in default file
sed -i "s:^SLAPD_PATH.*:SLAPD_PATH=\"${LDAPDIR}\":" "${INSTALL_DIR}/etc/default/slapd"
sed -i "s:^SLAPD_USER.*:SLAPD_USER=\"${LDAPUSER}\":" "${INSTALL_DIR}/etc/default/slapd"
sed -i "s:^SLAPD_GROUP.*:SLAPD_GROUP=\"${LDAPGROUP}\":" "${INSTALL_DIR}/etc/default/slapd"
sed -i "s:^BDB_PATH.*:BDB_PATH=\"${BDBDIR}\":" "${INSTALL_DIR}/etc/default/slapd"
sed -i "s:^DB_ARCHIVE_BIN.*:DB_ARCHIVE_BIN=\"${BDBARCHIVEBIN}\":" "${INSTALL_DIR}/etc/default/slapd"
sed -i "s:^DB_RECOVER_BIN.*:DB_RECOVER_BIN=\"${BDBRECOVERBIN}\":" "${INSTALL_DIR}/etc/default/slapd"
sed -i "s:^BACKUP_PATH.*:BACKUP_PATH=\"${LDAPBACKUPDIR}\":" "${INSTALL_DIR}/etc/default/slapd"
sed -i "s:^SLAPD_PATH.*:SLAPD_PATH=\"${LDAPDIR}\":" "${INSTALL_DIR}${LDAPSERVERDIR}/etc/openldap/slapd-cli.conf"
sed -i "s:^SLAPD_USER.*:SLAPD_USER=\"${LDAPUSER}\":" "${INSTALL_DIR}${LDAPSERVERDIR}/etc/openldap/slapd-cli.conf"
sed -i "s:^SLAPD_GROUP.*:SLAPD_GROUP=\"${LDAPGROUP}\":" "${INSTALL_DIR}${LDAPSERVERDIR}/etc/openldap/slapd-cli.conf"
sed -i "s:^BDB_PATH.*:BDB_PATH=\"${BDBDIR}\":" "${INSTALL_DIR}${LDAPSERVERDIR}/etc/openldap/slapd-cli.conf"
sed -i "s:^DB_ARCHIVE_BIN.*:DB_ARCHIVE_BIN=\"${BDBARCHIVEBIN}\":" "${INSTALL_DIR}${LDAPSERVERDIR}/etc/openldap/slapd-cli.conf"
sed -i "s:^DB_RECOVER_BIN.*:DB_RECOVER_BIN=\"${BDBRECOVERBIN}\":" "${INSTALL_DIR}${LDAPSERVERDIR}/etc/openldap/slapd-cli.conf"
sed -i "s:^BACKUP_PATH.*:BACKUP_PATH=\"${LDAPBACKUPDIR}\":" "${INSTALL_DIR}${LDAPSERVERDIR}/etc/openldap/slapd-cli.conf"

# PATH modification
sed -i "s:^OL_BIN.*:OL_BIN=\"${LDAPDIR}/bin\":" "${INSTALL_DIR}/etc/profile.d/openldap.sh"
Expand Down

0 comments on commit fcf9a7b

Please sign in to comment.