Last active
August 29, 2015 14:19
-
-
Save XDjackieXD/1ed0dbea22385bcd0b12 to your computer and use it in GitHub Desktop.
a modified version of isonline.sh that works with nginx-rtmp module (the -B option of rtmpdump doesn't work with it...)
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 | |
timeout 15 rtmpdump -q -v -r $1 -o /dev/null -m 5 | |
if [[ $? -eq 124 ]] | |
then | |
if [[ ! -f /tmp/online.txt ]] | |
then | |
echo "the stream you want to watch is online!" | mail -s "Stream Online!" -a "FROM:sender@example.org" receiver@example.org | |
touch /tmp/online.txt | |
fi | |
else | |
rm -f /tmp/online.txt | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment