From b747b6a3ba5439a3136e4ba03f51faf36747c9dc Mon Sep 17 00:00:00 2001 From: Tom J Nowell Date: Fri, 20 Sep 2024 12:57:14 +0100 Subject: [PATCH] additional error checking on mariadb restart --- provision/core/mariadb/provision.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/provision/core/mariadb/provision.sh b/provision/core/mariadb/provision.sh index 1077c5a3b..bb6a83ef1 100644 --- a/provision/core/mariadb/provision.sh +++ b/provision/core/mariadb/provision.sh @@ -136,11 +136,20 @@ function mysql_setup() { # happens after a `vagrant halt`. Check to see if it's running before # deciding whether to start or restart. if service mariadb status > /dev/null; then - vvv_info " * Starting the mariadb service" - service mariadb restart + vvv_info " * Restarting the mariadb service" + if ! service mariadb restart; then + vvv_error " * Restarting the MariaDB failed! Fetching service status." + service mariadb status + exit 1 + fi else vvv_info " * Restarting mariadb service" service mariadb start + if ! service mariadb start; then + vvv_error " * Starting MariaDB failed! Fetching service status." + service mariadb status + exit 1 + fi fi # IMPORT SQL