Closed frankwillmore closed 6 years ago
Does this really work? I wasn't too happy with the original approach when I wrote it, but runall.sh is calling run.sh. Since run.sh stop is calling docker stop <name> &
, can't the run.sh background job still finish before the docker containers are shut down?
You're right... I didn't realize run.sh was launching background jobs. I added a line to wait on any outstanding jobs:
for job in jobs | awk '{print $1}' | sed -e "s/\[//" |sed -e "s/\]//" | sed -e "s/[+-]//"
; do wait %$job 2>/dev/null; done
It ain't pretty but it works. I mostly was just making sure I knew how to do pull request on github. :-)
minor mod to stopall.sh which waits on pid instead of sleeping