Created
January 15, 2013 15:03
-
-
Save matetsu/4539241 to your computer and use it in GitHub Desktop.
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/sh | |
# redis-notify.sh | |
MAIL_FROM="[email protected]" | |
MAIL_TO="[email protected]" | |
if [ "$#" = "2" ]; then | |
mail_subject="Redis Notification" | |
mail_body=`cat << EOB | |
============================================ | |
Redis Notification Script called by Sentinel | |
============================================ | |
Event Type: ${1} | |
Event Description: ${2} | |
Check the redis status. | |
EOB` | |
echo "${mail_body}" | mail -r "${MAIL_FROM}" -s "${mail_subject}" "${MAIL_TO}" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment