@@ -6,7 +6,7 @@ HAPROXY_VERSION=1.9.1
6
6
LUA_VERSION=5.3.5
7
7
8
8
install_haproxy_var=false
9
- install_luajwt_var =false
9
+ install_luaoauth_var =false
10
10
rhel_based=false
11
11
debian_based=false
12
12
lua_installed=false
@@ -101,15 +101,15 @@ install_deb_lua() {
101
101
apt-get install -y software-properties-common unzip build-essential libssl-dev lua5.3 liblua5.3-dev > /dev/null 2>&1
102
102
}
103
103
104
- download_luajwt () {
105
- printf " \r[+] Downloading haproxy-lua-jwt \n"
104
+ download_luaoauth () {
105
+ printf " \r[+] Downloading haproxy-lua-oauth \n"
106
106
cd $SOURCE_DIR
107
- curl -sLO https://github.com/haproxytech/haproxy-lua-jwt /archive/master.zip
107
+ curl -sLO https://github.com/haproxytech/haproxy-lua-oauth /archive/master.zip
108
108
unzip -qo master.zip && rm master.zip
109
109
}
110
110
111
- download_luajwt_deps () {
112
- printf " \r[+] Downloading haproxy-lua-jwt dependencies\n"
111
+ download_luaoauth_deps () {
112
+ printf " \r[+] Downloading haproxy-lua-oauth dependencies\n"
113
113
cd $SOURCE_DIR
114
114
apt-get install -y unzip > /dev/null 2>&1
115
115
@@ -123,16 +123,16 @@ download_luajwt_deps() {
123
123
unzip -qo rel-20181207.zip && mv luaossl-rel-20181207 luaossl && rm rel-20181207.zip
124
124
}
125
125
126
- install_luajwt () {
127
- printf " \r[+] Installing haproxy-lua-jwt \n"
126
+ install_luaoauth () {
127
+ printf " \r[+] Installing haproxy-lua-oauth \n"
128
128
if [ ! -e $lua_dep_dir ]; then
129
129
mkdir -p $lua_dep_dir ;
130
130
fi ;
131
131
mv $SOURCE_DIR /haproxy-lua-oauth-master/lib/* .lua $lua_dep_dir
132
132
}
133
133
134
- install_luajwt_deps () {
135
- printf " \r[+] Installing haproxy-lua-jwt dependencies\n"
134
+ install_luaoauth_deps () {
135
+ printf " \r[+] Installing haproxy-lua-oauth dependencies\n"
136
136
cd $SOURCE_DIR
137
137
cd luasocket/
138
138
make clean all install-both LUAINC=/usr/include/lua5.3/ > /dev/null
@@ -147,12 +147,12 @@ case $1 in
147
147
haproxy)
148
148
install_haproxy_var=true
149
149
;;
150
- luajwt )
151
- install_luajwt_var =true
150
+ luaoauth )
151
+ install_luaoauth_var =true
152
152
;;
153
153
all)
154
154
install_haproxy_var=true
155
- install_luajwt_var =true
155
+ install_luaoauth_var =true
156
156
;;
157
157
* )
158
158
print_help
@@ -176,7 +176,7 @@ if $install_haproxy_var; then
176
176
lua_installed=true
177
177
fi
178
178
179
- if $install_luajwt_var ; then
179
+ if $install_luaoauth_var ; then
180
180
# Install Lua JWT
181
181
if ! $lua_installed ; then
182
182
if $rhel_based ; then
@@ -189,8 +189,8 @@ if $install_luajwt_var; then
189
189
display_working $!
190
190
done
191
191
fi
192
- download_and_install_luajwt=(download_luajwt_deps install_luajwt_deps download_luajwt install_luajwt )
193
- for func in ${download_and_install_luajwt [*]} ; do
192
+ download_and_install_luaoauth=(download_luaoauth_deps install_luaoauth_deps download_luaoauth install_luaoauth )
193
+ for func in ${download_and_install_luaoauth [*]} ; do
194
194
$func &
195
195
display_working $!
196
196
done
0 commit comments