зеркало из https://github.com/microsoft/git.git
instaweb: Be more clear if httpd or the browser fail
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Родитель
24cf6e5847
Коммит
5209eda863
|
@ -54,6 +54,10 @@ start_httpd () {
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
if test $? != 0; then
|
||||||
|
echo "Could not execute http daemon $httpd."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
stop_httpd () {
|
stop_httpd () {
|
||||||
|
@ -184,7 +188,7 @@ EOF
|
||||||
else
|
else
|
||||||
# plain-old CGI
|
# plain-old CGI
|
||||||
list_mods=`echo "$httpd" | sed "s/-f$/-l/"`
|
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"
|
echo "LoadModule cgi_module $module_path/mod_cgi.so" >> "$conf"
|
||||||
cat >> "$conf" <<EOF
|
cat >> "$conf" <<EOF
|
||||||
AddHandler cgi-script .cgi
|
AddHandler cgi-script .cgi
|
||||||
|
@ -234,4 +238,5 @@ esac
|
||||||
|
|
||||||
start_httpd
|
start_httpd
|
||||||
test -z "$browser" && browser=echo
|
test -z "$browser" && browser=echo
|
||||||
$browser http://127.0.0.1:$port
|
url=http://127.0.0.1:$port
|
||||||
|
$browser $url || echo $url
|
||||||
|
|
Загрузка…
Ссылка в новой задаче