-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1d81364
commit aa25f98
Showing
2 changed files
with
27 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
# Run the MySQL query and store the result in a Bash variable | ||
|
||
wsrep_ready=`/bin/cat /secrets/mariadb-root-password | /usr/bin/mysql -h $3 -u root -p -e "SELECT VARIABLE_VALUE FROM information_schema.global_status WHERE VARIABLE_NAME = 'wsrep_ready';" -N` | ||
if [ $? -ne 0 ]; then | ||
echo Error: Unable to connect to MySQL or query failed | ||
exit 1 | ||
fi | ||
|
||
if [ $wsrep_ready != "ON" ]; then | ||
echo Error: wsrep_ready is not ON, actual status is: $WSREP_READY | ||
exit 1 | ||
fi | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters