learningequality/ka-lite — pull request #916 by gimick (2013-11-03 14:45:13+00:00)
Title: Autodetect rpi, improve nginx config

A few improvements to the RaspberryPi experience:

1. During install, the optimizerpi script is optionally triggered (if CONFIG_PACKAGE is RPi)
2. No-longer necessary to specify CONFIG_PACKAGE - this is now autodetected by OS=Linux, Hardware = arm6l and CENTRAL_SERVER =False. This behavior can be over-ridden by specifying CONFIG_PACKAGE="" in local_settings.
3. NGINX port settings are now detected from PRODUCTION_PORT and a new setting PROXY_PORT. Unfortunately, because nginx cannot reference environment variables, so if these settings are changed, it is necessary to re-run optimizerpi PROXY_PORT is only used in config=RPi and the optimizerpi script has been run.
4. NGINX configuration now exists in sites-available, with a link in sites-enabled (this is the more standard way of doing things
5. NGINX 502 error is normally caused by the webserver not running. A basic, custom 502 error has been implemented to improve the student experience with this error.
6. Install script - adjustments for word-wrapping on narrower terminals