From 2b5d2d8792c861913d48bcfe02d8a6049c3911f5 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 26 Jul 2006 16:33:18 +0200 Subject: git-instaweb: some Apache have mod_cgi builtin So test for it, and do not always try to load mod_cgi.o. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- git-instaweb.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'git-instaweb.sh') diff --git a/git-instaweb.sh b/git-instaweb.sh index 63b18b99f6..9829c59154 100755 --- a/git-instaweb.sh +++ b/git-instaweb.sh @@ -183,8 +183,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 || \ + echo "LoadModule cgi_module $module_path/mod_cgi.so" >> "$conf" cat >> "$conf" < Options +ExecCGI -- cgit v1.3 From 5209eda86363a3ba2e000903ad8de29589b18b58 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 26 Jul 2006 23:11:46 +0200 Subject: instaweb: Be more clear if httpd or the browser fail Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- git-instaweb.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'git-instaweb.sh') diff --git a/git-instaweb.sh b/git-instaweb.sh index 9829c59154..16cd351f7f 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 () { @@ -184,7 +188,7 @@ EOF else # plain-old CGI list_mods=`echo "$httpd" | sed "s/-f$/-l/"` - $list_mods | grep 'mod_cgi\.c' >/dev/null || \ + $list_mods | grep 'mod_cgi\.c' >/dev/null 2>&1 || \ echo "LoadModule cgi_module $module_path/mod_cgi.so" >> "$conf" cat >> "$conf" <