Sha256: 88a7989183d75f126d36525d9c6381cb173d4f7aeb093e81c7525ae29c303d7f

Contents?: true

Size: 944 Bytes

Versions: 2

Compression:

Stored size: 944 Bytes

Contents

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

PATH=$PATH:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local:/usr/local/sbin:/usr/local/bin:/usr/lib/flapjack/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}"
      RETVAL=1
  ;;
esac

exit $RETVAL

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
flapjack-0.5.5 dist/etc/init.d/flapjack-workers
flapjack-0.5.4 dist/etc/init.d/flapjack-workers