Improve user script prompts
This commit is contained in:
@@ -11,11 +11,12 @@ unset user
|
||||
|
||||
is_root
|
||||
|
||||
echo "This script supports one optional argument, a username"
|
||||
|
||||
if [[ $# -eq 1 ]]; then
|
||||
user="$1"
|
||||
else
|
||||
echo "Must provide exactly one argument (username)"
|
||||
exit 1
|
||||
prompt user
|
||||
fi
|
||||
|
||||
if ! id -u "$user"; then
|
||||
|
||||
Reference in New Issue
Block a user