From fc586c204f49f8cd15934cc0df0d3a9f635a66b5 Mon Sep 17 00:00:00 2001 From: Ihor Kolos <72914418+fermion2020@users.noreply.github.com> Date: Thu, 20 Feb 2025 14:31:23 -0600 Subject: [PATCH] Update restore script Switch the mysql command to mariadb to resolve the deprecation warning. Fix the restore issue caused by missing SSL configuration (error message: "TLS/SSL error: SSL is required, but the server does not support it"). --- install/usr/local/bin/restore | 98 ++++++++++++++++++++++++++++++++++- 1 file changed, 97 insertions(+), 1 deletion(-) diff --git a/install/usr/local/bin/restore b/install/usr/local/bin/restore index d863443..96a6cc2 100755 --- a/install/usr/local/bin/restore +++ b/install/usr/local/bin/restore @@ -912,6 +912,83 @@ get_filename() { r_filename=${opt} } +get_ssl() { + if grep -q "^DB${detected_host_num}_MYSQL_ENABLE_TLS=" "${restore_vars}" ; then + detected_ssl_value=$(grep "^DB${detected_host_num}_MYSQL_ENABLE_TLS=" "${restore_vars}" | head -n1 | cut -d '=' -f 2) + fi + + if [[ -z "${detected_ssl_value}" ]]; then + print_debug "Parsed SSL Variant: 1 - No Env Variable Found" + default_ssl="false" # Default if no env variable + q_ssl_variant=1 + q_ssl_menu_opt_default="| (${cwh}N${cdgy}) * " + q_ssl_menu="" #No menu option + else + print_debug "Parsed SSL Variant: 2 - Env Variable DB${detected_host_num}_MYSQL_ENABLE_TLS = '${detected_ssl_value}'" + default_ssl="${detected_ssl_value,,}" + q_ssl_variant=2 + q_ssl_menu="E ) Environment Variable DB${detected_host_num}_MYSQL_ENABLE_TLS: '${detected_ssl_value}'" + q_ssl_menu_opt_default="| (${cwh}E${cdgy}) * " + fi + + cat <