kill-cubex-script.sh now exits if all processes have terminated before the timeout is reached