OSDN Git Service

bug fix
[ultramonkey-l7/ultramonkey-l7-v3.git] / test / script / l7vsadm / l7vsadm-04-1-3.sh
1 #!/bin/bash
2
3 . ${SET_DEFAULT_CONF}
4
5 #Run http server
6 SorryServer1=SorryServer1
7 SorryServer1_ADDR=127.0.0.1
8 SorryServer1_PORT=50001
9 start_lighttpd -s $SorryServer1 -a $SorryServer1_ADDR -p $SorryServer1_PORT
10 if [ $? -ne 0 ]
11 then
12         echo "Test failed: start_lighttpd SorryServer1"
13         exit 1
14 fi
15
16 #Add Service
17 $L7VSD
18 if [ $? -ne 0 ]
19 then
20         echo "Test failed: $L7VSD"
21         exit 1
22 fi
23 usleep 100000
24
25 $L7VSADM --add-service --tcp-service 127.0.0.1:40001 --proto-module ip --scheduler rr --upper 100 --bypass ${SorryServer1_ADDR}:${SorryServer1_PORT} --flag 1 --qos-up 1G --qos-down 1G --ssl /etc/l7vs/sslproxy/sslproxy.target.cf --sockopt deferaccept --access-log 1 --access-log-name /var/log/l7vs/access_virtualservice_1.log --ac-rotate-type "datesize" --ac-rotate-max-backup-index "10" --ac-rotate-max-filesize "10M" --ac-rotate-rotation-timing "year" --ac-rotate-rotation-timing-value "11/11 11:11"
26 if [ $? -ne 0 ]
27 then
28         echo "Test failed: $L7VSADM --add-service --tcp-service 127.0.0.1:40001 --proto-module ip --scheduler rr --upper 100 --bypass ${SorryServer1_ADDR}:${SorryServer1_PORT} --flag 1 --qos-up 1G --qos-down 1G --ssl /etc/l7vs/sslproxy/sslproxy.target.cf --sockopt deferaccept --access-log 1 --access-log-name /var/log/l7vs/access_virtualservice_1.log --ac-rotate-type datesize --ac-rotate-max-backup-index 10 --ac-rotate-max-filesize 10M --ac-rotate-rotation-timing year --ac-rotate-rotation-timing-value 11/11 11:11"
29         exit 1
30 fi
31
32
33 exit 0
34