X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-instaweb.sh;h=16cd351f7f0d992be37be83017961c70731d4cc5;hb=9d0524d42f340fc49f9e175d966afb7dce3854bb;hp=63b18b99f65fe7ac60a76a0dfd2662d7400696c8;hpb=82e5a82fd73edb80a841f5fab1660e14b9b8f3ad;p=git.git diff --git a/git-instaweb.sh b/git-instaweb.sh index 63b18b99f..16cd351f7 100755 --- a/git-instaweb.sh +++ b/git-instaweb.sh @@ -54,6 +54,10 @@ start_httpd () { fi done fi + if test $? != 0; then + echo "Could not execute http daemon $httpd." + exit 1 + fi } stop_httpd () { @@ -183,8 +187,10 @@ PerlPassEnv GIT_EXEC_DIR EOF else # plain-old CGI + list_mods=`echo "$httpd" | sed "s/-f$/-l/"` + $list_mods | grep 'mod_cgi\.c' >/dev/null 2>&1 || \ + echo "LoadModule cgi_module $module_path/mod_cgi.so" >> "$conf" cat >> "$conf" < Options +ExecCGI @@ -232,4 +238,5 @@ esac start_httpd test -z "$browser" && browser=echo -$browser http://127.0.0.1:$port +url=http://127.0.0.1:$port +$browser $url || echo $url