From 5e148cbd60ee98bc34521ad5259d6194a3ff8a4a Mon Sep 17 00:00:00 2001 From: tpollina Date: Fri, 13 Dec 2019 13:01:38 -0800 Subject: [PATCH] Create kill_image.sh --- scripts/kill_image.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 scripts/kill_image.sh diff --git a/scripts/kill_image.sh b/scripts/kill_image.sh new file mode 100644 index 0000000..0fe0a52 --- /dev/null +++ b/scripts/kill_image.sh @@ -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