#!/bin/bash set -e # Set permissive permissions on the directory chmod -R 777 /path/to/directory # Check if the user already exists if id "$USER_ID" >/dev/null 2>&1; then echo "User with ID $USER_ID already exists." else # Print a message about directory creation being skipped echo "Skipping directory creation under /app. User will be created if needed." fi # Run the CMD or any other command you want to execute exec "$@"