Configuration options, tweak challenge, update readme

This commit is contained in:
2020-03-02 15:47:34 -05:00
parent 24fb11fe0d
commit 3aed336a3c
4 changed files with 270 additions and 107 deletions

View File

@@ -1,20 +1,16 @@
NGINX_PATH=/home/simon/Downloads/nginx-1.16.1/
if [ -z ${NGINX_PATH+x} ]; then
echo "Please set the NGINX_PATH variable";
exit
fi
MODULE_PATH=$(pwd)/
CONFIG_ARGS=$(nginx -V 2>&1 | tail -n 1 | cut -c 21- | sed 's/--add-dynamic-module=.*//g')
CONFIG_ARGS="${CONFIG_ARGS} --add-dynamic-module=${MODULE_PATH}"
echo $CONFIG_ARGS
(
cd ${NGINX_PATH}
#bash -c "./configure ${CONFIG_ARGS}"
make modules
#cp objs/ "${WD}"
cd ${NGINX_PATH} || exit
bash -c "./configure ${CONFIG_ARGS}"
make modules -j "$(nproc)"
)
rm /test/*.so
mv /home/simon/Downloads/nginx-1.16.1/objs/ngx_http_js_challenge_module.so /test/module.so
chown -R www-data /test/
systemctl restart nginx