diff options
Diffstat (limited to 'streams')
-rw-r--r-- | streams/Makefile | 7 | ||||
-rw-r--r-- | streams/stream.db | 12 | ||||
-rwxr-xr-x | streams/streams | 13 |
3 files changed, 27 insertions, 5 deletions
diff --git a/streams/Makefile b/streams/Makefile index 0922e38f..ab5d1429 100644 --- a/streams/Makefile +++ b/streams/Makefile @@ -1,11 +1,16 @@ INITD = $(shell test -e /etc/rc.d/ && echo /etc/rc.d/ || echo /etc/init.d/) streams = $(shell cut -d\ -f2 stream.db) + + CURRDIR = ${PWD} .PHONY: all $(streams) +local: ../bin/streams +../bin/streams: + ln -sf $$PWD/streams ../bin/streams all: $(streams) @update-rc.d groove defaults 2>/dev/null || echo "[31;1m**[31;1;5m put groove daemon in DAEMONS in /etc/rc.conf[m" -$(streams): +$(streams): local @test -L $(INITD)$@ || test ! -e $(INITD)$@ && \ ln -n -s -f $$PWD/stream-starter $(INITD)$@ && echo "writing $@ to $(INITD)" diff --git a/streams/stream.db b/streams/stream.db index 10684d23..cdf1c329 100644 --- a/streams/stream.db +++ b/streams/stream.db @@ -1,7 +1,15 @@ http://deepmix.ru/deepmix128.pls deepmix http://streams.xenim.de/radiotux.ogg radiotux http://bassdrive.com/v2/streams/BassDrive.pls bassdrive -http://somafm.com/illstreet.pls illstreet +http://localhost:8000/stream.ogg icecast +http://localhost:8000/shice.ogg shice +http://stream2.jungletrain.net:8000 jungletrain +http://playlist.tormentedradio.com/tormentedradio.pls tormented +http://filebitch.shack:8000 mpd +http://radio.krautchan.net:8000/radio.mp3 radiofreieskrautchan +http://nl1.streamhosting.ch/listen.pls lounge +http://deluxetelevision.com/livestreams/radio/DELUXE_RADIO.pls deluxe +http://livestream.radiodarmstadt.de:8000 darmstadt http://somafm.com/sxfm.pls southbysoma http://somafm.com/indiepop.pls indypop http://somafm.com/poptron.pls poptron @@ -23,4 +31,4 @@ http://somafm.com/lush.pls lush http://somafm.com/digitalis.pls digitalis http://somafm.com/sonicuniverse.pls sonicuniverse http://somafm.com/doomed.pls doomed -http://somafm.com/brfm.pls blackrockfm
\ No newline at end of file +http://somafm.com/brfm.pls blackrockfm diff --git a/streams/streams b/streams/streams index 607fd9e5..80c654ad 100755 --- a/streams/streams +++ b/streams/streams @@ -1,4 +1,8 @@ #! /bin/bash +set -euf + +stream_file=/tmp/krebs.stream.current + HERE=$(dirname $(readlink -f $0)) URLS=`cat $HERE/stream.db` CURRENT_STREAM="no stream" #will be set when calling `status` @@ -22,7 +26,12 @@ function start() { if echo "$URLS" | while read URL NAME; do if [ "$NAME" = "$REQ" ];then - tmux new-session -s streams -n streams -d "exec mplayer $URL" + tmux new-session -s streams -n streams -d " + while sleep 1; do + echo $NAME > $stream_file + mplayer $URL + done + " echo "** $REQ started" exit 1 fi @@ -97,7 +106,7 @@ Examples: case "$1" in start) - start $2 + start ${2-"`test -f $stream_file && cat $stream_file`"} ;; stop) stop |