Improve user script prompts

This commit is contained in:
2024-06-30 14:29:16 -04:00
parent 270b7f2a38
commit ca6d3d4dcb
2 changed files with 31 additions and 20 deletions

View File

@@ -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