From cce367c6651abb790bc213389f86c6cab43023e9 Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Tue, 24 Sep 2019 16:15:35 +0200 Subject: [PATCH] added a watchdog to clean up everything after we are done --- distributions/raspijamulus.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/distributions/raspijamulus.sh b/distributions/raspijamulus.sh index e4f1d34b..4f2422c3 100755 --- a/distributions/raspijamulus.sh +++ b/distributions/raspijamulus.sh @@ -87,6 +87,15 @@ if [ "$1" == "opt" ]; then ./distributions/jack2/build/example-clients/jack_connect fluidsynth:left "Jamulus:input left" ./distributions/jack2/build/example-clients/jack_connect fluidsynth:right "Jamulus:input right" aconnect 'USB-MIDI' 128 + + # watchdog: if MIDI device is turned off, shutdown Jamulus + while [ ! -z "$(amidi -l|grep "USB-MIDI")" ]; do + sleep 1 + done + killall jackd + killall fluidsynth + echo "Cleaned up jackd, Jamulus and fluidsynth" + else ./Jamulus -n -c jamulus.fischvolk.de fi