X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=git-instaweb.sh;h=d96eddbe56783d61304941a134361797c82480e7;hb=5b590d783a461c63fa803d1c21b57bc79c0207f7;hp=5f5cac75eaa6fbf2ca68cfa01de2b21afa352cd0;hpb=985d54008359db59a45462627884703aa7ce1ddb;p=~andy%2Fgit 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" <