linux - fixed debian/ubuntu but still some work needed on centos

This commit is contained in:
bunkerity
2021-06-23 15:46:04 +02:00
parent 98568a57c9
commit 37f5e4ed71
3 changed files with 12 additions and 8 deletions

View File

@@ -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"