summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2989f51)
raw | patch | inline | side by side (parent: 2989f51)
author | Dan McGee <dpmcgee@gmail.com> | |
Wed, 30 Jun 2010 12:29:08 +0000 (07:29 -0500) | ||
committer | Eric Wong <normalperson@yhbt.net> | |
Fri, 23 Jul 2010 18:16:05 +0000 (11:16 -0700) |
On Arch Linux, the executable for the Apache HTTP server keeps
the 'httpd' name and is not named 'apache2'. The path to the
server modules also contains 'httpd' rather than 'apache2'.
Remove some of these assumptions and add the httpd name in where
it may be required. Finally, make some slight style adjustments
to the code we are touching to make it fit the style of the rest
of the script.
Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
the 'httpd' name and is not named 'apache2'. The path to the
server modules also contains 'httpd' rather than 'apache2'.
Remove some of these assumptions and add the httpd name in where
it may be required. Finally, make some slight style adjustments
to the code we are touching to make it fit the style of the rest
of the script.
Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
git-instaweb.sh | patch | blob | history |
diff --git a/git-instaweb.sh b/git-instaweb.sh
index 1d349b88de9f3c9fa10ea3f949e3e3108035b07a..b7342e22c88993756e7beb6582a896087e52a034 100755 (executable)
--- a/git-instaweb.sh
+++ b/git-instaweb.sh
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
}
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"
Listen $bind$port
EOF
- for mod in mime dir env log_config; do
- if test -e $module_path/mod_${mod}.so; then
+ for mod in mime dir env log_config
+ do
+ if test -e $module_path/mod_${mod}.so
+ then
echo "LoadModule ${mod}_module " \
"$module_path/mod_${mod}.so" >> "$conf"
fi
*lighttpd*)
lighttpd_conf
;;
-*apache2*)
+*apache2*|*httpd*)
apache2_conf
;;
webrick)