3 \cp ./materials/l7directord-5-2-28-l7directord.cf ${L7DIRECTORD_CONF_DIR}/l7directord.cf
4 touch ${L7DIRECTORD_CONF_DIR}/1.cf
5 touch ${L7DIRECTORD_CONF_DIR}/2.cf
6 touch ${L7DIRECTORD_CONF_DIR}/3.cf
9 RealServer1=RealServer1
10 RealServer1_ADDR=127.0.0.1
11 RealServer1_PORT=50001
12 start_lighttpd -s $RealServer1 -a $RealServer1_ADDR -p $RealServer1_PORT
15 echo "Test failed: start_lighttpd RealServer1"
19 RealServer2=RealServer2
20 RealServer2_ADDR=127.0.0.1
21 RealServer2_PORT=50002
22 start_lighttpd -s $RealServer2 -a $RealServer2_ADDR -p $RealServer2_PORT
25 echo "Test failed: start_lighttpd RealServer2"
29 RealServer3=RealServer3
30 RealServer3_ADDR=[::1]
31 RealServer3_PORT=50003
32 start_lighttpd -s $RealServer3 -a $RealServer3_ADDR -p $RealServer3_PORT -i
35 echo "Test failed: start_lighttpd RealServer3"
39 RealServer4=RealServer4
40 RealServer4_ADDR=[::1]
41 RealServer4_PORT=50004
42 start_lighttpd -s $RealServer4 -a $RealServer4_ADDR -p $RealServer4_PORT -i
45 echo "Test failed: start_lighttpd RealServer4"
53 echo "Test failed: $L7VSD"
59 $INIT_L7DIRECTORD start
62 echo "Test failed: $INIT_L7DIRECTORD start"
68 EXPECT="Layer-7 Virtual Server version 3.0.0
69 Prot LocalAddress:Port ProtoMod Scheduler
70 -> RemoteAddress:Port Forward Weight ActiveConn InactConn
71 TCP 127.0.0.1:40001 sessionless rr
72 TCP 127.0.0.1:40002 sessionless rr
73 -> 127.0.0.1:50001 Masq 1 0 0
74 -> 127.0.0.1:50002 Masq 1 0 0
75 TCP 127.0.0.1:40003 sessionless rr
76 -> [::1]:50003 Masq 1 0 0
77 -> [::1]:50004 Masq 1 0 0 "
78 if [ "${RET}" != "${EXPECT}" ]
80 echo "Test failed: $L7VSADM -l -n"
84 RET=`ps -ef | grep l7directord | grep -v grep | grep -v umtest.sh | awk '{print $8,$9}'`
85 EXPECT="/usr/sbin/l7directord start
86 /usr/sbin/l7directord /etc/ha.d/conf/2.cf
87 /usr/sbin/l7directord /etc/ha.d/conf/3.cf
88 /usr/sbin/l7directord /etc/ha.d/conf/1.cf
89 l7directord: none:127.0.0.1:50001:UP
90 l7directord: none:127.0.0.1:50002:UP
91 l7directord: none:[::1]:50003:UP
92 l7directord: none:[::1]:50004:UP"
93 if [ "$RET" != "$EXPECT" ]
95 echo "Test failed: ps -ef | grep l7directord | grep -v grep | grep -v umtest.sh | awk '{print \$8,\$9}'"