1
0
mirror of https://github.com/mailcow/mailcow-dockerized.git synced 2024-11-24 08:32:50 +02:00

Proper number of threads regex.

This commit is contained in:
Tomasz Orzechowski 2024-01-09 22:03:24 +01:00
parent cb0b0235f0
commit 6dc0bdbfa3

View File

@ -54,10 +54,10 @@ COMPOSE_FILE=${SCRIPT_DIR}/../docker-compose.yml
ENV_FILE=${SCRIPT_DIR}/../.env
THREADS=$(echo ${THREADS:-1})
if ! [[ "${THREADS}" =~ ^[1-9]+$ ]] ; then
if ! [[ "${THREADS}" =~ ^[1-9][0-9]?$ ]] ; then
echo "Thread input is not a number!"
exit 1
elif [[ "${THREADS}" =~ ^[1-9]+$ ]] ; then
elif [[ "${THREADS}" =~ ^[1-9][0-9]?$ ]] ; then
echo "Using ${THREADS} Thread(s) for this run."
echo "Notice: You can set the Thread count with the THREADS Variable before you run this script."
fi