circulartext commited on
Commit
26f1ecd
·
1 Parent(s): d0fa205

Update entrypoint.sh

Browse files
Files changed (1) hide show
  1. entrypoint.sh +6 -0
entrypoint.sh CHANGED
@@ -3,6 +3,12 @@
3
  # Get the username from the command line arguments
4
  USERNAME=$1
5
 
 
 
 
 
 
 
6
  # Check if the user already exists
7
  if id "$USERNAME" >/dev/null 2>&1; then
8
  echo "User $USERNAME already exists."
 
3
  # Get the username from the command line arguments
4
  USERNAME=$1
5
 
6
+ # Check if the username is empty
7
+ if [ -z "$USERNAME" ]; then
8
+ echo "No username provided. Exiting..."
9
+ exit 1
10
+ fi
11
+
12
  # Check if the user already exists
13
  if id "$USERNAME" >/dev/null 2>&1; then
14
  echo "User $USERNAME already exists."