summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/git-instaweb.txt8
-rwxr-xr-xgit-instaweb.sh7
2 files changed, 11 insertions, 4 deletions
diff --git a/Documentation/git-instaweb.txt b/Documentation/git-instaweb.txt
index 08f85ba046..ea95c90460 100644
--- a/Documentation/git-instaweb.txt
+++ b/Documentation/git-instaweb.txt
@@ -51,8 +51,8 @@ OPTIONS
start::
--start::
- Start the httpd instance and exit. This does not generate
- any of the configuration files for spawning a new instance.
+ Start the httpd instance and exit. Regenerate configuration files
+ as necessary for spawning a new instance.
stop::
--stop::
@@ -62,8 +62,8 @@ stop::
restart::
--restart::
- Restart the httpd instance and exit. This does not generate
- any of the configuration files for spawning a new instance.
+ Restart the httpd instance and exit. Regenerate configuration files
+ as necessary for spawning a new instance.
CONFIGURATION
-------------
diff --git a/git-instaweb.sh b/git-instaweb.sh
index 9a2f20f6ad..01a1b05e6b 100755
--- a/git-instaweb.sh
+++ b/git-instaweb.sh
@@ -99,6 +99,12 @@ start_httpd () {
# here $httpd should have a meaningful value
resolve_full_httpd
+ mkdir -p "$fqgitdir/gitweb/$httpd_only"
+ conf="$fqgitdir/gitweb/$httpd_only.conf"
+
+ # generate correct config file if it doesn't exist
+ test -f "$conf" || configure_httpd
+ test -f "$fqgitdir/gitweb/gitweb_config.perl" || gitweb_conf
# don't quote $full_httpd, there can be arguments to it (-f)
case "$httpd" in
@@ -628,6 +634,7 @@ gitweb_conf
resolve_full_httpd
mkdir -p "$fqgitdir/gitweb/$httpd_only"
+conf="$fqgitdir/gitweb/$httpd_only.conf"
configure_httpd