X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-instaweb.sh;h=d96eddbe56783d61304941a134361797c82480e7;hb=d8f67d205eb98ea6dab915c29122158054218128;hp=5f5cac75eaa6fbf2ca68cfa01de2b21afa352cd0;hpb=6674d310d179400358d581f9725cbd4a2c32e3bf;p=git.git diff --git a/git-instaweb.sh b/git-instaweb.sh index 5f5cac75e..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" < "$conf" <