aboutsummaryrefslogtreecommitdiff
path: root/roles/git/files/gitolite-cgit/entrypoint.sh
diff options
context:
space:
mode:
authorJohannes Stoelp <johannes.stoelp@gmail.com>2023-01-03 15:04:53 +0100
committerJohannes Stoelp <johannes.stoelp@gmail.com>2023-01-03 15:04:53 +0100
commitc994b9baaabea481d06bf80fbb19dc43dd1ec9cc (patch)
tree0e01b2414b00a7e7ec6d3a94644155bc174575ee /roles/git/files/gitolite-cgit/entrypoint.sh
parentfc5551b90f4317ccdf2d8c6b6a331647d676e138 (diff)
downloadansible-memzero-c994b9baaabea481d06bf80fbb19dc43dd1ec9cc.tar.gz
ansible-memzero-c994b9baaabea481d06bf80fbb19dc43dd1ec9cc.zip
git: enable cgit cache, about page, clone-url
Diffstat (limited to 'roles/git/files/gitolite-cgit/entrypoint.sh')
-rwxr-xr-xroles/git/files/gitolite-cgit/entrypoint.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/roles/git/files/gitolite-cgit/entrypoint.sh b/roles/git/files/gitolite-cgit/entrypoint.sh
index 905bf97..873a0ac 100755
--- a/roles/git/files/gitolite-cgit/entrypoint.sh
+++ b/roles/git/files/gitolite-cgit/entrypoint.sh
@@ -22,9 +22,16 @@ if [ ! -f /var/lib/git/.ssh/authorized_keys ]; then
su - git -c 'gitolite setup --pubkey /tmp/admin.pub'
rm -f /tmp/admin.pub
else
+ # Fixup gitolite, eg in case a new repo was added manually.
su - git -c 'gitolite setup'
fi
+# -- SETUP: cgit ---------------------------------------------------------------
+
+# Ensure default cache directory exists.
+# Adapt if cache-root is changed in cgitrc(5).
+mkdir -p /var/cache/cgit
+
# -- SETUP: sshd ---------------------------------------------------------------
# Generate ssh host keys (nop if keys already exist).