public
nobgit
read
NobMail
Based on mailcow: dockerized
Languages
Repository composition by tracked source files.
PHP
49%
JavaScript
35%
HTML
9%
CSS
4%
Shell
2%
Python
1%
Lua
0%
Perl
0%
Ruby
0%
SCSS
0%
Create file
Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git
Commit
Removed Thread Prompt and set default value to 1 Thread
6306c455
helper-scripts/backup_and_restore.sh | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
Diff
diff --git a/helper-scripts/backup_and_restore.sh b/helper-scripts/backup_and_restore.sh
index bf173a5f..372e9ccc 100755
--- a/helper-scripts/backup_and_restore.sh
+++ b/helper-scripts/backup_and_restore.sh
@@ -48,21 +48,13 @@ else
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#/$##')
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
COMPOSE_FILE=${SCRIPT_DIR}/../docker-compose.yml
ENV_FILE=${SCRIPT_DIR}/../.env
-THREADS=$(echo ${THREADS})
+THREADS=$(echo ${THREADS:-1})
+
+echo $THREADS
if [ ! -f ${COMPOSE_FILE} ]; then
echo "Compose file not found"