#!/bin/sh # Exit on error set -e sed -i "s/QUAKEJS_TAB_TITLE/${QUAKEJS_TAB_TITLE:=Quake JS}/" /bootstrap/index.html.template sed -i "s/QUAKEJS_CONTENT_URL/${QUAKEJS_CONTENT_URL:=content.quakejs.com}/" /bootstrap/index.html.template sed -i "s/QUAKEJS_SERVER_URL/$QUAKEJS_SERVER_URL/" /bootstrap/index.html.template if [ -n "$QUAKEJS_USE_SSL" ]; then sed -i "s/'http:\/\/'/\'https:\/\/'/g" /srv/http/ioquake3.js sed -i "s/'ws:\/\/'/\'wss:\/\/'/g" /srv/http/ioquake3.js fi cp /bootstrap/index.html.template /srv/http/index.html lighttpd -D -f /etc/lighttpd/lighttpd.conf