import repository from arizona
[raven.git] / publish / digdug / kong / prepare
1 #!/bin/bash
2 # This stub script is used to prepare your experiment
3
4 # launch the pong program into the background
5
6 pkill -f ".*pong.py"
7 chmod +x /usr/local/bin/pong.py
8 nohup /usr/local/bin/pong.py > /dev/null 2> /dev/null < /dev/null &
9
10 # wait for the pong program to write its port out to a file
11
12 while [ ! -f /var/kong/results/mem_pong_port ]; do
13     sleep 1
14 done
15
16 # when preparation is complete, run /etc/kong.d/prepared to let kong know
17 # you're done.
18
19 /etc/kong.d/prepared