Removed thread prompt again. Added notice message
This commit is contained in:
parent
65ca42ca42
commit
b73d879f3c
@ -48,22 +48,20 @@ else
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z ${THREADS} ]]; then
|
|
||||||
read -ep "How many threads do you want to use? (Default $(echo "CPU threads: $(grep -c processor /proc/cpuinfo)" | grep -E -o "[0-9]+")):" THREADS
|
|
||||||
THREADS=${THREADS:-$(echo "CPU threads: $(grep -c processor /proc/cpuinfo)" | grep -E -o "[0-9]+")}
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! [[ "${THREADS}" =~ ^[0-9]+$ ]] ; then
|
|
||||||
echo "Thread input is not a number!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
BACKUP_LOCATION=$(echo ${BACKUP_LOCATION} | sed 's#/$##')
|
BACKUP_LOCATION=$(echo ${BACKUP_LOCATION} | sed 's#/$##')
|
||||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
COMPOSE_FILE=${SCRIPT_DIR}/../docker-compose.yml
|
COMPOSE_FILE=${SCRIPT_DIR}/../docker-compose.yml
|
||||||
ENV_FILE=${SCRIPT_DIR}/../.env
|
ENV_FILE=${SCRIPT_DIR}/../.env
|
||||||
THREADS=$(echo ${THREADS:-1})
|
THREADS=$(echo ${THREADS:-1})
|
||||||
|
|
||||||
|
if ! [[ "${THREADS}" =~ ^[1-9]+$ ]] ; then
|
||||||
|
echo "Thread input is not a number!"
|
||||||
|
exit 1
|
||||||
|
elif [[ "${THREADS}" =~ ^[1-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
|
||||||
|
|
||||||
if [ ! -f ${COMPOSE_FILE} ]; then
|
if [ ! -f ${COMPOSE_FILE} ]; then
|
||||||
echo "Compose file not found"
|
echo "Compose file not found"
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user