From 1e2482d4b5d8845fb92b28b6edd1836fd7a651c0 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 16 Mar 2017 21:04:38 +0100 Subject: add HTGEN_SCRIPT --- htgen | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htgen b/htgen index 303d023..725332e 100755 --- a/htgen +++ b/htgen @@ -9,13 +9,12 @@ case $# in (1) case "$1" in (--serve) - HTGEN_HOST="${HTGEN_HOST-0.0.0.0}" - HTGEN_PORT="${HTGEN_PORT-42380}" + HTGEN_HOST=${HTGEN_HOST-0.0.0.0} + HTGEN_PORT=${HTGEN_PORT-42380} + HTGEN_SCRIPT=${HTGEN_SCRIPT-:} TCPSERVER_OPTS='-c 423 -t 2 -D' echo "#### $Server $HTGEN_HOST:$HTGEN_PORT" >&2 exec tcpserver $TCPSERVER_OPTS "$HTGEN_HOST" "$HTGEN_PORT" "$0" - ## this should not happen... - exit 23 esac esac ## }}} @@ -93,5 +92,6 @@ unset k v echo >&2 ## }}} +eval "$HTGEN_SCRIPT" + reply_404 -exit -- cgit v1.2.3