@@ -55,7 +55,7 @@ The image will also allow you to use environment variables or Docker secrets use
5555
5656The script can also be executed skipping the interactive mode by using the following syntax/
5757
58- $(basename $0 ) <filename> <db_type> <db_hostname> <db_name> <db_user> <db_pass> <db_port>
58+ $(basename "$0" ) <filename> <db_type> <db_hostname> <db_name> <db_user> <db_pass> <db_port>
5959
6060If you only enter some of the arguments you will be prompted to fill them in.
6161
7070 interactive_mode=true
7171 ;;
7272 * )
73- interactive_mode=false
73+ interactive_mode=false
7474 ;;
7575 esac
7676fi
7777
7878get_filename() {
7979 COLUMNS=12
8080 prompt="Please select a file to restore:"
81- options=( $(find ${DB_DUMP_TARGET} -type f -maxdepth 1 -not -name '*.md5' -not -name '*.sha1' -print0 | xargs -0) )
81+ options=( $(find " ${DB_DUMP_TARGET}" -type f -maxdepth 1 -not -name '*.md5' -not -name '*.sha1' -print0 | xargs -0) )
8282 PS3="$prompt "
8383 select opt in "${options[@]}" "Custom" "Quit" ; do
8484 if (( REPLY == 2 + ${#options[@]} )) ; then
641641 2 )
642642 while true; do
643643 read -p "$(echo -e ${clg}** ${cdgy}Enter Value \(${cwh}C${cdgy}\) \| \(${cwh}E${cdgy}\) : ${cwh}${coff}) " q_dbport_menu
644- case "${q_dbname_menu ,,}" in
644+ case "${q_port_menu ,,}" in
645645 c* )
646646 counter=1
647647 q_dbport=" "
@@ -944,12 +944,12 @@ case "${r_dbtype}" in
944944 mongo_compression="--gzip"
945945 fi
946946 if [ -n "${r_dbuser}" ] ; then
947- mongo_user="-u ${r_dbuser}"
947+ mongo_user="-u= ${r_dbuser}"
948948 fi
949949 if [ -n "${r_dbpass}" ] ; then
950- mongo_pass="-u ${r_dbpass}"
950+ mongo_pass="-p= ${r_dbpass}"
951951 fi
952- mongorestore ${mongo_compression} -d ${r_dbname} -h ${r_dbhost} --port ${r_dbport} ${mongo_user} ${mongo_pass} --archive=${r_filename}
952+ mongorestore ${mongo_compression} -d= ${r_dbname} -h= ${r_dbhost} --port= ${r_dbport} ${mongo_user} ${mongo_pass} --archive=${r_filename}
953953 exit_code=$?
954954 ;;
955955 * )
0 commit comments