refactor(sources/functions.sh): add clear command in banner function

This commit is contained in:
TheHackdes 2026-05-04 19:42:54 +02:00
parent f756ca2991
commit debf81e5a9
5 changed files with 28 additions and 3 deletions

20
actions/add_user_in_group·sh Executable file
View file

@ -0,0 +1,20 @@
#!/bin/bash
source ./sources/functions.sh
banner "Adding user in group"
sleep 1
log info "Search all users..."
sleep 1
SELECTED_USER=$(ldapsearch -x -LLL -H ldap://${LDAP_SERVER} -b "${LDAP_BASE_DN}" "(objectClass=inetOrgPerson)" dn | grep '^dn' | sed 's/dn: //g' | fzf --height=10 --reverse --cycle --prompt=" Choix : " -m)
if [ -z "$SELECTED_USER" ]; then
log error "No user selected"
else
log success "User selected : "
for i in $SELECTED_USER; do
echo -e " - ${i}"
done
fi