Skip to content

Commit

Permalink
instaweb: Be more clear if httpd or the browser fail
Browse files Browse the repository at this point in the history
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
dscho authored and Junio C Hamano committed Jul 26, 2006
1 parent 24cf6e5 commit 5209eda
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions git-instaweb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand Down Expand Up @@ -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" <<EOF
AddHandler cgi-script .cgi
Expand Down Expand Up @@ -234,4 +238,5 @@ esac

start_httpd
test -z "$browser" && browser=echo
$browser http://127.0.0.1:$port
url=http://127.0.0.1:$port
$browser $url || echo $url

0 comments on commit 5209eda

Please sign in to comment.