From f1f99aafeb660563b0f495aeaac22fd41b3a60de Mon Sep 17 00:00:00 2001 From: Fanch Date: Tue, 16 Jun 2026 18:00:03 +0200 Subject: [PATCH] ajout ldapconfvi --- bin/ldap/ldapconfvi.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 bin/ldap/ldapconfvi.sh diff --git a/bin/ldap/ldapconfvi.sh b/bin/ldap/ldapconfvi.sh new file mode 100644 index 0000000..95cc7fc --- /dev/null +++ b/bin/ldap/ldapconfvi.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +KAZ_ROOT=/kaz +. $KAZ_ROOT/bin/.commonFunctions.sh +setKazVars + +. $DOCKERS_ENV +. $KAZ_KEY_DIR/env-ldapServ + +LDAP_IP=$(docker inspect -f '{{.NetworkSettings.Networks.ldapNet.IPAddress}}' ldapServ) + +read -p "quel éditeur ? [vi] " EDITOR +EDITOR=${EDITOR:-vi} + +# if [ ${EDITOR} = 'emacs' ]; then +# echo "ALERTE ALERTE !!! quelqu'un a voulu utiliser emacs :) :) :)" +# exit +# fi + +EDITOR=${EDITOR:-vi} +export EDITOR=${EDITOR} + +ldapvi -h $LDAP_IP -D "cn=${LDAP_CONFIG_ADMIN_USERNAME},cn=config" -w ${LDAP_CONFIG_ADMIN_PASSWORD} -b cn=config