diff scripts/stop_running.sh @ 281:5f17da990d1b prerelease

merge
author andrewm
date Tue, 17 May 2016 17:49:49 +0100
parents 8329f234d914
children 8fecfcbaf2f0
line wrap: on
line diff
--- a/scripts/stop_running.sh	Tue May 17 17:49:23 2016 +0100
+++ b/scripts/stop_running.sh	Tue May 17 17:49:49 2016 +0100
@@ -4,8 +4,8 @@
 
 BBB_ADDRESS="root@192.168.7.2"
 
-echo "Stopping BeagleRT..."
-
 # The first command should be sufficient to stop any BeagleRT run with
 # these scripts; the second will catch any leftovers run other ways
-ssh $BBB_ADDRESS "screen -X -S BeagleRT quit ; pkill BeagleRT"
\ No newline at end of file
+
+BELA_AUDIO_THREAD_NAME=beaglert-audio 
+ssh $BBB_ADDRESS 'PID=`grep '"$BELA_AUDIO_THREAD_NAME"' /proc/xenomai/stat | cut -d " " -f 5 | sed s/\s//g`; if [ -z $PID ]; then printf ""; else echo "Killing old Bela process $PID"; kill -2 $PID; fi'