2025-02-18 19:06:55 +01:00

15 lines
396 B
Bash
Executable File

#!/bin/sh
. /federated/services/pdnsmysql/service
. /federated/apps/pdnsmysql/.env
# Check it is up and running and produces reasonable output
TRIES=5
while ! docker exec pdnsmysql mariadb -p${MYSQL_ROOT_PASSWORD} mysql -e 'SELECT User FROM user WHERE User="root";'; do
TRIES=$((TRIES-1))
if [ "$TRIES" = 0 ]; then
echo "pdnsmysql not responding to SQL queries" >&2
exit 2
fi
done
exit 0