Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Record radio / audio stream (asx/asf) with a webserver
- #!/bin/bash
- #Go to the archive directory:
- cd /aa/icecast/archive
- #Stop the archiving for the last hour:
- kill `cat archivePID`
- #Start recording in the background (&) a new archive file of the stream "http://127.0.0.1:8000/stream.ogg":
- wget http://127.0.0.1:8000/stream.ogg &
- #Get the Process IS for the job we just started:
- echo $! > archivePID
- #Wait a few seconds to make sure the job has started and the archive file has been opened:
- sleep 5
- #Rename the current archive file to a name based on the date and time (YYYYMMDD-HHMM.ogg):
- mv stream.ogg `date +%Y%m%d-%H%M.ogg`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement