Skip to content
Snippets Groups Projects
progetto.bash 847 B
Newer Older
  • Learn to ignore specific revisions
  • Alfredo Chissotti's avatar
    Alfredo Chissotti committed
    #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)
    
    Alfredo Chissotti's avatar
    Alfredo Chissotti committed
    osascript << EOF
    	tell app "Terminal"
    
    		do script "$mqtt"
    
    Alfredo Chissotti's avatar
    Alfredo Chissotti committed
    	end tell
    EOF
    
    
    
    #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
    cd WebServer && bash server.bash & cd ScenariMicroservizio && bash scenari.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
    
    
    Alfredo Chissotti's avatar
    Alfredo Chissotti committed
    echo '
    tutto chiuso'