

echo "Starting Middlebox"
../middlebox 8423 127.0.0.1:8423 simpleMiddlebox ./replacementScript.sh &
mboxpid=$(pidof ../mcmbox)

#sleep .3

echo "Starting Server"
../server ./simpleEchoScript.sh &
serverpid=$(pidof ../mcserver)

#sleep .3

n=0; while [[ $n -lt $1 ]]; do

    n=$((n+1))
    echo "Starting Client"
    ../client simple_input.json

done;

echo "Cleaning up"
kill $mboxpid
kill $serverpid

