From ec3825e9387e9d2ff23c1ed462e010e07259b458 Mon Sep 17 00:00:00 2001 From: Etienne Pallier Date: Mon, 16 Jan 2023 14:35:27 +0100 Subject: [PATCH] update kill --- docker/KILL_PYROS_DOCKER_RUN | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/docker/KILL_PYROS_DOCKER_RUN b/docker/KILL_PYROS_DOCKER_RUN index 928d209..c02a7a9 100755 --- a/docker/KILL_PYROS_DOCKER_RUN +++ b/docker/KILL_PYROS_DOCKER_RUN @@ -4,7 +4,7 @@ OS=$(uname) #echo $OS if [[ $OS == "Darwin" ]] ; then - #echo "Mac OS" + #echo "Mac OS" docker exec pyros bash docker/$0 $1 exit fi @@ -16,17 +16,9 @@ DOIT=1 #DOIT=0 [[ $1 == "no" ]] && DOIT=0 -echo -echo "VOICI TOUS LES PROCESSUS LANCÉS POUR PYROS" -echo "------------------------------------------" -echo -echo "(Pour tuer complètement pyros, il faut KILL tous ces processus)" -echo - - +# Function ps_process() { - echo "- Processus $1 :" #ps -efl|grep "$1" | grep -v "grep" | sed "s/ * / /g" | cut -d " " -f 4 ps -efl|grep "$1" | grep -v "grep" @@ -38,9 +30,29 @@ ps_process() { [ $DOIT == 1 ] && kill $p done echo - } + + +echo +echo "1) Try to STOP pyros cleanly... :" +echo "docker exec pyros python3 pyros.py stop" +echo +# ./PYROS stop +docker exec pyros python3 pyros.py stop + + +echo +echo +echo "2) KILL pyros by force... :" +echo +echo "VOICI TOUS LES PROCESSUS LANCÉS POUR PYROS" +echo "------------------------------------------" +echo +echo "(Pour tuer complètement pyros, il faut KILL tous ces processus)" +echo + + # - WEB SERVER ps_process "pyros.py start webserver" ps_process "manage.py runserver" -- libgit2 0.21.2