Last active
September 13, 2018 16:53
-
-
Save aaronhenshaw/d3c206a07fd86e286da3974da22979de to your computer and use it in GitHub Desktop.
Script for monitoring reward call and sending SMS
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
#!/bin/bash | |
journalctl -u livepeer-transcoder.service -f | \ | |
while read line ; do | |
echo "$line" | grep "Called reward for round" | |
if [ $? = 0 ] | |
then | |
curl -s -d "to=%2Byour_number" -d "body=Completed Reward Call!" https://utils.lib.id/sms@1.0.4/ | |
fi | |
echo "$line" | grep "Invoking transaction: \"reward\"" | |
if [ $? = 0 ] | |
then | |
curl -s -d "to=%2Byour_number" -d "body=Started Reward Call!" https://utils.lib.id/sms@1.0.4/ | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment