@@ -24,8 +24,8 @@ HOST=${BENCH_HOST:-'127.0.0.1'}
2424HAPROXY_VERSION=' v3.2.0'
2525
2626function install_haproxy {
27- typeset VERSION=${HAPROXY_VERSION:- v3.2.0}
28- typeset SSL_LIB=openssl-master
27+ typeset VERSION=${HAPROXY_VERSION:- v3.2.0}
28+ typeset SSL_LIB=openssl-master
2929 typeset HAPROXY_REPO=" https://github.com/haproxy/haproxy.git"
3030 typeset BASENAME=' haproxy'
3131 typeset DIRNAME=" ${BASENAME} -${VERSION} "
@@ -142,14 +142,14 @@ function run_haproxy {
142142
143143function conf_siege_haproxy_cert {
144144 typeset OPENSSL_DIR=" ${INSTALL_ROOT} /openssl-master"
145- # configure siege to use haproxy
146- if [[ ! -f " ${OPENSSL_DIR} /etc/siegerc" ]] ; then
147- echo " Did not found siegerc. Siege should be installed first."
148- exit 1
149- fi
150- echo " #haproxy" >> " ${OPENSSL_DIR} /etc/siegerc"
151- echo " ssl-cert = ${OPENSSL_DIR} /conf/certs/client_cert.pem" >> " ${OPENSSL_DIR} /etc/siegerc"
152- echo " ssl-key = ${OPENSSL_DIR} /conf/certs/client_key.pem" >> " ${OPENSSL_DIR} /etc/siegerc"
145+ # configure siege to use haproxy
146+ if [[ ! -f " ${OPENSSL_DIR} /etc/siegerc" ]] ; then
147+ echo " Did not found siegerc. Siege should be installed first."
148+ exit 1
149+ fi
150+ echo " #haproxy" >> " ${OPENSSL_DIR} /etc/siegerc"
151+ echo " ssl-cert = ${OPENSSL_DIR} /conf/certs/client_cert.pem" >> " ${OPENSSL_DIR} /etc/siegerc"
152+ echo " ssl-key = ${OPENSSL_DIR} /conf/certs/client_key.pem" >> " ${OPENSSL_DIR} /etc/siegerc"
153153}
154154
155155function unconf_siege_haproxy_cert {
@@ -158,7 +158,7 @@ function unconf_siege_haproxy_cert {
158158 # clear the siege config
159159 sed -i ' /#haproxy/{N;d;}' " ${OPENSSL_DIR} /etc/siegerc" || exit 1
160160}
161-
161+
162162function kill_haproxy {
163163 pkill -TERM -f haproxy
164164}
0 commit comments