@@ -125,10 +125,8 @@ function mysql_setup() {
125125 vvv_info " * Copied /srv/provision/core/mariadb/config/debian.cnf to /etc/mysql/debian.cnf"
126126
127127 # Due to systemd dependencies, in docker, mysql service is not auto started
128- # also docker isn't systemd based, so the service name is different: see: https://mariadb.com/kb/en/systemd/ vs https://mariadb.com/kb/en/sysvinit/
129- mysql_service_name=$( vvv_get_mysql_service_name)
130128 vvv_info " * Ensuring MariaDB service is started"
131- service " ${mysql_service_name[@]} " status > /dev/null || service " ${mysql_service_name[@]} " start
129+ service mariadb status > /dev/null || service mariadb start
132130
133131 if [ ! -f /.dockerenv ]; then
134132 check_mysql_root_password
@@ -137,19 +135,19 @@ function mysql_setup() {
137135 # MySQL gives us an error if we restart a non running service, which
138136 # happens after a `vagrant halt`. Check to see if it's running before
139137 # deciding whether to start or restart.
140- if service " ${mysql_service_name[@]} " status > /dev/null; then
138+ if service mariadb status > /dev/null; then
141139 vvv_info " * Restarting the mariadb service"
142- if ! service " ${mysql_service_name[@]} " restart; then
140+ if ! service mariadb restart; then
143141 vvv_error " * Restarting the MariaDB failed! Fetching service status."
144- service " ${mysql_service_name[@]} " status
142+ service mariadb status
145143 exit 1
146144 fi
147145 else
148- vvv_info " * Starting mariadb service"
149- service " ${mysql_service_name[@]} " start
150- if ! service " ${mysql_service_name[@]} " start; then
146+ vvv_info " * Restarting mariadb service"
147+ service mariadb start
148+ if ! service mariadb start; then
151149 vvv_error " * Starting MariaDB failed! Fetching service status."
152- service " ${mysql_service_name[@]} " status
150+ service mariadb status
153151 exit 1
154152 fi
155153 fi
0 commit comments