X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=git-instaweb.sh;h=d96eddbe56783d61304941a134361797c82480e7;hb=e4d1afbcf2e39a997ae90befd629ee53e444c4c9;hp=5f4419b69b58769e8fee7a60109520a095a831c5;hpb=b91ffd37d5c18046f7b0bf47e939273bead9e52e;p=git.git diff --git a/git-instaweb.sh b/git-instaweb.sh index 5f4419b69..d96eddbe5 100755 --- a/git-instaweb.sh +++ b/git-instaweb.sh @@ -77,11 +77,30 @@ start_httpd () { resolve_full_httpd # don't quote $full_httpd, there can be arguments to it (-f) - $full_httpd "$fqgitdir/gitweb/httpd.conf" - if test $? != 0; then - echo "Could not execute http daemon $httpd." - exit 1 - fi + case "$httpd" in + *mongoose*) + #The mongoose server doesn't have a daemon mode so we'll have to fork it + $full_httpd "$fqgitdir/gitweb/httpd.conf" & + #Save the pid before doing anything else (we'll print it later) + pid=$! + + if test $? != 0; then + echo "Could not execute http daemon $httpd." + exit 1 + fi + + cat > "$fqgitdir/pid" < $fqgitdir/mime.types + echo 'text/css css' > "$fqgitdir/mime.types" cat > "$conf" <> "$conf" <) has been applied - if test -f "$module_path/mod_perl.so" && grep '^our $gitbin' \ + if test -f "$module_path/mod_perl.so" && grep 'MOD_PERL' \ "$GIT_DIR/gitweb/gitweb.cgi" >/dev/null then # favor mod_perl if available @@ -308,6 +327,31 @@ EOF fi } +mongoose_conf() { + cat > "$conf" <