@@ -57,46 +57,44 @@ install_deb_lua() {
57
57
apt-get install -y software-properties-common unzip build-essential libssl-dev lua5.3 liblua5.3-dev > /dev/null 2>&1
58
58
}
59
59
60
- download_luaoauth () {
61
- printf " \r[+] Downloading haproxy-lua-oauth\n"
62
- cd $SOURCE_DIR
63
- curl -sLO https://github.com/haproxytech/haproxy-lua-oauth/archive/master.zip
64
- unzip -qo master.zip && rm master.zip
65
- }
60
+ install_luaoauth_deps () {
61
+ printf " \r[+] Installing haproxy-lua-oauth dependencies\n"
62
+
63
+ if [ ! -e $lua_dep_dir ]; then
64
+ mkdir -p $lua_dep_dir ;
65
+ fi ;
66
+
67
+ apt-get update > /dev/null 2>&1
68
+ apt-get install -y build-essential liblua5.3-dev libssl-dev unzip > /dev/null 2>&1
66
69
67
- download_luaoauth_deps () {
68
- printf " \r[+] Downloading haproxy-lua-oauth dependencies\n"
69
70
cd $SOURCE_DIR
70
- apt-get install -y unzip > /dev/null 2>&1
71
71
72
- curl -sLO https://github.com/diegonehab/luasocket/archive/master.zip
73
- unzip -qo master.zip && mv luasocket-master luasocket && rm master.zip
72
+ curl -sLO https://github.com/rxi/json.lua/archive/refs/heads/master.zip
73
+ unzip -qo master.zip && rm master.zip
74
+ mv json.lua-master/json.lua $lua_dep_dir
74
75
75
- curl -sLO https://github.com/rxi/json.lua/archive/master.zip
76
- unzip -qo master.zip && mv json.lua-master json && rm master.zip
76
+ curl -sLO https://github.com/lunarmodules/luasocket/archive/refs/heads/master.zip
77
+ unzip -qo master.zip && rm master.zip
78
+ cd luasocket-master/
79
+ make clean all install-both LUAINC=/usr/include/lua5.3/ > /dev/null
80
+ cd ..
77
81
78
- curl -sLO https://github.com/wahern/luaossl/archive/rel-20181207.zip
79
- unzip -qo rel-20181207.zip && mv luaossl-rel-20181207 luaossl && rm rel-20181207.zip
82
+ curl -sLO https://github.com/wahern/luaossl/archive/refs/heads/master.zip
83
+ unzip -qo master.zip && rm master.zip
84
+ cd luaossl-master/
85
+ make install > /dev/null
86
+ cd ..
80
87
}
81
88
82
89
install_luaoauth () {
83
90
printf " \r[+] Installing haproxy-lua-oauth\n"
84
91
if [ ! -e $lua_dep_dir ]; then
85
92
mkdir -p $lua_dep_dir ;
86
93
fi ;
87
- mv $SOURCE_DIR /haproxy-lua-oauth-master/lib/* .lua $lua_dep_dir
88
- }
89
94
90
- install_luaoauth_deps () {
91
- printf " \r[+] Installing haproxy-lua-oauth dependencies\n"
92
95
cd $SOURCE_DIR
93
- cd luasocket/
94
- make clean all install-both LUAINC=/usr/include/lua5.3/ > /dev/null
95
- cd ..
96
- cd luaossl/
97
- make install > /dev/null
98
- cd ..
99
- mv json/json.lua $lua_dep_dir
96
+
97
+ mv ./lib/* .lua $lua_dep_dir
100
98
}
101
99
102
100
case $1 in
@@ -109,18 +107,18 @@ esac
109
107
110
108
if $install_luaoauth_var ; then
111
109
# Install Lua JWT
112
- if ! $lua_installed ; then
113
- if $rhel_based ; then
114
- download_and_install_lua=(install_yum_deps download_rhel_lua build_lua install_rhel_lua)
115
- elif $debian_based ; then
116
- download_and_install_lua=(install_deb_lua)
117
- fi
118
- for func in ${download_and_install_lua[*]} ; do
119
- $func &
120
- display_working $!
121
- done
122
- fi
123
- download_and_install_luaoauth=(download_luaoauth_deps install_luaoauth_deps download_luaoauth install_luaoauth)
110
+ # if ! $lua_installed; then
111
+ # if $rhel_based; then
112
+ # download_and_install_lua=(install_yum_deps download_rhel_lua build_lua install_rhel_lua)
113
+ # elif $debian_based; then
114
+ # download_and_install_lua=(install_deb_lua)
115
+ # fi
116
+ # for func in ${download_and_install_lua[*]}; do
117
+ # $func &
118
+ # display_working $!
119
+ # done
120
+ # fi
121
+ download_and_install_luaoauth=(install_luaoauth_deps install_luaoauth)
124
122
for func in ${download_and_install_luaoauth[*]} ; do
125
123
$func &
126
124
display_working $!
0 commit comments