summaryrefslogtreecommitdiffstats
path: root/streams
diff options
context:
space:
mode:
authorFelix Richter <Felix.Richter@syntax-fehler.de>2011-06-03 01:23:01 +0200
committerFelix Richter <Felix.Richter@syntax-fehler.de>2011-06-03 01:23:01 +0200
commitcefaa5edf82a0c119970645c999e416c8fee389f (patch)
tree599db99dac5f7384bb18e9037b37fd47d25358ed /streams
parentdc7aa27e51865ff9b9e4f3101469036e277ec557 (diff)
fixed startup scripts to do the right thing
deepmix and groovesalad are not retarded anymore
Diffstat (limited to 'streams')
-rwxr-xr-xstreams/deepmix4
-rwxr-xr-xstreams/groove19
2 files changed, 11 insertions, 12 deletions
diff --git a/streams/deepmix b/streams/deepmix
index 8b13bed6..89a1ce8e 100755
--- a/streams/deepmix
+++ b/streams/deepmix
@@ -1,11 +1,11 @@
#! /bin/bash
set -euf
-CMD="while :; do mplayer http://deepmix.ru/deepmix128.pls; done"
+CMD="mplayer http://deepmix.ru/deepmix128.pls"
function start() {
stop
tmux list-sessions &&
tmux new-window "$CMD" ||
- tmux new-session "$CMD"
+ tmux new-session "$CMD" ||
}
function stop() {
pkill mplayer || :
diff --git a/streams/groove b/streams/groove
index 2d4a3e28..f3e3719a 100755
--- a/streams/groove
+++ b/streams/groove
@@ -1,21 +1,20 @@
#! /bin/bash
set -euf
+CMD="mplayer http://somafm.com/groovesalad.pls"
+function start() {
+ stop
+ tmux list-sessions &&
+ tmux new-window "$CMD" ||
+ tmux new-session "$CMD" ||
+}
function stop()
{
- pkill mplayer || true
+ pkill mplayer || :
}
-CMD="while true; do exec mplayer http://somafm.com/groovesalad.pls; sleep 1;done"
case "$1" in
start)
- stop
- if tmux list-sessions;
- then
- tmux new-window "$CMD" &
- else
- tmux new-session "$CMD" &
- fi
- ;;
+ start
stop)
stop
;;