From: Zoltán Felleg Date: Wed, 29 Oct 2025 08:04:02 +0000 (+0100) Subject: Updated fds.in (cosmetic changes). X-Git-Url: http://git.useribm.hu/?a=commitdiff_plain;h=006b3ad7b8ff483435110f6309c5e54bc5111604;p=user-lxc.git Updated fds.in (cosmetic changes). --- diff --git a/sources/fds.in/c3d/postinstall/install-data/usr/local/bin/backupfds.sh b/sources/fds.in/c3d/postinstall/install-data/usr/local/bin/backupfds.sh index f03a77e..704f6f6 100755 --- a/sources/fds.in/c3d/postinstall/install-data/usr/local/bin/backupfds.sh +++ b/sources/fds.in/c3d/postinstall/install-data/usr/local/bin/backupfds.sh @@ -22,6 +22,8 @@ create_instance_create_template() SECURE_PORT=$(dsconf $INSTANCE config get nsslapd-securePort \ | cut -f 2 -d ' ') echo "secure_port = $SECURE_PORT" >>$CREATE_TEMPLATE + DMPASSWORD=$(/usr/bin/pwdhash Passw@rd01) + echo "root_password = $DMPASSWORD" >>$CREATE_TEMPLATE SUFFIXES=$(dsconf $INSTANCE backend suffix list) echo "$SUFFIXES" | while read SUFFIX_BACKEND do diff --git a/sources/fds.in/c3d/postinstall/install-data/usr/local/bin/replacedirsrvcerts.sh b/sources/fds.in/c3d/postinstall/install-data/usr/local/bin/replacedirsrvcerts.sh index 2c1d251..15eca1a 100755 --- a/sources/fds.in/c3d/postinstall/install-data/usr/local/bin/replacedirsrvcerts.sh +++ b/sources/fds.in/c3d/postinstall/install-data/usr/local/bin/replacedirsrvcerts.sh @@ -7,9 +7,10 @@ LETSENCRYPT_CERT_NAME=useribm TMP_PATH=$(mktemp --directory) -if [ -d $LETSENCRYPT_BASE_PATH ] -then +replace_cert() +{ CERT_PATH=$LETSENCRYPT_BASE_PATH/live/$LETSENCRYPT_CERT_NAME + DIRSRV_INSTANCE=$1 for CACERT in ca-certificate certificate do @@ -46,6 +47,18 @@ then $CERT_PATH/privkey.pem dsctl $DIRSRV_INSTANCE restart +} + +if [ ! -d $LETSENCRYPT_BASE_PATH ] +then + echo "$LETSENCRYPT_BASE_PATH does not exist, exiting." >&2 + exit 1 fi +dsctl --list | sed 's/^slapd-//' >$TMP_PATH/instances +while read INSTANCE +do + replace_cert $INSTANCE +done <$TMP_PATH/instances + rm --force --recursive $TMP_PATH