Sha256: 4989ef27b087766d438da018f3d73d319bce5d0b17ba3fcb0a3aedc4e266a324

Contents?: true

Size: 907 Bytes

Versions: 4

Compression:

Stored size: 907 Bytes

Contents

#!/bin/bash
#
# Copyright (c) 2009 Lindsay Holmwood <lindsay@holmwood.id.au>
#
# flapjack-workers
# Boots flapjack-workers, check executors for Flapjack. 
#

PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local:/usr/local/sbin:/usr/local/bin

if [ -f /etc/default/flapjack-workers ]; then
  . /etc/default/flapjack-workers
fi

# Default return value
RETVAL=0

if [ ! $(which flapjack-worker-manager) ]; then
	echo "flapjack-worker-manager isn't on your path."
	echo "Refusing to start."
	exit 1
fi

# Evaluate command
case "$1" in
    start)
      flapjack-worker-manager start --workers $WORKERS --checks-directory $CHECKS_DIRECTORY
      RETVAL=$?
  ;;
    stop)
      flapjack-worker-manager stop
      RETVAL=$?
  ;;
    restart)
      flapjack-worker-manager restart --workers $WORKERS
      RETVAL=$?
  ;;
    *)
      echo "Usage: flapjack-workers {start|stop|restart}"
      exit 1
  ;;
esac

exit $RETVAL

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
flapjack-0.5.1 etc/init.d/flapjack-workers
flapjack-0.4.12 etc/init.d/flapjack-workers
flapjack-0.4.11 etc/init.d/flapjack-workers
flapjack-0.4.10 etc/init.d/flapjack-workers