#!/bin/bash
if test -f "./running"; then
    echo "running."
else
  echo "Waiting for port 3306 to become available..."
  until nc -z localhost 3306 2>/dev/null
  do
      sleep 1
  done
  echo "MySQL is ready."
  touch running
  mysql --force -uroot -ppassword < /tmp/init.sql
fi


