Sha256: 4d00f2bf466fe177db79e6484c872d750e3e1135e21d94c9aecb13b27847124f

Contents?: true

Size: 519 Bytes

Versions: 2

Compression:

Stored size: 519 Bytes

Contents

#! /bin/sh

ARGV="$@"

case $ARGV in
start)
  /usr/sbin/httpd -d `pwd` -f conf/apache.conf
	ruby -C../.. bin/cluster.rb --daemon
  ruby -C.. simple/app.rb --start # --daemon
  ERROR=$?
  ;;
restart)
  # restart appserver only!
  export ASPID= `ps ax | grep app.rb | grep ruby | cut -d" " -f1`
  if [ -n "$ASPID" ]; then   
    echo $ASPID
    kill -9 $ASPID
  fi 
  ruby -C.. simple/app.rb --restart # --daemon
  ERROR=$?
  ;;
stop)
  killall -9 ruby httpd
  ERROR=$?
  ;;
*)
  echo "NOP"
  ERROR=$?
esac

exit $ERROR

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
nitro-0.2.0 examples/simple/ctl
nitro-0.3.0 examples/simple/ctl