AppServer 777 B

123456789101112131415161718192021222324252627
  1. #!/bin/sh
  2. # WebKit application server launch script for Unix.
  3. # This wrapper script is needed for the AutoReload mechanism.
  4. # You may want to use a specific Python executable:
  5. PYTHON=python
  6. # You may give the following Python parameters in advance,
  7. # followed by the parameters passed on to ThreadedAppServer:
  8. # -O with optimization (.pyo instead of .pyc)
  9. # -u unbuffered output (useful for debugging)
  10. unset PY_OPTS
  11. while [ "$1" = "-O" -o "$1" = "-u" ]; do
  12. PY_OPTS="$PY_OPTS $1"
  13. shift
  14. done
  15. # Make the directory where this script lives the current directory:
  16. cd `dirname $0`
  17. # As long as the app server returns a 3, it wants to be restarted:
  18. errorlevel=3
  19. while [ $errorlevel -eq 3 ]; do
  20. $PYTHON$PY_OPTS Launch.py ThreadedAppServer $*
  21. errorlevel=$?
  22. done