File size: 525 Bytes
80db73d
2a51fee
45e3447
dfd32bf
 
2a51fee
dfd32bf
dca556b
02f7e02
90b2859
 
dca556b
90b2859
02f7e02
 
87aacc5
5783142
2a51fee
80db73d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash
set -e

# Check if the user already exists
if id "$USER_ID" >/dev/null 2>&1; then
  echo "User with ID $USER_ID already exists."
else
  # Create a home directory for the user in the current working directory
  mkdir -p -m 777 "/app/home/user"

  # Copy the contents of /etc/skel to the user's home directory
  cp -r /etc/skel/* "/app/home/user/"

  # Set overly permissive ownership of the user's home directory
  chmod -R 777 "/app/home/user"
fi

# Run the CMD or any other command you want to execute
exec "$@"