git-instaweb: Extract configuring web server into configure_httpd
This is preparatory work for making start/restart check that git-instaweb set up correct configuration, and generate it if it is missing. Pure refactoring, no functional changes. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Acked-by: Eric Wong <normalperson@yhbt.net>
This commit is contained in:
parent
f696543dad
commit
db61f060be
@ -587,32 +587,36 @@ our \$projects_list = \$projectroot;
|
|||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
configure_httpd() {
|
||||||
|
case "$httpd" in
|
||||||
|
*lighttpd*)
|
||||||
|
lighttpd_conf
|
||||||
|
;;
|
||||||
|
*apache2*|*httpd*)
|
||||||
|
apache2_conf
|
||||||
|
;;
|
||||||
|
webrick)
|
||||||
|
webrick_conf
|
||||||
|
;;
|
||||||
|
*mongoose*)
|
||||||
|
mongoose_conf
|
||||||
|
;;
|
||||||
|
*plackup*)
|
||||||
|
plackup_conf
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Unknown httpd specified: $httpd"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
gitweb_conf
|
gitweb_conf
|
||||||
|
|
||||||
resolve_full_httpd
|
resolve_full_httpd
|
||||||
mkdir -p "$fqgitdir/gitweb/$httpd_only"
|
mkdir -p "$fqgitdir/gitweb/$httpd_only"
|
||||||
|
|
||||||
case "$httpd" in
|
configure_httpd
|
||||||
*lighttpd*)
|
|
||||||
lighttpd_conf
|
|
||||||
;;
|
|
||||||
*apache2*|*httpd*)
|
|
||||||
apache2_conf
|
|
||||||
;;
|
|
||||||
webrick)
|
|
||||||
webrick_conf
|
|
||||||
;;
|
|
||||||
*mongoose*)
|
|
||||||
mongoose_conf
|
|
||||||
;;
|
|
||||||
*plackup*)
|
|
||||||
plackup_conf
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Unknown httpd specified: $httpd"
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
start_httpd
|
start_httpd
|
||||||
url=http://127.0.0.1:$port
|
url=http://127.0.0.1:$port
|
||||||
|
Loading…
Reference in New Issue
Block a user