Create kill_image.sh

This commit is contained in:
tpollina 2019-12-13 13:01:38 -08:00 committed by GitHub
parent 6c7e68bcb5
commit 5e148cbd60
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

12
scripts/kill_image.sh Normal file
View file

@ -0,0 +1,12 @@
#!/bin/bash
#In order to kill an on going acquisition, type this command
#bash $HOME/PlanktonScope/scripts/kill_image.sh image.py sample_project sample_id acq_id
sample_project=$1
sample_id=$2
acq_id=$3
kill -9 `ps ax | grep "python3.7 image.py" | head -1 | awk '{print $1}'`
rm -r $HOME/PlanktonScope/acquisitions/$sample_project/$sample_id/$acq_id