[Swift-commit] r7656 - branches/release-0.94/bin
ketan at ci.uchicago.edu
ketan at ci.uchicago.edu
Sat Mar 8 17:21:38 CST 2014
Author: ketan
Date: 2014-03-08 17:21:38 -0600 (Sat, 08 Mar 2014)
New Revision: 7656
Modified:
branches/release-0.94/bin/start-coaster-service
Log:
run service if no workers specified
Modified: branches/release-0.94/bin/start-coaster-service
===================================================================
--- branches/release-0.94/bin/start-coaster-service 2014-03-08 15:24:30 UTC (rev 7655)
+++ branches/release-0.94/bin/start-coaster-service 2014-03-08 23:21:38 UTC (rev 7656)
@@ -43,23 +43,26 @@
{
waitpids=""
- for MACHINE in $WORKER_HOSTS
- do
- # Enable ssh tunneling if needed
- if [ "$SSH_TUNNELING" == "yes" ]; then
- run_command_bg ssh -N -T -R *:$LOCAL_PORT:localhost:$LOCAL_PORT "$WORKER_USERNAME@$MACHINE"
- fi
- # Connect directly
- echo Starting worker on $MACHINE
- (
- run_command ssh $WORKER_USERNAME@$MACHINE "mkdir -p $WORKER_LOCATION && mkdir -p $WORKER_LOG_DIR" ;
- run_command scp $WORKER $WORKER_USERNAME@$MACHINE:$WORKER_LOCATION ;
- run_command ssh $WORKER_USERNAME@$MACHINE "WORKER_LOGGING_LEVEL=$WORKER_LOGGING_LEVEL nohup $WORKER_LOCATION/worker.pl $WORKERURL $MACHINE $WORKER_LOG_DIR &> /dev/null &"
- ) &
- waitpids="$waitpids $!"
- done
- wait $waitpids
+ if [ -n "$WORKER_HOSTS" ] ; then
+ for MACHINE in $WORKER_HOSTS
+ do
+ # Enable ssh tunneling if needed
+ if [ "$SSH_TUNNELING" == "yes" ]; then
+ run_command_bg ssh -N -T -R *:$LOCAL_PORT:localhost:$LOCAL_PORT "$WORKER_USERNAME@$MACHINE"
+ fi
+
+ # Connect directly
+ echo Starting worker on $MACHINE
+ (
+ run_command ssh $WORKER_USERNAME@$MACHINE "mkdir -p $WORKER_LOCATION && mkdir -p $WORKER_LOG_DIR" ;
+ run_command scp $WORKER $WORKER_USERNAME@$MACHINE:$WORKER_LOCATION ;
+ run_command ssh $WORKER_USERNAME@$MACHINE "WORKER_LOGGING_LEVEL=$WORKER_LOGGING_LEVEL nohup $WORKER_LOCATION/worker.pl $WORKERURL $MACHINE $WORKER_LOG_DIR &> /dev/null &"
+ ) &
+ waitpids="$waitpids $!"
+ done
+ wait $waitpids
+ fi
return 0
}
More information about the Swift-commit
mailing list