From 12211d3b6721a859180acc621f78b6bff51dde82 Mon Sep 17 00:00:00 2001 From: "dave@tiredofit.ca" Date: Wed, 8 Jun 2022 09:01:44 -0700 Subject: [PATCH] Release 3.3.5 - See CHANGELOG.md --- CHANGELOG.md | 7 +++++++ install/usr/local/bin/restore | 14 +++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e9f72f6..828b0f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## 3.3.5 2022-06-08 + + ### Changed + - Fix DB Port parameter not being able to be input in restore script + - Fix MongoDB restore questionnaire + + ## 3.3.4 2022-06-03 ### Fixed diff --git a/install/usr/local/bin/restore b/install/usr/local/bin/restore index 35f3e30..007b187 100755 --- a/install/usr/local/bin/restore +++ b/install/usr/local/bin/restore @@ -55,7 +55,7 @@ The image will also allow you to use environment variables or Docker secrets use The script can also be executed skipping the interactive mode by using the following syntax/ - $(basename $0) + $(basename "$0") If you only enter some of the arguments you will be prompted to fill them in. @@ -70,7 +70,7 @@ EOF interactive_mode=true ;; * ) - interactive_mode=false + interactive_mode=false ;; esac fi @@ -78,7 +78,7 @@ fi get_filename() { COLUMNS=12 prompt="Please select a file to restore:" - options=( $(find ${DB_DUMP_TARGET} -type f -maxdepth 1 -not -name '*.md5' -not -name '*.sha1' -print0 | xargs -0) ) + options=( $(find "${DB_DUMP_TARGET}" -type f -maxdepth 1 -not -name '*.md5' -not -name '*.sha1' -print0 | xargs -0) ) PS3="$prompt " select opt in "${options[@]}" "Custom" "Quit" ; do if (( REPLY == 2 + ${#options[@]} )) ; then @@ -641,7 +641,7 @@ EOF 2 ) while true; do read -p "$(echo -e ${clg}** ${cdgy}Enter Value \(${cwh}C${cdgy}\) \| \(${cwh}E${cdgy}\) : ${cwh}${coff}) " q_dbport_menu - case "${q_dbname_menu,,}" in + case "${q_port_menu,,}" in c* ) counter=1 q_dbport=" " @@ -944,12 +944,12 @@ case "${r_dbtype}" in mongo_compression="--gzip" fi if [ -n "${r_dbuser}" ] ; then - mongo_user="-u ${r_dbuser}" + mongo_user="-u=${r_dbuser}" fi if [ -n "${r_dbpass}" ] ; then - mongo_pass="-u ${r_dbpass}" + mongo_pass="-p=${r_dbpass}" fi - mongorestore ${mongo_compression} -d ${r_dbname} -h ${r_dbhost} --port ${r_dbport} ${mongo_user} ${mongo_pass} --archive=${r_filename} + mongorestore ${mongo_compression} -d=${r_dbname} -h=${r_dbhost} --port=${r_dbport} ${mongo_user} ${mongo_pass} --archive=${r_filename} exit_code=$? ;; * )