diff --git a/src/end_processes b/src/end_processes index ae40e674..69e6097e 100755 --- a/src/end_processes +++ b/src/end_processes @@ -23,7 +23,7 @@ while true; do done while true; do - sikuli_process_id="$(ps -x | grep tagui\.sikuli | grep -v 'grep tagui\.sikuli'| sed -e 's/^[ ]*//' | cut -d' ' -f 1 | sort -nur | head -n 1)" + sikuli_process_id="$(ps -x | grep tagui\.sikuli | grep -v 'grep tagui\.sikuli' | sed -e 's/^[ ]*//' | cut -d' ' -f 1 | sort -nur | head -n 1)" if [ -n "$sikuli_process_id" ]; then kill $sikuli_process_id > /dev/null 2>&1 else @@ -32,7 +32,7 @@ while true; do done while true; do - python_process_id="$(ps -x | grep tagui_py\.py | grep -v 'grep tagui_py\.py'| sed -e 's/^[ ]*//' | cut -d' ' -f 1 | sort -nur | head -n 1)" + python_process_id="$(ps -x | grep tagui_py\.py | grep -v 'grep tagui_py\.py' | sed -e 's/^[ ]*//' | cut -d' ' -f 1 | sort -nur | head -n 1)" if [ -n "$python_process_id" ]; then kill $python_process_id > /dev/null 2>&1 else @@ -41,7 +41,7 @@ while true; do done while true; do - r_process_id="$(ps -x | grep tagui_r\.R | grep -v 'grep tagui_r\.R'| sed -e 's/^[ ]*//' | cut -d' ' -f 1 | sort -nur | head -n 1)" + r_process_id="$(ps -x | grep tagui_r\.R | grep -v 'grep tagui_r\.R' | sed -e 's/^[ ]*//' | cut -d' ' -f 1 | sort -nur | head -n 1)" if [ -n "$r_process_id" ]; then kill $r_process_id > /dev/null 2>&1 else @@ -50,7 +50,7 @@ while true; do done while true; do - tagui_process_id="$(ps -x | grep /tagui/src | grep -v 'grep /tagui/src'| sed -e 's/^[ ]*//' | cut -d' ' -f 1 | sort -nur | head -n 1)" + tagui_process_id="$(ps -x | grep tagui/src | grep -v 'grep tagui/src' | grep -v 'end_processes' | sed -e 's/^[ ]*//' | cut -d' ' -f 1 | sort -nur | head -n 1)" if [ -n "$tagui_process_id" ]; then kill $tagui_process_id > /dev/null 2>&1 else