Guest User

Untitled

a guest
Mar 19th, 2018
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. #!/usr/bin/env bash
  2.  
  3. find . -name "*.mp3" -print | sort > "tracks.pls"
  4. if [[ "$1" == "openmic" ]]; then
  5. liquidsoap 'output.icecast(%mp3(bitrate=192), host="anonradio.net", port=8010, user="openmic", password="<password>", mount="/openmic", mksafe(playlist.once("tracks.pls")))'
  6. else
  7. liquidsoap 'out(playlist.once("tracks.pls"))'
  8. fi
  9.  
  10. function finish {
  11. if [[ -f "tracks.pls" ]]; then
  12. rm "tracks.pls"
  13. fi
  14. }
  15. trap finish EXIT
Add Comment
Please, Sign In to add comment