Skip to content
Snippets Groups Projects
Select Git revision
  • 37e3439d956fc9ce7fc3974019f0c5262f31b165
  • master default
  • feature_scripts
  • develop
  • feature_without_logging
  • feature_opc_server
  • feature_seperate_apps
  • fix_raspi_cmake
  • ss19 protected
  • ss20
10 results

start_server.sh

Blame
  • Armin Co's avatar
    Armin Co authored
    37e3439d
    History
    start_server.sh 381 B
    #!/bin/bash
    
    # Start server
    ./build/smart_grid.exe &
    SMART_GRID_PID=$!
    echo Smart Grid PID: $SMART_GRID_PID
    
    # Wait for exit
    echo "Press 'q' to exit"
    while : ; do
        read -n 1 key <&1
    
        if [[ $key = q ]] ; then
            printf "\nQuitting from the program\n"
            kill $SMART_GRID_PID
            ./all_off.sh
            break
        else
            echo "\nPress 'q' to exit"
        fi
    done