Skip to content

Instantly share code, notes, and snippets.

@aaronhenshaw
Last active September 13, 2018 16:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aaronhenshaw/d3c206a07fd86e286da3974da22979de to your computer and use it in GitHub Desktop.
Save aaronhenshaw/d3c206a07fd86e286da3974da22979de to your computer and use it in GitHub Desktop.
Script for monitoring reward call and sending SMS
#!/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