shell script code:
#!/bin/bash
cd /Users/lee/Documents/DockerValidation/
docker-compose -f docker-compose.yaml up --force-recreate --scale chrome=3 >>output.txt
Code to invoke the shell script from java
Process p = Runtime.getRuntime().exec("./docker_start.sh");
p.waitFor();
the above code triggers the shell script, and selenium hub is up. but in order for the hub to be up, the process has to keep on running. If I dont give p.waitFor() my script executes quickly and the hub is not up.
I need help with understanding on how to keep my hub up and at the same time run this process in background. Or any other alternatives to achieve my goal.