#!/bin/bash set -eo pipefail shopt -s nullglob source /usr/local/bin/docker-entrypoint.sh write_custom_config() { SERVER_ID=${SERVER_ID:-33} READONLY=${READONLY:-1} cat >/etc/mysql/mariadb.conf.d/custom.cnf <> /etc/mysql/mariadb.conf.d/custom.cnf fi } start_cron() { sudo cron -f & } chown_datadir() { sudo chown -R mysql /var/lib/mysql } if ! _is_sourced; then write_custom_config chown_datadir start_cron _main "$@" fi