From eb61bb9448b0cb21795d6065ac877f2d0a75e46a Mon Sep 17 00:00:00 2001 From: Timo Makinen Date: Wed, 25 Aug 2021 15:09:03 +0000 Subject: [PATCH] git/server: Set projectroot in environment --- roles/git/server/files/git.conf | 4 +--- roles/git/server/files/gitweb.conf | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/roles/git/server/files/git.conf b/roles/git/server/files/git.conf index 7ccb22f..b49c294 100644 --- a/roles/git/server/files/git.conf +++ b/roles/git/server/files/git.conf @@ -1,6 +1,5 @@ -SetEnv GIT_PROJECT_ROOT /srv/git -SetEnv GIT_HTTP_EXPORT_ALL +SetEnv GITWEB_PROJECTROOT /srv/git Alias /static/ /var/www/git/static/ @@ -19,6 +18,5 @@ ScriptAliasMatch \ ScriptAlias /gitweb.cgi /var/www/git/gitweb.cgi - SetEnv GITWEB_CONFIG /etc/gitweb.conf DirectoryIndex gitweb.cgi diff --git a/roles/git/server/files/gitweb.conf b/roles/git/server/files/gitweb.conf index 0026844..4dbf7c7 100644 --- a/roles/git/server/files/gitweb.conf +++ b/roles/git/server/files/gitweb.conf @@ -1,6 +1,6 @@ -# location of git repos -our $projectroot = "/srv/git"; +# read git repo root from env or use default +our $projectroot = $ENV{'GITWEB_PROJECTROOT'}; # site name our $site_name = "foo.sh - Public GIT repositories";