function test_mysql {
    mysqladmin -b -s -h "mysql" ping
}

sleep 1

until (test_mysql); do
    sleep 1
done

echo "WP CLI init";

wp core update --force;
wp core update-db --network;
wp core language update;

wp language core update;
wp language theme update --all;
wp language plugin update --all;

echo "WP CLI done. Ready to use.";
