Skip to content

Commit

Permalink
Merge branch 'main' into 4.x
Browse files Browse the repository at this point in the history
  • Loading branch information
tiredofit authored Nov 9, 2023
2 parents 8fafdeb + 4a3a79d commit c6a8fb0
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 4.0.3 2023-11-09 <dave at tiredofit dot ca>

### Changed
- Resolve issue with _MYSQL_TLS_CERT_FILE not being read


## 4.0.2 2023-11-09 <dave at tiredofit dot ca>

### Changed
Expand Down
30 changes: 29 additions & 1 deletion install/usr/local/bin/restore
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,40 @@ EOF
esac
fi


control_c() {
#if [ -f "${restore_vars}" ] ; then rm -rf "${restore_vars}" ; fi
if [ -f "${restore_vars}" ] ; then rm -rf "${restore_vars}" ; fi
print_warn "User aborted"
exit
}

get_filename() {
COLUMNS=12
prompt="Please select a file to restore:"
options=( $(find "${DEFAULT_FILESYSTEM_PATH}" -type f -maxdepth 2 -not -name '*.md5' -not -name '*.sha1' -print0 | sort -z | xargs -0) )
PS3="$prompt "
select opt in "${options[@]}" "Custom" "Quit" ; do
if (( REPLY == 2 + ${#options[@]} )) ; then
echo "Bye!"
exit 2
elif (( REPLY == 1 + ${#options[@]} )) ; then
while [ ! -f "${opt}" ] ; do
read -p "What path and filename to restore: " opt
if [ ! -f "${opt}" ] ; then
print_error "File not found. Please retry.."
fi
done
break
elif (( REPLY > 0 && REPLY <= ${#options[@]} )) ; then
break
else
echo "Invalid option. Try another one."
fi
done
COLUMNS=$oldcolumns
r_filename=${opt}
}

get_dbhost() {
p_dbhost=$(basename -- "${r_filename}" | cut -d _ -f 3)
if [ -n "${p_dbhost}" ]; then
Expand Down

0 comments on commit c6a8fb0

Please sign in to comment.