From 17a8b25005bb09b03bee7ddac5412c7d29675eef Mon Sep 17 00:00:00 2001 From: Gerrit Pape Date: Wed, 26 Mar 2008 18:11:19 +0000 Subject: gitweb: fallback to system-wide config file if default config does not exist From a distribution point of view, configuration files for applications should reside in /etc/. On the other hand it's convenient for multiple instances of gitweb (e.g. virtual web servers on a single machine) to have a per-instance configuration file, just as gitweb currently supports through the file gitweb_config.perl next to the cgi. To support both at runtime, this commit introduces GITWEB_CONFIG_SYSTEM as a system-wide configuration file which will be used as a fallback if the config file sprecified throug GITWEB_CONFIG does not exist. See also http://bugs.debian.org/450592 Signed-off-by: Gerrit Pape Acked-by: Jakub Narebski Signed-off-by: Junio C Hamano --- gitweb/README | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'gitweb/README') diff --git a/gitweb/README b/gitweb/README index 2163071047..8dfe335f73 100644 --- a/gitweb/README +++ b/gitweb/README @@ -100,13 +100,20 @@ You can specify the following configuration variables when building GIT: is set when gitweb.cgi is executed, then the file specified in the environment variable will be loaded instead of the file specified when gitweb.cgi was created. [Default: gitweb_config.perl] + * GITWEB_CONFIG_SYSTEM + This Perl file will be loaded using 'do' as a fallback if GITWEB_CONFIG + does not exist. If the environment variable GITWEB_CONFIG_SYSTEM is set + when gitweb.cgi is executed, then the file specified in the environment + variable will be loaded instead of the file specified when gitweb.cgi was + created. [Default: /etc/gitweb.conf] Runtime gitweb configuration ---------------------------- You can adjust gitweb behaviour using the file specified in `GITWEB_CONFIG` -(defaults to 'gitweb_config.perl' in the same directory as the CGI). +(defaults to 'gitweb_config.perl' in the same directory as the CGI), and +as a fallback `GITWEB_CONFIG_SYSTEM` (defaults to /etc/gitweb.conf). The most notable thing that is not configurable at compile time are the optional features, stored in the '%features' variable. -- cgit v1.2.3