summaryrefslogtreecommitdiffstats
path: root/streams/groove
blob: f3e3719a04f270a523786068e7914c6f743dab2e (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
#! /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 || :
}

case "$1" in
  start)
    start
  stop)
    stop
    ;;
  restart)
    stop
    start
    ;;
  *)
    echo "aidsballs"
  ;;
esac