Mercurial > hg > beaglert
comparison scripts/stop_running.sh @ 286:8fecfcbaf2f0 prerelease
Re-introduced screen stop
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Tue, 17 May 2016 18:16:26 +0100 |
parents | 8329f234d914 |
children | 6e428d6b57ef |
comparison
equal
deleted
inserted
replaced
279:8329f234d914 | 286:8fecfcbaf2f0 |
---|---|
1 #!/bin/bash | 1 #!/bin/bash |
2 # | 2 # |
3 # This script stops the BeagleRT program running on the BeagleBone. | 3 # This script stops the BeagleRT program running on the BeagleBone. |
4 | 4 |
5 BBB_ADDRESS="root@192.168.7.2" | 5 BBB_ADDRESS="root@192.168.7.2" |
6 | 6 BBB_SCREEN_NAME="BeagleRT" |
7 # The first command should be sufficient to stop any BeagleRT run with | 7 # The first command should be sufficient to stop any BeagleRT run with |
8 # these scripts; the second will catch any leftovers run other ways | 8 # these scripts; the second will catch any leftovers run other ways |
9 | 9 |
10 BELA_AUDIO_THREAD_NAME=beaglert-audio | 10 BELA_AUDIO_THREAD_NAME=beaglert-audio |
11 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' | 11 ssh $BBB_ADDRESS 'screen -X -S '"$BBB_SCREEN_NAME"' quit > /dev/null; 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' |