Last active
September 3, 2016 07:32
-
-
Save jlisic/732e359566f63ef27655861f82a109e5 to your computer and use it in GitHub Desktop.
ATP Live Stream Recorder or Something Like That!
This file contains hidden or 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 | |
# script to use with cron to capture the live stream | |
# this script is under no real license, and may give your dog | |
# lice, catch you on file, and is not warranted for any purpose | |
# what-so-ever | |
# to use with cron every 10min use | |
# crontab -e | |
# then add | |
# 5 * * * * ~/src/atp/atp.sh | |
# check this with | |
# crontab -l | |
STREAMING=`ps waux | egrep LiveATP.mp3 | wc -l` | |
echo $STREAMING | |
if [ $STREAMING -gt 1 ] ; then | |
echo "STREAMING NOW"; | |
else | |
wget -O LiveATP.mp3 "http://marco.org:8001/listen" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment