docker-mariadb-backup-slave/healthcheck.sh
paspo fd3e93421d
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
added healthcheck
2019-11-24 17:33:44 +01:00

8 lines
228 B
Bash
Executable File

#!/bin/bash
RES=$(mysql -uroot -p"$MYSQL_ROOT_PASSWORD" -e 'SHOW SLAVE STATUS\G' | egrep '(Slave_IO_Running|Slave_SQL_Running):' | awk -F: '{print $2}' | tr '\n' ',')
if [ "$RES" = " Yes, Yes," ]; then
exit 0
fi
exit 1