Move WebWolf to port 9090 easier since most of the time something is running on 8081 Add scripts for easy building Docker files etc
32 lines
642 B
Bash
32 lines
642 B
Bash
#!/usr/bin/env bash
|
|
|
|
cd ..
|
|
|
|
nc -zv 127.0.0.1 8080 2>/dev/null
|
|
SUCCESS=$?
|
|
nc -zv 127.0.0.1 9090 2>/dev/null
|
|
SUCCESS=${SUCCESS}$?
|
|
|
|
if [[ "${SUCCESS}" -eq 00 ]] ; then
|
|
echo "WebGoat and or WebWolf are still running, please stop them first otherwise unit tests might fail!"
|
|
exit 127
|
|
fi
|
|
|
|
|
|
#mvn clean install
|
|
#if [[ "$?" -ne 0 ]] ; then
|
|
# exit y$?
|
|
#fi
|
|
|
|
cd -
|
|
sh build_docker.sh
|
|
|
|
echo "Do you want to run docker-compose?"
|
|
while true; do
|
|
read -p "Do you want to run docker-compose?" yn
|
|
case ${yn} in
|
|
[Yy]* ) sh clean-run-docker-compose.sh; break;;
|
|
[Nn]* ) exit;;
|
|
* ) echo "Please answer yes or no.";;
|
|
esac
|
|
done |