-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathsample.sh
More file actions
executable file
·51 lines (46 loc) · 941 Bytes
/
sample.sh
File metadata and controls
executable file
·51 lines (46 loc) · 941 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash -e
# Usage: ./sample.sh [-sessions=N] [-https]
# -sessions=N Number of sessions (default: 1; uses Sync if 1, Distributed if > 1)
# -https Use HTTPS instead of HTTP
sessions=1
https=false
for arg in "$@"; do
case $arg in
-sessions=*)
sessions="${arg#*=}"
;;
-https)
https=true
;;
*)
echo "Unknown option: $arg"
echo "Usage: $0 [-sessions=N] [-https]"
exit 1
;;
esac
done
if [ "$sessions" -eq 1 ]; then
if [ "$https" = true ]; then
command="Sample runHttps."
else
command="Sample runHttp."
fi
else
if [ "$https" = true ]; then
command="Sample runDistributedHttps: $sessions."
else
command="Sample runDistributedHttp: $sessions."
fi
fi
topaz -lq << EOF
errorCount
iferr 1 stk
iferr 2 exit
set cachename WebGS
login
run
Log instance logTypes: #(#'startup' #'debug' #'request' #'warning' #'error').
Log instance logTypes: #(#'startup' #'warning' #'error').
$command
%
EOF