#!/bin/sh

# Get current soft limit for open files
current_limit=$(ulimit -Sn)

REQUIRED_FILES_LIMIT=384
# Check if the current limit is less than REQUIRED_FILES_LIMIT
if [ "${current_limit}" -lt "${REQUIRED_FILES_LIMIT}" ]; then
	ulimit -Sn ${REQUIRED_FILES_LIMIT}
fi

# Start buildbox-casd
$(command -v buildbox-casd) "$@"
