Skip to content

Instantly share code, notes, and snippets.

@jlisic
Last active September 3, 2016 07:32
Show Gist options
  • Save jlisic/732e359566f63ef27655861f82a109e5 to your computer and use it in GitHub Desktop.
Save jlisic/732e359566f63ef27655861f82a109e5 to your computer and use it in GitHub Desktop.
ATP Live Stream Recorder or Something Like That!
#!/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