diff options
author | Felix Richter <Felix.Richter@syntax-fehler.de> | 2011-06-03 01:23:01 +0200 |
---|---|---|
committer | Felix Richter <Felix.Richter@syntax-fehler.de> | 2011-06-03 01:23:01 +0200 |
commit | c3a23de0b9eb864c74b589fb282941d43b22778c (patch) | |
tree | 5e9e1d2e42da81892723609e475c82276e069490 /streams/groove | |
parent | 2c2d1d05b91aacd24bc00ad966bec572757139bc (diff) |
fixed startup scripts to do the right thing
deepmix and groovesalad are not retarded anymore
Diffstat (limited to 'streams/groove')
-rwxr-xr-x | streams/groove | 19 |
1 files changed, 9 insertions, 10 deletions
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 ;; |