Commit ec3825e9387e9d2ff23c1ed462e010e07259b458

Authored by Etienne Pallier
1 parent 237abe05
Exists in dev

update kill

Showing 1 changed file with 23 additions and 11 deletions   Show diff stats
docker/KILL_PYROS_DOCKER_RUN
... ... @@ -4,7 +4,7 @@
4 4 OS=$(uname)
5 5 #echo $OS
6 6 if [[ $OS == "Darwin" ]] ; then
7   - #echo "Mac OS"
  7 + #echo "Mac OS"
8 8 docker exec pyros bash docker/$0 $1
9 9 exit
10 10 fi
... ... @@ -16,17 +16,9 @@ DOIT=1
16 16 #DOIT=0
17 17 [[ $1 == "no" ]] && DOIT=0
18 18  
19   -echo
20   -echo "VOICI TOUS LES PROCESSUS LANCÉS POUR PYROS"
21   -echo "------------------------------------------"
22   -echo
23   -echo "(Pour tuer complètement pyros, il faut KILL tous ces processus)"
24   -echo
25   -
26   -
27 19  
  20 +# Function
28 21 ps_process() {
29   -
30 22 echo "- Processus $1 :"
31 23 #ps -efl|grep "$1" | grep -v "grep" | sed "s/ * / /g" | cut -d " " -f 4
32 24 ps -efl|grep "$1" | grep -v "grep"
... ... @@ -38,9 +30,29 @@ ps_process() {
38 30 [ $DOIT == 1 ] && kill $p
39 31 done
40 32 echo
41   -
42 33 }
43 34  
  35 +
  36 +
  37 +echo
  38 +echo "1) Try to STOP pyros cleanly... :"
  39 +echo "docker exec pyros python3 pyros.py stop"
  40 +echo
  41 +# ./PYROS stop
  42 +docker exec pyros python3 pyros.py stop
  43 +
  44 +
  45 +echo
  46 +echo
  47 +echo "2) KILL pyros by force... :"
  48 +echo
  49 +echo "VOICI TOUS LES PROCESSUS LANCÉS POUR PYROS"
  50 +echo "------------------------------------------"
  51 +echo
  52 +echo "(Pour tuer complètement pyros, il faut KILL tous ces processus)"
  53 +echo
  54 +
  55 +
44 56 # - WEB SERVER
45 57 ps_process "pyros.py start webserver"
46 58 ps_process "manage.py runserver"
... ...