Skip to content

Commit c6a8fb0

Browse files
authored
Merge branch 'main' into 4.x
2 parents 8fafdeb + 4a3a79d commit c6a8fb0

File tree

2 files changed

+35
-1
lines changed

2 files changed

+35
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 4.0.3 2023-11-09 <dave at tiredofit dot ca>
2+
3+
### Changed
4+
- Resolve issue with _MYSQL_TLS_CERT_FILE not being read
5+
6+
17
## 4.0.2 2023-11-09 <dave at tiredofit dot ca>
28

39
### Changed

install/usr/local/bin/restore

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,40 @@ EOF
7474
esac
7575
fi
7676

77+
7778
control_c() {
78-
#if [ -f "${restore_vars}" ] ; then rm -rf "${restore_vars}" ; fi
79+
if [ -f "${restore_vars}" ] ; then rm -rf "${restore_vars}" ; fi
7980
print_warn "User aborted"
8081
exit
8182
}
8283

84+
get_filename() {
85+
COLUMNS=12
86+
prompt="Please select a file to restore:"
87+
options=( $(find "${DEFAULT_FILESYSTEM_PATH}" -type f -maxdepth 2 -not -name '*.md5' -not -name '*.sha1' -print0 | sort -z | xargs -0) )
88+
PS3="$prompt "
89+
select opt in "${options[@]}" "Custom" "Quit" ; do
90+
if (( REPLY == 2 + ${#options[@]} )) ; then
91+
echo "Bye!"
92+
exit 2
93+
elif (( REPLY == 1 + ${#options[@]} )) ; then
94+
while [ ! -f "${opt}" ] ; do
95+
read -p "What path and filename to restore: " opt
96+
if [ ! -f "${opt}" ] ; then
97+
print_error "File not found. Please retry.."
98+
fi
99+
done
100+
break
101+
elif (( REPLY > 0 && REPLY <= ${#options[@]} )) ; then
102+
break
103+
else
104+
echo "Invalid option. Try another one."
105+
fi
106+
done
107+
COLUMNS=$oldcolumns
108+
r_filename=${opt}
109+
}
110+
83111
get_dbhost() {
84112
p_dbhost=$(basename -- "${r_filename}" | cut -d _ -f 3)
85113
if [ -n "${p_dbhost}" ]; then

0 commit comments

Comments
 (0)