some changes on ffuseradd.sh but not ready yet... HAPPY EASTERDAYS! (but no

eastereggs included)
This commit is contained in:
sliker1 2013-03-31 22:19:11 +02:00
parent eee0a5a8b6
commit 3ab1ba0d21

View file

@ -1,12 +1,23 @@
#!/bin/bash #!/bin/bash
if [ "$1" = "" ]; then NMEUSR=$1
echo -e "\nUSAGE: ffuseradd <USERNAME>... [EMAIL ADDRESS]...\nUsername is\ EMLUSR=$2
necessary!\nEmail address is optional." GRPUSR=$3
ADDUSR="$(which useradd) -m -G"
if [ "$NMEUSR" = "" ]; then
echo -e "\nUSAGE: ffuseradd <USERNAME>... [EMAIL ADDRESS]... [GROUP]... \nUsername is\
necessary!\nEmail address and group are optional.\nGroups for example: sudo,www-user. Ever add multible groups \",\" separated! Leave it blank for standard user."
exit
else else
if [ "$2" = "" ]; then if [ "$EMLUSR" = "" ]; then
echo -e "You entered username:\n Username:"$1"\n Email address: none" echo -e "You entered username:\n Username: "$NMEUSR"\n Email address: none"
else else
echo -e "You entered username:\n Username:"$1"\n Email address: "$2"" echo -e "You entered username:\n Username: "$NMEUSR"\n Email address: "$EMLUSR""
fi fi
fi fi
# Adding user
echo -e "\nadding user "$NMEUSR" with "$ADDUSR""
echo $GRPUSR