#!/bin/bash
# The socket/pid runtime directory is created by systemd-tmpfiles under systemd;
# under s6 the service must create it itself before mariadbd starts.
install -o mysql -g mysql -m 0755 -d /run/mysqld
# s6-notifyoncheck runs the daemon and polls data/check (mariadb-admin ping),
# signalling readiness on the notification-fd once the server accepts connections.
exec s6-notifyoncheck -d -n 30 -- run-script-daemon mariadb
