Skip to content

Instantly share code, notes, and snippets.

@ganwell
Created July 31, 2020 13:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ganwell/db86cdc85241f19cc22e4511e3a95883 to your computer and use it in GitHub Desktop.
Save ganwell/db86cdc85241f19cc22e4511e3a95883 to your computer and use it in GitHub Desktop.
$> cat run-server.sh
#!/bin/sh
# Copyright (c) 2012-2015 Kaarle Ritvanen
# See LICENSE file for license details
export AUGEAS_LENS_LIB=augeas
if [ $(basename $0) = run-server.sh ]; then
export LUA_PATH="./?.lua;./?/init.lua;;"
PORT=${1:-8000}
OPTIONS=
cd $(dirname $0)
else
PORT=80
OPTIONS="-d /var/log/aconf.log --pidfile /var/run/aconf.pid"
cd /usr/share/aconf
fi
exec uwsgi -M --http-socket :$PORT --close-on-exec2 \
--plugin /usr/lib/uwsgi/lua_plugin.so --lua server.lua \
--remap-modifier 6:0 \
--static-map /browser=web --static-index client.html \
$OPTIONS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment