fix scripts fetching handlers from /handlers

This commit is contained in:
niphlod
2013-08-31 14:23:35 +02:00
parent 1f9071d5df
commit d61bbc6a5f
8 changed files with 60 additions and 59 deletions
+11 -12
View File
@@ -71,7 +71,7 @@ server {
uwsgi_param UWSGI_SCHEME $scheme;
uwsgi_param SERVER_SOFTWARE nginx/$nginx_version;
}
}' >/etc/nginx/vhosts.d/web2py.conf
@@ -102,8 +102,7 @@ cd /srv/www/
wget http://web2py.com/examples/static/web2py_src.zip
unzip web2py_src.zip
rm web2py_src.zip
# Download latest version of sessions2trash.py
wget http://web2py.googlecode.com/hg/scripts/sessions2trash.py -O /srv/www/web2py/scripts/sessions2trash.py
mv web2py/handlers/wsgihandler.py web2py/wsgihandler.py
chown -R nginx:www web2py
cd /srv/www/web2py
sudo -u nginx python -c "from gluon.main import save_password; save_password('$PW',443)"
@@ -137,7 +136,7 @@ echo '#!/bin/sh
# Check for missing binaries (stale symlinks should not happen)
UWSGI_BIN=/usr/bin/uwsgi
test -x $UWSGI_BIN || { echo "$UWSGI_BIN not installed";
test -x $UWSGI_BIN || { echo "$UWSGI_BIN not installed";
if [ "$1" = "stop" ]; then exit 0;
else exit 5; fi; }
@@ -150,13 +149,13 @@ UWSGI_OPTIONS="$UWSGI_OPTIONS --autoload"
if [ "$UWSGI_EMPEROR_MODE" = "true" ] ; then
UWSGI_OPTIONS="$UWSGI_OPTIONS --emperor $UWSGI_VASSALS"
fi
. /etc/rc.status
rc_reset
case "$1" in
fi
. /etc/rc.status
rc_reset
case "$1" in
start)
echo -n "Starting uWSGI "
/sbin/startproc $UWSGI_BIN $UWSGI_OPTIONS
@@ -219,7 +218,7 @@ chmod +x /etc/init.d/uwsgi
chkconfig --add uwsgi
chkconfig --add nginx
## you can reload uwsgi with
#/etc/init.d/uwsgi restart
## to reload web2py only (without restarting uwsgi)