#!/bin/bash

#keycloak.bash
#scenari.bash
#antifurto.bash
#server.bash
#luci.bash
#cloudappmanager.bash
#domain.bash

for i in `ps | grep "org.json-1.0.0.v201011060100.jar" | grep -v "grep" | awk '{print $1}'`
do
	kill -15 $i
done

: <<'ENDCOMMENT'
for i in ` ps -ef | grep "bash" | grep -v "grep" | grep -v "closeprogetto.bash" | awk '{print $2}' `; do
    echo $i
    kill -15 $i
done
ENDCOMMENT

: <<'END_COMMENT'
for i in ` ps -ef | grep "code.Server" | grep -v grep | awk '{print $2}'`
do
  kill -15 $i
done

for i in ` ps -ef | grep "code.Luci" | grep -v grep | awk '{print $2}'`
do
  kill -15 $i
done

for i in ` ps -ef | grep "scenari.Scenari" | grep -v grep | awk '{print $2}'`
do
  kill -15 $i
done

for i in ` ps -ef | grep "code.Antifurto" | grep -v grep | awk '{print $2}'`
do
  kill -15 $i
done

for i in ` ps -ef | grep "mosquitto_sub" | grep -v grep | awk '{print $2}'`
do
  kill -15 $i
done

for i in ` ps -ef | grep "start-dev" | grep -v grep | awk '{print $2}'`
do
  kill -15 $i
done

for i in ` ps -ef | grep "start.sh" | grep -v grep | awk '{print $2}'`
do
  kill -15 $i
done

for i in ` ps -ef | grep "domain.bash" | grep -v grep | awk '{print $2}'`
do
  kill -15 $i
done

for i in ` ps -ef | grep "CloudAppManager.jar" | grep -v grep | awk '{print $2}'`
do
  kill -15 $i
done
for i in ` ps -ef | grep "cloudappmanager.bash" | grep -v grep | awk '{print $2}'`
do
  kill -15 $i
done
for i in ` ps -ef | grep "RESTHttpServer" | grep -v grep | awk '{print $2}'`
do
  kill -15 $i
done



for i in ` ps -ef | grep "code.Domain" | grep -v grep | awk '{print $2}'`
do
  kill -15 $i
done
END_COMMENT

echo 'tutto chiuso'
