diff options
Diffstat (limited to 'sbin/stop-all.sh')
-rwxr-xr-x | sbin/stop-all.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sbin/stop-all.sh b/sbin/stop-all.sh index 298c6a9859..971d5d49da 100755 --- a/sbin/stop-all.sh +++ b/sbin/stop-all.sh @@ -30,3 +30,20 @@ sbin="`cd "$sbin"; pwd`" # Stop the slaves, then the master "$sbin"/stop-slaves.sh "$sbin"/stop-master.sh + +if [ "$1" == "--wait" ] +then + printf "Waiting for workers to shut down..." + while true + do + running=`$sbin/slaves.sh ps -ef | grep -v grep | grep deploy.worker.Worker` + if [ -z "$running" ] + then + printf "\nAll workers successfully shut down.\n" + break + else + printf "." + sleep 10 + fi + done +fi |