diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8fc771d51..29a104cd8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,6 +14,7 @@ jobs: until docker exec dojo dojo is-setup-finished do sleep 1 + docker exec dojo journalctl -u pwn.college | tail -n 10 done - name: Run tests against container run: "pytest ./test" diff --git a/script/container-setup.sh b/script/container-setup.sh index 0f394a123..7380d4c5d 100755 --- a/script/container-setup.sh +++ b/script/container-setup.sh @@ -1,8 +1,6 @@ #!/bin/sh DOJO_DIR=/opt/pwn.college -SETUP_DONE_LOCATION_CHECK=/tmp/container-setup-done -rm -f "$SETUP_DONE_LOCATION_CHECK" >> $DOJO_DIR/data/config.env @@ -85,4 +83,3 @@ for host in $(cat $DOJO_DIR/user_firewall.allowed); do iptables -I DOCKER-USER -i user_firewall -d $(host $host | awk '{print $NF; exit}') -j ACCEPT done -touch "$SETUP_DONE_LOCATION_CHECK" diff --git a/script/dojo b/script/dojo index f061151a5..d7167a808 100755 --- a/script/dojo +++ b/script/dojo @@ -82,7 +82,7 @@ case "$ACTION" in # HELP: is-setup-finished: use exit code to return if the system is done with setup "is-setup-finished") - [ -f /tmp/container-setup-done ] && journalctl -u pwn.college | grep "Finished pwn.college docker compose service" + journalctl -u pwn.college | grep "Finished pwn.college docker compose service" ;; # HELP: start: start the dojo. Main entry point for the docker image.