summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2006-07-26 14:33:18 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-07-26 19:24:15 (GMT)
commit2b5d2d8792c861913d48bcfe02d8a6049c3911f5 (patch)
tree0b3f170abb7b1f6b83ce57784cfbd9d9a3da3ff9
parentb7a036bb5f19d3b44443dcc319321663910250e8 (diff)
downloadgit-2b5d2d8792c861913d48bcfe02d8a6049c3911f5.zip
git-2b5d2d8792c861913d48bcfe02d8a6049c3911f5.tar.gz
git-2b5d2d8792c861913d48bcfe02d8a6049c3911f5.tar.bz2
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 <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
-rwxr-xr-xgit-instaweb.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/git-instaweb.sh b/git-instaweb.sh
index 63b18b9..9829c59 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" <<EOF
-LoadModule cgi_module $module_path/mod_cgi.so
AddHandler cgi-script .cgi
<Location /gitweb.cgi>
Options +ExecCGI