refactor(sources/functions.sh): add clear command in banner function
This commit is contained in:
parent
f756ca2991
commit
debf81e5a9
5 changed files with 28 additions and 3 deletions
20
actions/add_user_in_group·sh
Executable file
20
actions/add_user_in_group·sh
Executable 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue