#!/usr/bin/env bash
# Stop the MIDI listener no matter who started it (button, terminal, hook).
HARNESS="$HOME/Documents/midi-harness"
if pgrep -f "$HARNESS/bin/listener" >/dev/null 2>&1; then
  pkill -f "$HARNESS/bin/listener" 2>/dev/null
  echo "listener stopped"
else
  echo "no listener running"
fi
exit 0
