Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save douglasjarquin/94507 to your computer and use it in GitHub Desktop.
Save douglasjarquin/94507 to your computer and use it in GitHub Desktop.
#!/bin/bash
Slave_IO_Running=`mysql -uroot -ppassword -Bse "show slave status\G" | grep Slave_IO_Running | awk '{ print $2 }'`
Slave_SQL_Running=`mysql -uroot -ppassword -Bse "show slave status\G" | grep Slave_SQL_Running | awk '{ print $2 }'`
if [ $Slave_IO_Running = 'Yes' ] && [ $Slave_SQL_Running = 'Yes' ] ; then
curl -H 'Content-Type: application/xml' -d '<request>
<token>yourbackpackaccounttokengoeshere</token>
<journal-entry>
<body>Your MySQL Slave is up and running.</body>
</journal-entry>
</request>' \
http://domain.backpackit.com/users/######/journal_entries.xml
exit
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment