Sha256: 898363ef0b1e8a6cda5cad97daa2c25d51f42421f6a8133c4806f6eb106968f1

Contents?: true

Size: 1.08 KB

Versions: 2

Compression:

Stored size: 1.08 KB

Contents

#!/bin/bash
#
# Copyright (c) 2009-2012 Lindsay Holmwood <lindsay@holmwood.id.au>
#
# flapjack
# Boots flapjack (coordinator, flapjack-executive, notification workers, ...)
#

PATH=$PATH:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local:/usr/local/sbin:/usr/local/bin:/usr/lib/flapjack/bin

# load global rbenv environment if present
if [ -x /etc/profile.d/rbenv.sh ] ; then
  source /etc/profile.d/rbenv.sh
fi

# Default return value
RETVAL=0

export FLAPJACK_ENV="production"

if [ ! $(which flapjack) ]; then
  echo "Error: flapjack isn't in PATH."
  echo "Refusing to do anything!"
  exit 1
fi

# Evaluate command
case "$1" in
  start)
    rbenv shell 1.9.3-p125
    flapjack start --config /etc/flapjack/flapjack-config.yaml --daemonize
    RETVAL=$?
  ;;
  stop)
    flapjack stop --config /etc/flapjack/flapjack-config.yaml
    RETVAL=$?
  ;;
  restart)
    flapjack restart --config /etc/flapjack/flapjack-config.yaml
    RETVAL=$?
  ;;
  reload)
    flapjack reload --config /etc/flapjack/flapjack-config.yaml
    RETVAL=$?
  *)
    echo "Usage: flapjack {start|stop}"
    RETVAL=1
  ;;
esac

exit $RETVAL

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
flapjack-0.6.56 dist/etc/init.d/flapjack
flapjack-0.6.55 dist/etc/init.d/flapjack