Skip to content

Instantly share code, notes, and snippets.

@dmoulton
Created December 22, 2010 01:18
Show Gist options
  • Save dmoulton/750924 to your computer and use it in GitHub Desktop.
Save dmoulton/750924 to your computer and use it in GitHub Desktop.
control script for stand alone passenger
#!/bin/sh
#meant to reside in script/ directory of a rails install
PORT=8200
ROR_ENV=production
LOC=`dirname $0`
case "$1" in
start)
passenger start -p $PORT -e $ROR_ENV -d
;;
stop)
passenger stop -p $PORT
passenger status -p $PORT
;;
restart)
touch $LOC/../tmp/restart.txt
passenger status -p $PORT
;;
status)
passenger status -p $PORT
;;
*)
echo "Usage: passenger-control {start|stop|restart|status}" >&2
exit 3
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment