Skip to content
Snippets Groups Projects
Commit b3ec023e authored by Elisa Giglio's avatar Elisa Giglio
Browse files
update
parents c4837f25 60af8499
No related branches found
No related tags found
No related merge requests found
No preview for this file type
No preview for this file type
No preview for this file type
#!/bin/bash
#creo un nuovo terminale per ascoltare mosquitto
#screen -c -X "mosquitto_sub -t '#' -h luci.local -u gruppo2 -P funziona -v" &
mqtt=$(cat ./mqtt.txt)
#inserite al fondo della seguente riga il comando che vi serve per far partire il vostro microservizio, facendo attenzione a farlo precedere da una & per eseguire il tutto in parallelo; la doppia && serve per far eseguire le operazioni una dopo l'altra
#per luci: basta rimuovere il cancelletto qui sotto
cd WebServer && bash server.bash $1 & cd ScenariMicroservizio && bash scenari.bash $1 & cd antifurto && bash antifurto.bash $1 #& cd LuciMicro && bash luci.bash
#chiudo tutto il resto
#tokill=$(ps | grep 'progetto.bash' && ps | grep 'code.Server' && ps | grep 'server.bash')
#nogrep=$(grep -wv grep <<< "$tokill")
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
echo '
tutto chiuso'
#!/bin/bash
#creo un nuovo terminale per ascoltare mosquitto
#screen -c -X "mosquitto_sub -t '#' -h luci.local -u gruppo2 -P funziona -v" &
mqtt=$(cat ./mqtt.txt)
osascript << EOF
tell app "Terminal"
do script "$mqtt"
end tell
if [[ whoami -eq 'alfredochissotti' ]]; then
mqtt=$(cat ./mqtt.txt)
osascript << EOF
tell app "Terminal"
do script "$mqtt"
end tell
EOF
fi
#inserite al fondo della seguente riga il comando che vi serve per far partire il vostro microservizio, facendo attenzione a farlo precedere da una & per eseguire il tutto in parallelo; la doppia && serve per far eseguire le operazioni una dopo l'altra
#per luci: basta rimuovere il cancelletto qui sotto
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment