#! /bin/bash
set -euf
CMD="exec mplayer http://somafm.com/groovesalad.pls"
function start() {
  stop
  tmux start-server 
  tmux new-session -d "$CMD" 
}
function stop()
{
  pkill mplayer || :
}

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