Mercurial > hg > beaglert
changeset 279:8329f234d914 prerelease
Stop running by parsing the Xenomai stat
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Tue, 17 May 2016 17:42:49 +0100 |
parents | 3c3d042dad12 |
children | 5f17da990d1b 8fecfcbaf2f0 |
files | .hgignore scripts/stop_running.sh |
diffstat | 2 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgignore Tue May 17 16:07:45 2016 +0100 +++ b/.hgignore Tue May 17 17:42:49 2016 +0100 @@ -14,3 +14,4 @@ html/* projects/heavy/hvtemp .*.DS_Store +.*swp
--- a/scripts/stop_running.sh Tue May 17 16:07:45 2016 +0100 +++ b/scripts/stop_running.sh Tue May 17 17:42: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'