fix: wildcard case order

mongoDB restore always dropped schema, irrespective of flag variant, due to wildcard being the first option in case.
This commit is contained in:
logicoa
2025-05-12 11:18:43 +02:00
committed by GitHub
parent 9d5406b6a9
commit 5ab0cbe7c5

View File

@@ -1132,9 +1132,6 @@ EOF
echo -e "${coff}"
read -p "$(echo -e ${clg}** ${cdgy}Enter Value \(${cwh}Y${cdgy}\) \| \(${cwh}N${cdgy}\) \| \(${cwh}Q${cdgy}\) : ${cwh}${coff})" q_menu_mongo_dropdb
case "${q_menu_mongo_dropdb,,}" in
"y" | "yes" | * )
mongo_dropdb="--drop"
;;
"n" | "update" )
unset mongo_dropdb
;;
@@ -1142,6 +1139,9 @@ EOF
print_info "Quitting Script"
exit 1
;;
"y" | "yes" | * )
mongo_dropdb="--drop"
;;
esac
print_info "Restoring '${r_filename}' into '${r_dbhost}'/'${r_dbname}'"