linux - fixed debian/ubuntu but still some work needed on centos
This commit is contained in:
parent
98568a57c9
commit
37f5e4ed71
|
@ -532,11 +532,13 @@ echo "./configure $CONFARGS --add-dynamic-module=/tmp/bunkerized-nginx/ModSecuri
|
|||
do_and_check_cmd chmod +x "/tmp/bunkerized-nginx/nginx-${NGINX_VERSION}/configure-fix.sh"
|
||||
CHANGE_DIR="/tmp/bunkerized-nginx/nginx-${NGINX_VERSION}" LUAJIT_LIB="/usr/local/lib/" LUAJIT_INC="/usr/local/include/luajit-2.1" do_and_check_cmd ./configure-fix.sh
|
||||
CHANGE_DIR="/tmp/bunkerized-nginx/nginx-${NGINX_VERSION}" do_and_check_cmd make -j $NTASK modules
|
||||
if [ "$OS" = "centos" ] ; then
|
||||
CHANGE_DIR="/tmp/bunkerized-nginx/nginx-${NGINX_VERSION}" do_and_check_cmd cp ./objs/*.so /usr/lib64/nginx/modules
|
||||
else
|
||||
CHANGE_DIR="/tmp/bunkerized-nginx/nginx-${NGINX_VERSION}" do_and_check_cmd cp ./objs/*.so /usr/lib/nginx/modules
|
||||
if [ ! -d "/usr/lib/nginx/modules" ] ; then
|
||||
do_and_check_cmd mkdir -p /usr/lib/nginx/modules
|
||||
fi
|
||||
do_and_check_cmd chown -R root:root /usr/lib/nginx
|
||||
do_and_check_cmd chmod -R 755 /usr/lib/nginx
|
||||
CHANGE_DIR="/tmp/bunkerized-nginx/nginx-${NGINX_VERSION}" do_and_check_cmd cp ./objs/*.so /usr/lib/nginx/modules
|
||||
do_and_check_cmd chmod 744 /usr/lib/nginx/modules/*
|
||||
|
||||
# We're done
|
||||
if [ "$OS" = "alpine" ] ; then
|
||||
|
|
|
@ -83,11 +83,11 @@ if [ "$OS" = "debian" ] || [ "$OS" = "ubuntu" ] ; then
|
|||
fi
|
||||
echo "[*] Install dependencies"
|
||||
if [ "$OS" = "debian" ] || [ "$OS" = "ubuntu" ] ; then
|
||||
DEBIAN_DEPS="git cron curl python3 python3-pip"
|
||||
DEBIAN_DEPS="git cron curl python3 python3-pip procps"
|
||||
DEBIAN_FRONTEND=noninteractive do_and_check_cmd apt install -y $DEBIAN_DEPS
|
||||
elif [ "$OS" = "centos" ] ; then
|
||||
do_and_check_cmd yum install -y epel-release
|
||||
CENTOS_DEPS="git crontabs curl python3 python3-pip"
|
||||
CENTOS_DEPS="git crontabs curl python3 python3-pip procps luajit lua"
|
||||
do_and_check_cmd yum install -y $CENTOS_DEPS
|
||||
fi
|
||||
do_and_check_cmd pip3 install jinja2
|
||||
|
|
|
@ -72,16 +72,18 @@ fi
|
|||
|
||||
echo "[*] Exec bunkerized-nginx"
|
||||
docker exec "$id" bunkerized-nginx
|
||||
if [ $? -ne 0 ] || [ "$res" != "ok" ] ; then
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "[!] docker exec failed"
|
||||
cleanup "$id"
|
||||
exit 9
|
||||
fi
|
||||
|
||||
echo "[*] Exec curl"
|
||||
res="$(curl -s -H "User-Agent: LegitOne" http://localhost/")
|
||||
res="$(curl -s -H "User-Agent: LegitOne" http://localhost/)"
|
||||
if [ $? -ne 0 ] || [ "$res" != "ok" ] ; then
|
||||
echo "[!] curl failed"
|
||||
cleanup "$id"
|
||||
exit 10
|
||||
fi
|
||||
|
||||
cleanup "$id"
|
||||
|
|
Loading…
Reference in New Issue