github.com/jlmucb/cloudproxy@v0.0.0-20170830161738-b5aa0b619bc4/go/run/scripts/run_processes.sh (about) 1 #!/bin/bash 2 3 if [ "$#" -ge 1 ]; then 4 export TAO_DOMAIN="$1" 5 elif [ "$TAO_DOMAIN" == "" ]; then 6 echo "Must supply the path to an initialized domain, or set \$TAO_DOMAIN." 7 exit 1 8 fi 9 10 set -o nounset 11 set -o errexit 12 13 gowhich() { 14 WHICH=$(which which) 15 echo -n "$(PATH="${GOPATH//://bin:}/bin" $WHICH "$1")" 16 } 17 18 TAO="$(gowhich tao)" 19 FAKE_PASS=BogusPass 20 21 # Make sure we have sudo privileges before trying to start the tao host 22 sudo test true 23 24 sudo "$TAO" host start -tao_domain "$TAO_DOMAIN" -pass $FAKE_PASS & 25 26 echo "Waiting for linux_host to start" 27 sleep 5 28 29 "$TAO" run demo_server & 30 sleep 2 31 "$TAO" run demo_client 32 33 echo "Shutting down linux_host" 34 sudo "$TAO" host stop -tao_domain "$TAO_DOMAIN"