define remove_user() function before to call it

This commit is contained in:
Blade of Darkness 2020-10-09 00:18:05 +02:00
parent ba830c97ec
commit 694cd17843
1 changed files with 9 additions and 8 deletions

17
rmuser
View File

@ -3,14 +3,6 @@ CONFIG=./setenv
. $CONFIG
if [ -z $1 ]
then
echo -e "Usage: `basename $0` [ username | --baned ]"
else
remove_user $1
[ -n $2 ] && [[ $2 == --banned ]] && echo $1 >> /root/users.banned
fi
remove_user()
{
echo "This will remove user account $1 from Thunix."
@ -31,3 +23,12 @@ remove_user()
echo "User $1 removed from system. Make sure user is unenforced in ansible." | sudo mail -s "User Account $1 removed from Thunix" $ADMIN_EMAIL
}
if [ -z $1 ]
then
echo -e "Usage: `basename $0` [ username | --baned ]"
else
remove_user $1
[ -n $2 ] && [[ $2 == --banned ]] && echo $1 >> /root/users.banned
fi