#!/bin/bash # the mysql database files will be missing if this is the first startup after a fresh install if [ ! -d "{{ pillar["database"]["dirs"]["var_lib_mysql"]["name"] }}/mysql" ]; then export DEBIAN_FRONTEND=noninteractive . /etc/profile debconf-set-selections /etc/mysql/conf.d/debconfrc dpkg-reconfigure mariadb-server-10.2 fi /etc/mysql/bin/fix_permissions.sh & /etc/init.d/xinetd start exec /usr/sbin/mysqld ${@}