diff --git a/start.sh b/start.sh index cf3af15..6d7a897 100644 --- a/start.sh +++ b/start.sh @@ -1,7 +1,18 @@ #!/bin/bash set -euo pipefail -# Start the supervisor -/usr/bin/supervisord -c /etc/supervisord.conf -# Start the allocator +# Start supervisord in the background +/usr/bin/supervisord -c /etc/supervisord.conf & + +# Wait until the Munge socket is ready +MUNGE_SOCKET_PATH="/var/run/munge/munge.socket.2" + +echo "Waiting for Munge socket to be ready..." +while [ ! -S "$MUNGE_SOCKET_PATH" ]; do + sleep 1 # Wait for 1 second before checking again +done + +echo "Munge socket is ready. Starting Python script." + +# Start the Python script python3 /home/watcloud-slurm-ci/main.py \ No newline at end of file