summaryrefslogtreecommitdiffstats
path: root/streams/groove
blob: 2d4a3e28b372b1b83b7be1c185ccf926941afced (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#! /bin/bash
set -euf
function stop()
{
  pkill mplayer || true
}

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
    ;;
  stop)
    stop
    ;;
  restart)
    stop
    start
    ;;
  *)
    echo "aidsballs"
  ;;
esac