| OLD | NEW |
| (Empty) |
| 1 #!/bin/sh | |
| 2 # Copyright (c) 2016 The Chromium Authors. All rights reserved. | |
| 3 # Use of this source code is governed by a BSD-style license that can be | |
| 4 # found in the LICENSE file. | |
| 5 | |
| 6 # Starts a master and waits for its pidfile to become live. This was split out | |
| 7 # of the Makefile in order to make a flock-able unit. | |
| 8 | |
| 9 set -e | |
| 10 | |
| 11 if [ -f twistd.pid ]; then | |
| 12 PID=`cat twistd.pid` | |
| 13 if [ -n $(ps -p$PID -o pid=) ]; then | |
| 14 echo "twistd.pid has pid $PID which is still alive. aborting." | |
| 15 exit 2 | |
| 16 fi | |
| 17 fi | |
| 18 | |
| 19 | |
| 20 echo 'Now running Buildbot master.' | |
| 21 python $SCRIPTS_DIR/common/twistd --no_save -y buildbot.tac | |
| 22 | |
| 23 echo 'Waiting for creation of twistd.pid...' | |
| 24 while `test ! -f twistd.pid`; do sleep 1; done; | |
| 25 | |
| 26 PID=`cat twistd.pid` | |
| 27 echo "twistd.pid contains new buildbot pid $PID" | |
| OLD | NEW |