From 246c2b46ad0aef8f6cfd692cd0dd54505b4c3438 Mon Sep 17 00:00:00 2001 From: interp Date: Wed, 12 May 2004 19:43:13 +0000 Subject: [PATCH] In MAIN: get directory from args parameter, not command-line; allows to start main from within scsh manually Add comments how to use rman-handler and info-handler --- start-extended-web-server | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/start-extended-web-server b/start-extended-web-server index 840c4d3..a428b59 100755 --- a/start-extended-web-server +++ b/start-extended-web-server @@ -119,8 +119,8 @@ exec scsh -lel SSAX-4.9/load.scm -lel sunet-2.1/load.scm -dm -o http-test -e mai (error "Internal error, option not found" option alist)))) (define (main args) - (with-cwd - (file-name-directory (car (command-line))) + (with-cwd "." + (file-name-directory (car args)) (let ((options (make-options-from-args (cdr args)))) (cond ((zero? (user-uid)) (set-gid (->gid "nobody")) @@ -151,12 +151,15 @@ exec scsh -lel SSAX-4.9/load.scm -lel sunet-2.1/load.scm -dm -o http-test -e mai (list (cons "h" (home-dir-handler "public_html")) (cons "seval" seval-handler) ;; You may want to adapt this to your site. + ;; call like http://localhost:8080/man/man?ssh(1) (cons "man" (rman-handler 'man 'nroff "/usr/bin/rman" "/usr/bin/zcat" #f "man?%s(%s)" "Generated by rman-gateway")) + ;; call like http://localhost:8080/info/info?(slib.info)Top + ;; note: can only handle not-gzipped info files (cons "info" (info-handler #f #f #f "Generated by info-gateway")) (cons "cgi-bin" (cgi-handler