git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan McGee <dpmcgee@gmail.com>
To: git@vger.kernel.org
Cc: Eric Wong <normalperson@yhbt.net>, Dan McGee <dpmcgee@gmail.com>
Subject: [PATCH 3/3] git-instaweb: Don't assume Apache executable is named apache2
Date: Tue, 29 Jun 2010 21:45:00 -0500	[thread overview]
Message-ID: <1277865900-25044-3-git-send-email-dpmcgee@gmail.com> (raw)
In-Reply-To: <1277865900-25044-1-git-send-email-dpmcgee@gmail.com>

On Arch Linux, we keep the original 'httpd' name for the exectuable and
don't rename it or the path to the modules. Remove some of these assumptions
and add the httpd name in where it may be required.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
---
 git-instaweb.sh |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/git-instaweb.sh b/git-instaweb.sh
index 1d349b8..d0091f2 100755
--- a/git-instaweb.sh
+++ b/git-instaweb.sh
@@ -43,7 +43,8 @@ test -z "$port" && port=1234
 
 resolve_full_httpd () {
 	case "$httpd" in
-	*apache2*|*lighttpd*)
+	*apache2*|*lighttpd*|*httpd*)
+		# yes, *httpd* covers *lighttpd* above, but it is there for clarity
 		# ensure that the apache2/lighttpd command ends with "-f"
 		if ! echo "$httpd" | sane_grep -- '-f *$' >/dev/null 2>&1
 		then
@@ -300,7 +301,10 @@ EOF
 }
 
 apache2_conf () {
-	test -z "$module_path" && module_path=/usr/lib/apache2/modules
+	if test -z "$module_path"; then
+		test -d "/usr/lib/httpd/modules" && module_path="/usr/lib/httpd/modules"
+		test -d "/usr/lib/apache2/modules" && module_path="/usr/lib/apache2/modules"
+	fi
 	bind=
 	test x"$local" = xtrue && bind='127.0.0.1:'
 	echo 'text/css css' > "$fqgitdir/mime.types"
@@ -563,7 +567,7 @@ case "$httpd" in
 *lighttpd*)
 	lighttpd_conf
 	;;
-*apache2*)
+*apache2*|*httpd*)
 	apache2_conf
 	;;
 webrick)
-- 
1.7.1

  parent reply	other threads:[~2010-06-30  2:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-30  2:44 [PATCH 1/3] git-instaweb: Fix custom apache log placement Dan McGee
2010-06-30  2:44 ` [PATCH 2/3] git-instaweb: Fix Apache environment variable passing Dan McGee
2010-06-30  2:45 ` Dan McGee [this message]
2010-06-30  7:31   ` [PATCH 3/3] git-instaweb: Don't assume Apache executable is named apache2 Eric Wong
2010-06-30 12:29     ` Dan McGee
2010-06-30 16:03   ` Junio C Hamano
     [not found]     ` <AANLkTikYNVLM9MrmL819__Viap7ucvmrs7faeC4tdDmn@mail.gmail.com>
2010-06-30 16:38       ` Dan McGee
2010-07-23 18:22         ` Eric Wong
2010-07-22 18:01 ` [PATCH 1/3] git-instaweb: Fix custom apache log placement Dan McGee
2010-07-22 23:42   ` Eric Wong
2010-07-23 13:40     ` Dan McGee
2010-07-23 17:38       ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1277865900-25044-3-git-send-email-dpmcgee@gmail.com \
    --to=dpmcgee@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=normalperson@yhbt.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).