summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xhtgen10
1 files 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