2 # don't set nr_client for Rev, only _one_ app running at once :x
3 nr_client
=${nr_client-2}
7 rtmpfiles unicorn_config curl_out curl_err pid r_err r_out r_rot
10 cat > $unicorn_config <<EOF
15 Rainbows! { use :$model }
18 rainbows
-D sleep.ru
-c $unicorn_config
22 for i
in $
(awk "BEGIN{for(i=0;i<$nr_client;++i) print i}" </dev
/null
)
24 ( curl
-sSf http
://$listen/2 >> $curl_out 2>> $curl_err ) &
31 kill -USR1 $
(cat $pid)
38 echo elapsed
=$
(( $
(date +%s
) - $start ))
40 test x
"$(wc -l < $curl_out)" = x
$nr_client
41 nr
=$
(sort < $curl_out |
uniq |
wc -l)
44 test x$
(sort < $curl_out |
uniq) = xHello
48 before_rot
=$
(wc -c < $r_rot)
49 before_err
=$
(wc -c < $r_err)
50 curl
-sSfv http
://$listen/
51 after_rot
=$
(wc -c < $r_rot)
52 after_err
=$
(wc -c < $r_err)
54 test $after_rot -eq $before_rot && echo "before_rot -eq after_rot"
55 test $after_err -gt $before_err && echo "before_err -gt after_err"