0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-29 16:47:28 +01:00
mongodb/evergreen/wait_for_resmoke_to_shutdown.sh

23 lines
412 B
Bash
Executable File

proc="resmoke.py"
if [ "Windows_NT" = "$OS" ]; then
check_resmoke() {
resmoke_info=$(wmic process | grep resmoke.py)
}
while [ 1 ]; do
check_resmoke
if ! [[ "$resmoke_info" =~ .*"$proc".* ]]; then
break
fi
sleep 5
done
else
get_pids() { proc_pids=$(pgrep -f $1); }
while [ 1 ]; do
get_pids $proc
if [ -z "$proc_pids" ]; then
break
fi
sleep 5
done
fi