summaryrefslogtreecommitdiffstats
path: root/run-server.sh
diff options
context:
space:
mode:
Diffstat (limited to 'run-server.sh')
-rwxr-xr-xrun-server.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/run-server.sh b/run-server.sh
index 717b650..24ff0e8 100755
--- a/run-server.sh
+++ b/run-server.sh
@@ -3,9 +3,15 @@
# Copyright (c) 2012-2013 Kaarle Ritvanen
# See LICENSE file for license details
-cd $(dirname $0)
+if [ $(basename $0) = run-server.sh ]; then
+ PORT=${1:-8000}
+ cd $(dirname $0)
+else
+ PORT=80
+ cd /usr/share/acf2
+fi
-exec uwsgi -M --http-socket :${1:-8000} \
+exec uwsgi -M --http-socket :$PORT \
--plugin /usr/lib/uwsgi/lua_plugin.so --lua server.lua \
--remap-modifier 6:0 \
--static-map /browser=web --static-index client.html