Skip to content

Commit

Permalink
additional error checking on mariadb restart
Browse files Browse the repository at this point in the history
  • Loading branch information
tomjn committed Sep 20, 2024
1 parent dfe0a26 commit b747b6a
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions provision/core/mariadb/provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b747b6a

Please sign in to comment.