@@ -35,13 +35,13 @@ display_working() {
35
35
download_haproxy_rhel () {
36
36
printf " \r[+] Downloading HAProxy\n"
37
37
curl -sLO https://www.haproxy.org/download/1.9/src/haproxy-$HAPROXY_VERSION .tar.gz
38
- tar xf haproxy-$HAPROXY_VERSION .tar.gz
38
+ tar xf haproxy-$HAPROXY_VERSION .tar.gz && rm haproxy- $HAPROXY_VERSION .tar.gz
39
39
}
40
40
41
41
download_rhel_lua () {
42
42
printf " \r[+] Downloading Lua\n"
43
43
curl -sLO https://www.lua.org/ftp/lua-$LUA_VERSION .tar.gz
44
- tar xf lua-$LUA_VERSION .tar.gz
44
+ tar xf lua-$LUA_VERSION .tar.gz && rm lua- $LUA_VERSION .tar.gz
45
45
}
46
46
47
47
install_yum_deps () {
@@ -105,19 +105,22 @@ download_luajwt() {
105
105
printf " \r[+] Downloading haproxy-lua-jwt\n"
106
106
cd $SOURCE_DIR
107
107
curl -sLO https://github.com/haproxytech/haproxy-lua-jwt/archive/master.zip
108
- unzip -qo master.zip
108
+ unzip -qo master.zip && rm master.zip
109
109
}
110
110
111
111
download_luajwt_deps () {
112
112
printf " \r[+] Downloading haproxy-lua-jwt dependencies\n"
113
113
cd $SOURCE_DIR
114
114
apt-get install -y unzip > /dev/null 2>&1
115
+
115
116
curl -sLO https://github.com/diegonehab/luasocket/archive/master.zip
116
- unzip -qo master.zip
117
+ unzip -qo master.zip && mv luasocket-master luasocket && rm master.zip
118
+
117
119
curl -sLO https://github.com/rxi/json.lua/archive/master.zip
118
- unzip -qo master.zip
119
- curl -sLO https://github.com/wahern/luaossl/archive/master.zip
120
- unzip -qo master.zip
120
+ unzip -qo master.zip && mv json.lua-master json && rm master.zip
121
+
122
+ curl -sLO https://github.com/wahern/luaossl/archive/rel-20181207.zip
123
+ unzip -qo rel-20181207.zip && mv luaossl-rel-20181207 luaossl && rm rel-20181207.zip
121
124
}
122
125
123
126
install_luajwt () {
@@ -131,13 +134,13 @@ install_luajwt() {
131
134
install_luajwt_deps () {
132
135
printf " \r[+] Installing haproxy-lua-jwt dependencies\n"
133
136
cd $SOURCE_DIR
134
- cd luasocket-master /
137
+ cd luasocket/
135
138
make clean all install-both LUAINC=/usr/include/lua5.3/ > /dev/null
136
139
cd ..
137
- cd luaossl-master /
140
+ cd luaossl/
138
141
make install > /dev/null
139
142
cd ..
140
- mv json.lua-master /json.lua $lua_dep_dir
143
+ mv json/json.lua $lua_dep_dir
141
144
}
142
145
143
146
case $1 in
0 commit comments