summaryrefslogtreecommitdiffstats
path: root/modules/streams/deepmix
blob: 55f641e437a627366d36adb101fcff84ab29bf34 (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://deepmix.ru/deepmix19.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