Skip to content
Snippets Groups Projects
Verified Commit d47b564f authored by Thorsten Roßner's avatar Thorsten Roßner
Browse files

fix: Split purge and slapadd.

parent 67c04313
No related branches found
No related tags found
No related merge requests found
Pipeline #67111 passed with warnings
#!/usr/bin/env bash
# SPDX-FileCopyrightText: 2024 Zentrum für Digitale Souveränität der Öffentlichen Verwaltung (ZenDiS) GmbH
# SPDX-License-Identifier: Apache-2.0
me=$(basename "$0")
echo "- Running ${me}"
if [ -f /var/lib/univention-ldap/ldap-24-export.ldif ]; then
echo "- Deleting /var/lib/univention-ldap/ldap/*.mdb"
rm -f /var/lib/univention-ldap/ldap/*.mdb
echo "- Deleting /var/lib/univention-ldap/internal/*.mdb"
rm -f /var/lib/univention-ldap/internal/*.mdb
echo "- Deleting /var/lib/univention-ldap/translog/*.mdb"
rm -f /var/lib/univention-ldap/translog/*.mdb
else
echo "- File /var/lib/univention-ldap/ldap-24-export.ldif not found."
fi
......@@ -2,14 +2,10 @@
# SPDX-FileCopyrightText: 2024 Zentrum für Digitale Souveränität der Öffentlichen Verwaltung (ZenDiS) GmbH
# SPDX-License-Identifier: Apache-2.0
echo "- Running 45-slapadd-24-ldif.sh"
me=$(basename "$0")
echo "- Running ${me}"
if [ -f /var/lib/univention-ldap/ldap-24-export.ldif ]; then
echo "- Deleting /var/lib/univention-ldap/ldap/[data|lock].mdb"
rm -f /var/lib/univention-ldap/ldap/data.mdb
rm -f /var/lib/univention-ldap/ldap/lock.mdb
echo "- Listing files in /var/lib/univention-ldap/ldap"
ls -l /var/lib/univention-ldap/ldap
echo "- slapadd-ing /var/lib/univention-ldap/ldap-24-export.ldif."
/usr/sbin/slapadd -n 1 -l /var/lib/univention-ldap/ldap-24-export.ldif
mv /var/lib/univention-ldap/ldap-24-export.ldif /var/lib/univention-ldap/ldap-24-export.ldif-imported
......
......@@ -3,6 +3,8 @@
FROM artifacts.software-univention.de/nubus/images/ldap-server:0.22.0
COPY 45-slapadd-24-ldif.sh /entrypoint.d
COPY 30-purge-mdbs.sh /entrypoint.d
COPY 99-slapadd-24-ldif.sh /entrypoint.d
RUN chmod 555 /entrypoint.d/45-slapadd-24-ldif.sh
RUN chmod 555 /entrypoint.d/30-purge-mdbs.sh
RUN chmod 555 /entrypoint.d/99-slapadd-24-ldif.sh
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment

Consent

On this website, we use the web analytics service Matomo to analyze and review the use of our website. Through the collected statistics, we can improve our offerings and make them more appealing for you. Here, you can decide whether to allow us to process your data and set corresponding cookies for these purposes, in addition to technically necessary cookies. Further information on data protection—especially regarding "cookies" and "Matomo"—can be found in our privacy policy. You can withdraw your consent at any time.