git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] instaweb: if no httpd is specified and lighttpd doesn't exist, fall back on apache2.
@ 2008-05-11  5:26 nathan spindel
  2008-05-11  5:26 ` [PATCH] instaweb: make it compatible with Mac OS X 10.5's apache installation nathan spindel
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: nathan spindel @ 2008-05-11  5:26 UTC (permalink / raw)
  To: git; +Cc: nathan spindel

Signed-off-by: nathan spindel <nathans@gmail.com>
---
 git-instaweb.sh |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/git-instaweb.sh b/git-instaweb.sh
index 6f91c8f..b744133 100755
--- a/git-instaweb.sh
+++ b/git-instaweb.sh
@@ -31,8 +31,16 @@ conf="$GIT_DIR/gitweb/httpd.conf"
 
 # Defaults:
 
-# if installed, it doesn't need further configuration (module_path)
-test -z "$httpd" && httpd='lighttpd -f'
+# use lighttpd if it exists, otherwise use apache2
+if test -z "$httpd"
+then
+	if type "lighttpd" > /dev/null 2>&1;
+	then
+		httpd="lighttpd -f"
+	else
+		httpd="apache2 -f"
+	fi
+fi
 
 # any untaken local port will do...
 test -z "$port" && port=1234
-- 
1.5.5.1.179.g2fe4.dirty

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2008-05-11 18:27 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-11  5:26 [PATCH] instaweb: if no httpd is specified and lighttpd doesn't exist, fall back on apache2 nathan spindel
2008-05-11  5:26 ` [PATCH] instaweb: make it compatible with Mac OS X 10.5's apache installation nathan spindel
2008-05-11  5:26   ` [PATCH] Documentation/git-instaweb.txt: Updated defaults to match my last two git-instaweb.sh changes nathan spindel
2008-05-11  6:58   ` [PATCH] instaweb: make it compatible with Mac OS X 10.5's apache installation Junio C Hamano
2008-05-11 17:11     ` nathan spindel
2008-05-11  6:44 ` [PATCH] instaweb: if no httpd is specified and lighttpd doesn't exist, fall back on apache2 Junio C Hamano
2008-05-11 17:00   ` nathan spindel
2008-05-11 18:26   ` nathan spindel
2008-05-11 11:58 ` David Symonds
2008-05-11 17:03   ` nathan spindel
2008-05-11 17:46     ` Junio C Hamano

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).